Documentation
¶
Index ¶
Constants ¶
View Source
const ( PermissionFileRead = "file.read" PermissionFileReadContent = "file.read-content" 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 ¶
func Initialize ¶
func Initialize(config config.SystemConfiguration) error
Types ¶
type FileSystem ¶
type FileSystem struct {
UUID string
Permissions []string
ReadOnly bool
User User
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 Server ¶
type Server struct {
Settings Settings
User User
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 api.SftpAuthRequest) (*api.SftpAuthResponse, 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) Initialize ¶
Initialize the SFTP server and add a persistent listener to handle inbound SFTP connections.
Click to show internal directories.
Click to hide internal directories.