Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultCommandNotFound = ": command not found\n" DefaultExitCommand = "exit" DefaultExitMessage = "Goodbye!\r\n" DefaultPrompt = "$ " DefaultWelcomeMessage = "\r\nWelcome!\r\n" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
func NewAuthHandler ¶
func NewAuthHandler(username string, password string, maxAttempts int) AuthHandler
NewAuthHandler returns an AuthHandler with the given configuration.
type Server ¶
type Server struct {
// AuthHandler handles authentication attempts against the server.
AuthHandler AuthHandler
// GenericHandler can be used as a fallback if no matching command is found within Commands.
GenericHandler Handler
// Version is the server version sent to the client after the initial connection.
Version string
// Commands contains the available regex matching commands.
Commands []Command
}
func (*Server) HandlerFunc ¶
Click to show internal directories.
Click to hide internal directories.