Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientLogin ¶
type ClientLogin struct { Capabilities int // int<2> ExtendedCapabilities int // int<2> MaxPacketSize int // int<4> Charset byte // 23 bytes zero UserName string // string<nul> PasswdLen byte Passwd []byte // string<len> len=$PasswdLen Database string AuthPlugin string Attr map[string]string }
ClientLogin client发送给mysql server的auth请求体
func DecodeClientLoginPacket ¶
func DecodeClientLoginPacket(src *parse.Source) (*ClientLogin, error)
DecodeClientLoginPacket 解码client发送给mysql server的auth验证请求 doc: https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse41
func (*ClientLogin) String ¶
func (c *ClientLogin) String() string
type ServerGreeting ¶
type ServerGreeting struct { ProtocolVersion byte // 1 MySQLVersion string // string<nul> ThreadID int // int<4> Salt_1 []byte // 8 bytes // filter 0x00 Capabilities int // int<2> ServerLanguage byte StatusFlag int // 2 bytes ExtendedServerCapabilities int // 2 bytes AuthPluginLen int // 1 byte // 10 bytes reserved Salt_2 []byte AuthPlugin string }
ServerGreeting 服务器发给client的greeting包 field顺序就是protocol顺序
func DecodeServerGreeting ¶
func DecodeServerGreeting(src *parse.Source) (*ServerGreeting, error)
DecodeServerGreeting 解码mysql发给client的greet包 doc: https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::Handshake
func (*ServerGreeting) String ¶
func (sg *ServerGreeting) String() string
Click to show internal directories.
Click to hide internal directories.