Documentation
¶
Index ¶
- Constants
- type ClientCapabilities
- type ColumnInfo
- type Connection
- type DecodeError
- type ErrorResponse
- type ExecuteRequest
- type FieldDetail
- type FieldType
- type Greeting
- type LoginRequest
- type OKResponse
- type PrepareOKResponse
- type Request
- type Response
- type ResponseType
- type ResultSetResponse
- type StatusFlags
- type Transmission
- type TypeInfo
- type WithRawPacket
Constants ¶
View Source
const ( DECIMAL FieldType = 0 TINY FieldType = 1 SHORT FieldType = 2 LONG FieldType = 3 FLOAT FieldType = 4 DOUBLE FieldType = 5 NULL FieldType = 6 TIMESTAMP FieldType = 7 LONGLONG FieldType = 8 INT24 FieldType = 9 DATE FieldType = 10 TIME FieldType = 11 DATETIME FieldType = 12 YEAR FieldType = 13 NEWDATE FieldType = 14 VARCHAR FieldType = 15 BIT FieldType = 16 TIMESTAMP2 FieldType = 17 DATETIME2 FieldType = 18 TIME2 FieldType = 19 JSON FieldType = 245 NEWDECIMAL FieldType = 246 ENUM FieldType = 247 SET FieldType = 248 TINY_BLOB FieldType = 249 MEDIUM_BLOB FieldType = 250 LONG_BLOB FieldType = 251 BLOB FieldType = 252 VAR_STRING FieldType = 253 STRING FieldType = 254 GEOMETRY FieldType = 255 DETAIL_NOT_NULL FieldDetail = 1 DETAIL_PRIMARY_KEY FieldDetail = 2 DETAIL_UNIQUE_KEY FieldDetail = 4 DETAIL_MULTIPLE_KEY FieldDetail = 8 DETAIL_BLOB FieldDetail = 16 DETAIL_UNSIGNED FieldDetail = 32 DETAIL_ZEROFILL_FLAG FieldDetail = 64 DETAIL_BINARY_COLLATION FieldDetail = 128 DETAIL_ENUM FieldDetail = 256 DETAIL_AUTO_INCREMENT FieldDetail = 512 DETAIL_TIMESTAMP FieldDetail = 1024 DETAIL_SET FieldDetail = 2048 DETAIL_NO_DEFAULT_VALUE_FLAG FieldDetail = 4096 DETAIL_ON_UPDATE_NOW_FLAG FieldDetail = 8192 DETAIL_PART_KEY_FLAG FieldDetail = 16384 DETAIL_NUM_FLAG FieldDetail = 32768 CCAP_CLIENT_MYSQL ClientCapabilities = 1 CCAP_FOUND_ROWS ClientCapabilities = 2 CCAP_CONNECT_WITH_DB ClientCapabilities = 8 CCAP_COMPRESS ClientCapabilities = 32 CCAP_LOCAL_FILES ClientCapabilities = 128 CCAP_IGNORE_SPACE ClientCapabilities = 256 CCAP_CLIENT_PROTOCOL_41 ClientCapabilities = 1 << 9 CCAP_CLIENT_INTERACTIVE ClientCapabilities = 1 << 10 CCAP_SSL ClientCapabilities = 1 << 11 CCAP_TRANSACTIONS ClientCapabilities = 1 << 12 CCAP_SECURE_CONNECTION ClientCapabilities = 1 << 13 CCAP_MULTI_STATEMENTS ClientCapabilities = 1 << 16 CCAP_MULTI_RESULTS ClientCapabilities = 1 << 17 CCAP_PS_MULTI_RESULTS ClientCapabilities = 1 << 18 CCAP_PLUGIN_AUTH ClientCapabilities = 1 << 19 CCAP_CONNECT_ATTRS ClientCapabilities = 1 << 20 CCAP_PLUGIN_AUTH_LENENC_CLIENT_DATA ClientCapabilities = 1 << 21 CCAP_CLIENT_SESSION_TRACK ClientCapabilities = 1 << 23 CCAP_CLIENT_DEPRECATE_EOF ClientCapabilities = 1 << 24 CCAP_CLIENT_ZSTD_COMPRESSION_ALGORITHM ClientCapabilities = 1 << 26 CCAP_CLIENT_CAPABILITY_EXTENSION ClientCapabilities = 1 << 29 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientCapabilities ¶
type ClientCapabilities uint32
func (ClientCapabilities) MarshalJSON ¶
func (c ClientCapabilities) MarshalJSON() ([]byte, error)
func (ClientCapabilities) String ¶
func (c ClientCapabilities) String() string
type ColumnInfo ¶
type Connection ¶
type Connection struct { Address tcp.ConnectionAddress Items []Transmission RawRequestPackets *packet.Buffer `json:"RawRequestPackets,omitempty"` RawResponsePackets *packet.Buffer `json:"RawResponsePackets,omitempty"` }
func (Connection) FirstSeen ¶
func (c Connection) FirstSeen() time.Time
type DecodeError ¶
type ErrorResponse ¶
type ExecuteRequest ¶
type FieldDetail ¶
type FieldDetail uint16
func (FieldDetail) MarshalJSON ¶
func (d FieldDetail) MarshalJSON() ([]byte, error)
func (FieldDetail) String ¶
func (d FieldDetail) String() string
type Greeting ¶
type Greeting struct { Capabilities ClientCapabilities Collation byte Protocol byte Version string Type string }
type LoginRequest ¶
type OKResponse ¶
type PrepareOKResponse ¶
type PrepareOKResponse struct { Type string `json:"Type"` StatementID uint32 NumColumns uint16 NumParams uint16 Warnings int16 Columns []ColumnInfo `json:"Columns,omitempty"` Params []ColumnInfo `json:"Params,omitempty"` }
type ResponseType ¶
type ResponseType byte
const ( // MySQLError type. MySQLError ResponseType = 0xff // MySQLEOF type. MySQLEOF ResponseType = 0xfe // MySQLOK type. MySQLOK ResponseType = 0 // MySQLLocalInfile type. MySQLLocalInfile ResponseType = 0xfb )
type ResultSetResponse ¶
type ResultSetResponse struct { Type string `json:"Type"` Columns []ColumnInfo `json:"Columns"` Results [][]interface{} `json:"Results"` }
type StatusFlags ¶
type StatusFlags uint16
func (StatusFlags) MarshalJSON ¶
func (f StatusFlags) MarshalJSON() ([]byte, error)
func (StatusFlags) String ¶
func (f StatusFlags) String() string
type Transmission ¶
type WithRawPacket ¶
type WithRawPacket struct { RawData []byte Transmission interface{} }
Click to show internal directories.
Click to hide internal directories.