Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthSwitchResponse ¶
func ParseAuthMoreData ¶
Types ¶
type AuthSwitchRequest ¶
type AuthSwitchRequest struct {
generic.Header
PayloadHeader uint8
AuthPlugin generic.AuthenticationPlugin
AuthData []byte
}
func ParseAuthSwitchRequest ¶
func ParseAuthSwitchRequest(data []byte) (*AuthSwitchRequest, error)
type Handshake ¶
type Handshake struct {
generic.Header
ProtocolVersion uint8
ServerVersion string
ConnectionId uint32
Salt1 []byte
CapabilityFlags generic.CapabilityFlag
CharacterSet *generic.Collation
StatusFlags generic.StatusFlag
ExtendedCapabilityFlags generic.CapabilityFlag
AuthPluginDataLen uint8
Salt2 []byte
AuthPlugin generic.AuthenticationPlugin
}
Handshake https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::Handshake
func ParseHandshake ¶
func (*Handshake) GetAuthData ¶
func (*Handshake) GetCapabilities ¶
func (p *Handshake) GetCapabilities() generic.CapabilityFlag
type HandshakeResponse ¶
type HandshakeResponse struct {
generic.Header
ClientCapabilityFlags generic.CapabilityFlag
MaxPacketSize uint32
CharacterSet *generic.Collation
Username []byte // interpreted by CharacterSet
AuthRes []byte
Database []byte // interpreted by CharacterSet
AuthPlugin generic.AuthenticationPlugin
AttributeLen uint64
Attributes []Attribute
}
HandshakeResponse https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse
func ParseHandshakeResponse ¶
func ParseHandshakeResponse(bs []byte) (*HandshakeResponse, error)
func (*HandshakeResponse) AddAttribute ¶
func (p *HandshakeResponse) AddAttribute(key string, val string)
func (*HandshakeResponse) Dump ¶
func (p *HandshakeResponse) Dump() []byte
Click to show internal directories.
Click to hide internal directories.