filesystem

package
v0.0.0-...-97da559 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathOutsideRoot = errors.New("path berada di luar root server")
	ErrNotFound        = errors.New("file tidak ditemukan")
	ErrPermission      = errors.New("permission ditolak")
	ErrServerNotFound  = errors.New("server tidak ditemukan")
	ErrQuotaExceeded   = errors.New("quota disk terlampaui")
)

Functions

This section is empty.

Types

type CredentialStore

type CredentialStore interface {
	GetSFTPCredential(string) (store.SFTPCredential, error)
}

type FileInfo

type FileInfo struct {
	Name       string
	Path       string
	IsDir      bool
	SizeBytes  int64
	ModifiedAt time.Time
	Mode       string
}

type SFTPServer

type SFTPServer struct {
	// contains filtered or unexported fields
}

SFTPServer provides an isolated SSH listener. File operations are delegated to Manager; the transport accepts only registered public-key credentials.

func NewSFTPServer

func NewSFTPServer(cfg config.SFTPConfig, manager Manager, creds CredentialStore) (*SFTPServer, error)

func (*SFTPServer) Addr

func (s *SFTPServer) Addr() net.Addr

func (*SFTPServer) ListenAndServe

func (s *SFTPServer) ListenAndServe(ctx context.Context) error

func (*SFTPServer) Shutdown

func (s *SFTPServer) Shutdown(context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址