Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Read ... Permission to read a file. Read = "read" // ReadContent ... Permission to read the contents of a file. ReadContent = "read-content" // Create ... Permission to create a file. Create = "create" // Update ... Permission to update a file. Update = "update" // Delete ... Permission to delete a file. Delete = "delete" )
Variables ¶
This section is empty.
Functions ¶
func Can ¶
Can - Determines if a user has permission to perform a specific action on the SFTP server. These permissions are defined and returned by the Panel API.
func Deserialize ¶
Types ¶
type AuthenticationRequest ¶
type AuthenticationRequest struct { User string `json:"username"` Pass string `json:"password"` IP string `json:"ip"` SessionID []byte `json:"session_id"` ClientVersion []byte `json:"client_version"` }
AuthenticationRequest ... An authentication request to the SFTP server.
type AuthenticationResponse ¶
type AuthenticationResponse struct { Server string `json:"server"` Token string `json:"token"` User models.User `json:"user"` }
AuthenticationResponse ... An authentication response from the SFTP server.
type FS ¶
type FS interface { Fileread(request *sftp.Request) (io.ReaderAt, error) Filewrite(request *sftp.Request) (io.WriterAt, error) Filecmd(request *sftp.Request) error Filelist(request *sftp.Request) (sftp.ListerAt, error) SetLogger(logger log.Logger) Logger() log.Logger SetPermissions(p []string) Permissions() []string SetContext(ctx map[string]string) Context() map[string]string SetConn(sconn *ssh.ServerConn) Conn() *ssh.ServerConn SetID(p string) Type() string }
Click to show internal directories.
Click to hide internal directories.