Documentation ¶
Index ¶
- func New(basePath string, opts ...func(*Afos)) fs.FS
- func WithDataPath(val string) func(server *Afos)
- func WithDiskSpaceValidator(val func(fs fs.FS) bool) func(server *Afos)
- func WithPathValidator(val func(fs fs.FS, p string) (string, error)) func(server *Afos)
- func WithPermissions(val []string) func(server *Afos)
- func WithReadOnly(val bool) func(server *Afos)
- type Afos
- func (f *Afos) Conn() *ssh.ServerConn
- func (f *Afos) Context() map[string]string
- func (f *Afos) Filecmd(request *sftp.Request) error
- func (f *Afos) Filelist(request *sftp.Request) (sftp.ListerAt, error)
- func (f *Afos) Fileread(request *sftp.Request) (io.ReaderAt, error)
- func (f *Afos) Filewrite(request *sftp.Request) (io.WriterAt, error)
- func (f *Afos) Logger() log.Logger
- func (f *Afos) Permissions() []string
- func (f *Afos) SetConn(sconn *ssh.ServerConn)
- func (f *Afos) SetContext(ctx map[string]string)
- func (f *Afos) SetID(p string)
- func (f *Afos) SetLogger(logger log.Logger)
- func (f *Afos) SetPermissions(p []string)
- func (f *Afos) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDataPath ¶
func WithDiskSpaceValidator ¶
func WithPathValidator ¶
func WithPermissions ¶
func WithReadOnly ¶
Types ¶
type Afos ¶
type Afos struct {
// contains filtered or unexported fields
}
Afos ... A file system exposed to a user.
func (*Afos) Conn ¶
func (f *Afos) Conn() *ssh.ServerConn
func (*Afos) Filecmd ¶
Filecmd hander for basic SFTP system calls related to files, but not anything to do with reading or writing to those files.
func (*Afos) 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.
func (*Afos) Fileread ¶
Fileread creates a reader for a file on the system and returns the reader back.
func (*Afos) Permissions ¶
func (*Afos) SetConn ¶
func (f *Afos) SetConn(sconn *ssh.ServerConn)
func (*Afos) SetContext ¶
func (*Afos) SetPermissions ¶
Click to show internal directories.
Click to hide internal directories.