Documentation ¶
Overview ¶
Package mysql provides integration with MySQL outgoing.
Index ¶
- Constants
- func NewMySQL(logger *zap.Logger) integrations.Integrations
- func Uint24(data []byte) uint32
- type AuthSwitchRequestPacket
- type AuthSwitchResponsePacket
- type BoundParameter
- type COM_STMT_RESET
- type COM_STMT_SEND_LONG_DATA
- type CapabilityFlags
- type ColumnDefinition
- type ComChangeUserPacket
- type ComInitDbPacket
- type ComPingPacket
- type ComStmtCloseAndPrepare
- type ComStmtClosePacket
- type ComStmtExecute
- type ComStmtFetchPacket
- type ComStmtPreparePacket
- type ComStmtPreparePacket1
- type EOFPacket
- type ERRPacket
- type HandshakeResponse
- type HandshakeResponseOk
- type HandshakeV10Packet
- type MySQL
- type NextAuthPacket
- type OKPacket
- type Packet
- type PacketHeader
- type PacketType2
- type PasswordData
- type PluginDetails
- type QueryPacket
- type ResultSet
- type Row
- type RowColumnDefinition
- type RowDataPacket
- type RowHeader
- type SQLPacketHeader
- type StmtPrepareOk
Constants ¶
View Source
const ( // CLIENT_PLUGIN_AUTH indicates that the client supports plugin authentication. CLIENT_PLUGIN_AUTH = 0x00080000 // CLIENT_CONNECT_WITH_DB indicates that client is connecting to server with database name. CLIENT_CONNECT_WITH_DB = 0x00000008 // CLIENT_CONNECT_ATTRS indicates that the client supports connection attributes. CLIENT_CONNECT_ATTRS = 0x00100000 // CLIENT_ZSTD_COMPRESSION_ALGORITHM indicates support for Zstandard compression algorithm CLIENT_ZSTD_COMPRESSION_ALGORITHM = 0x00010000 )
Variables ¶
This section is empty.
Functions ¶
func NewMySQL ¶
func NewMySQL(logger *zap.Logger) integrations.Integrations
Types ¶
type AuthSwitchRequestPacket ¶
type AuthSwitchResponsePacket ¶
type AuthSwitchResponsePacket struct {
AuthResponseData string `yaml:"auth_response_data"`
}
type BoundParameter ¶
type COM_STMT_RESET ¶
type COM_STMT_RESET struct {
StatementID uint32 `yaml:"statement_id"`
}
type COM_STMT_SEND_LONG_DATA ¶
type CapabilityFlags ¶
type CapabilityFlags uint32
type ColumnDefinition ¶
type ColumnDefinition struct { PacketHeader PacketHeader `yaml:"packet_header"` Catalog string `yaml:"catalog"` Schema string `yaml:"schema"` Table string `yaml:"table"` OrgTable string `yaml:"org_table"` Name string `yaml:"name"` OrgName string `yaml:"org_name"` NextLength uint64 `yaml:"next_length"` CharacterSet uint16 `yaml:"character_set"` ColumnLength uint32 `yaml:"column_length"` ColumnType byte `yaml:"column_type"` Flags uint16 `yaml:"flags"` Decimals byte `yaml:"decimals"` DefaultValue string `yaml:"string"` }
type ComChangeUserPacket ¶
type ComInitDbPacket ¶
type ComPingPacket ¶
type ComPingPacket struct { }
type ComStmtCloseAndPrepare ¶
type ComStmtCloseAndPrepare struct { StmtClose ComStmtClosePacket StmtPrepare ComStmtPreparePacket1 }
type ComStmtClosePacket ¶
type ComStmtExecute ¶
type ComStmtExecute struct { StatementID uint32 `yaml:"statement_id"` Flags byte `yaml:"flags"` IterationCount uint32 `yaml:"iteration_count"` NullBitmap []byte `yaml:"null_bitmap,omitempty,flow"` ParamCount uint16 `yaml:"param_count"` Parameters []BoundParameter `yaml:"parameters,omitempty,flow"` }
type ComStmtFetchPacket ¶
type ComStmtPreparePacket ¶
type ComStmtPreparePacket struct {
Query string
}
type ComStmtPreparePacket1 ¶
type HandshakeResponse ¶
type HandshakeResponse struct { CapabilityFlags uint32 `yaml:"capability_flags"` MaxPacketSize uint32 `yaml:"max_packet_size"` CharacterSet uint8 `yaml:"character_set"` Reserved [23]byte `yaml:"reserved,omitempty,flow"` Username string `yaml:"username"` AuthData []byte `yaml:"auth_data,omitempty,flow"` Database string `yaml:"database"` AuthPluginName string `yaml:"auth_plugin_name"` ConnectAttributes map[string]string `yaml:"connect_attributes"` ZstdCompressionLevel byte `yaml:"zstdcompressionlevel"` }
type HandshakeResponseOk ¶
type HandshakeResponseOk struct { PacketIndicator string `yaml:"packet_indicator"` PluginDetails PluginDetails `yaml:"plugin_details"` RemainingBytes []byte `yaml:"remaining_bytes,omitempty,flow"` }
type HandshakeV10Packet ¶
type HandshakeV10Packet struct { ProtocolVersion uint8 `yaml:"protocol_version"` ServerVersion string `yaml:"server_version"` ConnectionID uint32 `yaml:"connection_id"` AuthPluginData []byte `yaml:"auth_plugin_data,omitempty,flow"` CapabilityFlags uint32 `yaml:"capability_flags"` CharacterSet uint8 `yaml:"character_set"` StatusFlags uint16 `yaml:"status_flags"` AuthPluginName string `yaml:"auth_plugin_name"` }
func (*HandshakeV10Packet) GetAuthMethod ¶
func (packet *HandshakeV10Packet) GetAuthMethod() string
func (*HandshakeV10Packet) ShouldUseSSL ¶
func (packet *HandshakeV10Packet) ShouldUseSSL() bool
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) MockOutgoing ¶
func (m *MySQL) MockOutgoing(ctx context.Context, src net.Conn, dstCfg *integrations.ConditionalDstCfg, mockDb integrations.MockMemDb, opts models.OutgoingOptions) error
type NextAuthPacket ¶
type NextAuthPacket struct {
PluginData byte `yaml:"plugin_data"`
}
type OKPacket ¶
type OKPacket struct { AffectedRows uint64 `json:"affected_rows,omitempty" yaml:"affected_rows"` LastInsertID uint64 `json:"last_insert_id,omitempty" yaml:"last_insert_id"` StatusFlags uint16 `json:"status_flags,omitempty" yaml:"status_flags"` Warnings uint16 `json:"warnings,omitempty" yaml:"warnings"` Info string `json:"info,omitempty" yaml:"info"` }
type Packet ¶
type Packet struct { Header SQLPacketHeader `yaml:"header"` Payload []byte `yaml:"payload"` }
type PacketHeader ¶
type PacketType2 ¶
type PasswordData ¶
type PluginDetails ¶
type QueryPacket ¶
type ResultSet ¶
type ResultSet struct { Columns []*ColumnDefinition `yaml:"columns,omitempty,flow"` Rows []*Row `yaml:"rows,omitempty,flow"` EOFPresent bool `yaml:"eofPresent,omitempty,flow"` PaddingPresent bool `yaml:"paddingPresent,omitempty,flow"` EOFPresentFinal bool `yaml:"eofPresentFinal,omitempty,flow"` PaddingPresentFinal bool `yaml:"paddingPresentFinal,omitempty,flow"` OptionalPadding bool `yaml:"optionalPadding,omitempty,flow"` OptionalEOFBytes []byte `yaml:"optionalEOFBytes,omitempty,flow"` EOFAfterColumns []byte `yaml:"eofAfterColumns,omitempty,flow"` }
type Row ¶
type Row struct { Header RowHeader `yaml:"header"` Columns []RowColumnDefinition `yaml:"row_column_definition"` }
type RowColumnDefinition ¶
type RowDataPacket ¶
type RowDataPacket struct {
Data []byte `yaml:"data,omitempty,flow"`
}
type SQLPacketHeader ¶
type StmtPrepareOk ¶
type StmtPrepareOk struct { Status byte `yaml:"status"` StatementID uint32 `yaml:"statement_id"` NumColumns uint16 `yaml:"num_columns"` NumParams uint16 `yaml:"num_params"` WarningCount uint16 `yaml:"warning_count"` ColumnDefs []ColumnDefinition `yaml:"column_definitions,omitempty,flow"` ParamDefs []ColumnDefinition `yaml:"param_definitions,omitempty,flow"` }
Source Files ¶
- authMoreData.go
- authSwitchRequestPacket.go
- authSwitchResponsePacket.go
- comChangeUserPacket.go
- comFetchPacket.go
- comInitDb.go
- comPingPacket.go
- comStmtCloseMoreData.go
- comStmtClosePacket.go
- comStmtPrepareOk.go
- comStmtPreparePacket.go
- comStmtResetPacket.go
- comStmtSendLongDataPacket.go
- decode.go
- encode.go
- encryptPassword.go
- eofPacket.go
- errPacket.go
- executePacket.go
- handshakeResponseOkPacket.go
- handshakeResponsePacket.go
- handshakeV10Packet.go
- match.go
- mysql.go
- okPacket.go
- operation.go
- queryPacket.go
- resultsetPacket.go
- type2Packet.go
- util.go
Click to show internal directories.
Click to hide internal directories.