Documentation
¶
Index ¶
Constants ¶
View Source
const ( PermissionFileRead = "file.read" PermissionFileCreate = "file.create" PermissionFileUpdate = "file.update" PermissionFileDelete = "file.delete" )
View Source
const ( // Extends the default SFTP server to return a quota exceeded error to the client. // // @see https://tools.ietf.org/id/draft-ietf-secsh-filexfer-13.txt ErrSshQuotaExceeded = fxerr(15) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthenticationRequest ¶
type AuthenticationResponse ¶
type FileSystem ¶
type FileSystem struct {
UUID string
Permissions []string
ReadOnly bool
User SftpUser
Cache *cache.Cache
PathValidator func(fs FileSystem, p string) (string, error)
HasDiskSpace func(fs FileSystem) bool
// contains filtered or unexported fields
}
func (FileSystem) Filecmd ¶
func (fs FileSystem) Filecmd(request *sftp.Request) error
Filecmd hander for basic SFTP system calls related to files, but not anything to do with reading or writing to those files.
func (FileSystem) Filelist ¶
Filelist is the handler for SFTP filesystem list calls. This will handle calls to list the contents of a directory as well as perform file/folder stat calls.
type InvalidCredentialsError ¶
type InvalidCredentialsError struct {
}
func (InvalidCredentialsError) Error ¶
func (ice InvalidCredentialsError) Error() string
type Server ¶
type Server struct {
Settings Settings
User SftpUser
PathValidator func(fs FileSystem, p string) (string, error)
DiskSpaceValidator func(fs FileSystem) bool
// Validator function that is called when a user connects to the server. This should
// check against whatever system is desired to confirm if the given username and password
// combination is valid. If so, should return an authentication response.
CredentialValidator func(r AuthenticationRequest) (*AuthenticationResponse, error)
// contains filtered or unexported fields
}
func (Server) AcceptInboundConnection ¶
func (c Server) AcceptInboundConnection(conn net.Conn, config *ssh.ServerConfig)
Handles an inbound connection to the instance and determines if we should serve the request or not.
func (*Server) ConfigureLogger ¶
func (c *Server) ConfigureLogger(cb func() *zap.SugaredLogger)
Allows configuration of a custom logger.
func (*Server) Initialize ¶ added in v1.1.5
Initialize the SFTP server and add a persistent listener to handle inbound SFTP connections.
Click to show internal directories.
Click to hide internal directories.