diff --git a/internal/ssh/ssh.go b/internal/ssh/ssh.go index a459003a8..127a3d7df 100644 --- a/internal/ssh/ssh.go +++ b/internal/ssh/ssh.go @@ -25,6 +25,28 @@ type Resolver interface { AddrFromModelUUID(ctx context.Context, user openfga.User, modelUUID string) (string, error) } +// forwardMessage is the struct holding the information about the jump message received by the ssh client. +type forwardMessage struct { + DestAddr string + DestPort uint32 + SrcAddr string + SrcPort uint32 +} + +// Server is the custom struct to embed the gliderlabs.ssh server and a resolver. +type Server struct { + *ssh.Server + + resolver Resolver +} + +// Config is the struct holding the configuration for the jump server. +type Config struct { + Port string + HostKey []byte + MaxConcurrentConnections string +} + // NewJumpServer creates the jump server struct. func NewJumpServer(ctx context.Context, config Config, resolver Resolver) (Server, error) { zapctx.Info(ctx, "NewJumpServer") diff --git a/internal/ssh/types.go b/internal/ssh/types.go deleted file mode 100644 index 92871fa3b..000000000 --- a/internal/ssh/types.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2025 Canonical. - -package ssh - -import "github.com/gliderlabs/ssh" - -// fowardMessage is the struct holding the information about the jump message received by the ssh client. -type forwardMessage struct { - DestAddr string - DestPort uint32 - SrcAddr string - SrcPort uint32 -} - -// Server is the custom struct to embed the gliderlabs.ssh server and a resolver. -type Server struct { - *ssh.Server - - resolver Resolver -} - -type Config struct { - Port string - HostKey []byte - MaxConcurrentConnections string -}