Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrInvalidHelo = Error("invalid HELO") ErrInvalidPing = Error("invalid PING") ErrInvalidPong = Error("invalid PONG") ErrInvalidNonce = Error("invalid nonce") ErrInvalidEntry = Error("invalid entry") ErrFailedConn = Error("failed connection") ErrFailedAuth = Error("failed authentication") ErrNotSupported = Error("not supported") )
View Source
const ( HELO = "HELO" PING = "PING" PONG = "PONG" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthClient ¶
type AuthClient func(ctx context.Context) (Credentials, error)
func StaticAuthClient ¶
func StaticAuthClient(cred Credentials) AuthClient
type AuthServer ¶
type AuthServer func(ctx context.Context, username string) (Credentials, error)
func StaticAuthServer ¶
func StaticAuthServer(cred Credentials) AuthServer
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(addr string, opt ClientOptions) *Client
type ClientOptions ¶
type ClientOptions struct {
Hostname string
Auth AuthClient
}
type Credentials ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opt ServerOptions) *Server
type ServerConn ¶
type ServerConn struct {
// contains filtered or unexported fields
}
func (*ServerConn) String ¶
func (s *ServerConn) String() string
type ServerOptions ¶
Click to show internal directories.
Click to hide internal directories.