Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClose = errors.New("connection closed")
)
Functions ¶
func SessionHandler ¶
SessionHandler handles an FTP session; it must be wrapped with netx.LoggingHandler.
Types ¶
type Data ¶
type Data struct {
User string `structs:"user"`
Pass string `structs:"pass"`
Type string `structs:"type"`
Pasv string `structs:"pasv"`
Epsv string `structs:"epsv"`
Port string `structs:"port"`
Eprt string `structs:"eprt"`
Retr string `structs:"retr"`
}
Data stores args passed to the corresponding FTP commands.
type Meta ¶
type Meta struct {
Session Data `json:"session"`
}
Meta contains FTP-specific event metadata.
type Msg ¶
type Msg struct {
// Greet is server greet message.
Greet string
}
Msg is used to store provided command responses.
type OnCloseFunc ¶
type Option ¶
type Option func(*options)
func WithNotifyStarted ¶ added in v1.26.0
func WithNotifyStarted(f func()) Option
WithNotifyStarted sets a function called once the server is listening.
func WithTLSConfig ¶ added in v1.26.0
WithTLSConfig makes the server accept TLS connections.
Click to show internal directories.
Click to hide internal directories.