Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitShellService ¶
type GitShellService interface {
HandleGitCommand(ctx context.Context, command string, repoPath string, stdin io.Reader, stdout, stderr io.Writer) error
}
GitShellService defines git shell operations
func NewGitShellService ¶
func NewGitShellService(logger *logrus.Logger) GitShellService
NewGitShellService creates a new git shell service
type RepositoryService ¶
type RepositoryService interface { Get(ctx context.Context, owner, name string) (*models.Repository, error) GetRepositoryPath(ctx context.Context, repoID uuid.UUID) (string, error) }
RepositoryService defines the interface needed by SSH server for repository operations
func NewRepositoryServiceAdapter ¶
func NewRepositoryServiceAdapter(repoService services.RepositoryService) RepositoryService
NewRepositoryServiceAdapter creates a new adapter
type SSHServer ¶
type SSHServer struct {
// contains filtered or unexported fields
}
SSHServer represents the SSH server for git operations
func NewSSHServer ¶
func NewSSHServer( config SSHServerConfig, repositoryService RepositoryService, gitService GitShellService, logger *logrus.Logger, db *gorm.DB, ) (*SSHServer, error)
NewSSHServer creates a new SSH server instance
type SSHServerConfig ¶
type SSHServerConfig struct { Port int `mapstructure:"port"` HostKeyPath string `mapstructure:"host_key_path"` }
SSHServerConfig holds SSH server configuration
Click to show internal directories.
Click to hide internal directories.