Documentation ¶
Index ¶
Constants ¶
View Source
const ( ResponseEOF = 0xfe ResponseOK = 0x00 ResponseERR = 0xff )
View Source
const ( CapabilityServerMySQL uint32 = 1 << iota CapabilityServerPostgres )
Capability flags
View Source
const ( // 1000 - 1199 server errors // unknown ErrUnknownError = 1000 // internal ErrInternalError = 1100 // 1200 - grant errors ErrGrantInactiveError = 1200 ErrNoGrantOutputError = 1201 // 1300 - grant errors ErrUserIdentityError = 1300 )
View Source
const (
// CFAuthToken transmits the cf auth token in the clear.
CFAuthToken = "cf_auth_token"
)
Supported auth forms.
View Source
const ( // MaxPacketSize is the maximum payload length of a packet // the server supports. MaxPacketSize = (1 << 24) - 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewHandshakeClient ¶
func (*Client) Handshake ¶
func (c *Client) Handshake() (*ServerHandshake, error)
type ClientHandshake ¶
type ClientHandshake struct {
// contains filtered or unexported fields
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewHandshakeServer ¶
func NewHandshakeServer(conn net.Conn, connectionID uint32, sessionValidator SessionValidator) *Server
type ServerError ¶
ServerError is a known error type
func CannotVerifyUserIdentityError ¶
func CannotVerifyUserIdentityError() *ServerError
func GrantInactiveError ¶
func GrantInactiveError() *ServerError
func InternalServerError ¶
func InternalServerError() *ServerError
func NoGrantOutputError ¶
func NoGrantOutputError() *ServerError
func (*ServerError) Error ¶
func (se *ServerError) Error() string
Error implements the error interface
type ServerHandshake ¶
type SessionValidator ¶
type SessionValidatorFunc ¶
The HandlerFunc type is an adapter to allow the use of ordinary functions as SessionValidators
Click to show internal directories.
Click to hide internal directories.