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 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 Packet
- type PacketHeader
- type PacketType2
- type PasswordData
- type PluginDetails
- type QueryPacket
- 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 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 Packet ¶
type Packet struct { Header SQLPacketHeader `yaml:"header"` Payload []byte `yaml:"payload"` }
type PacketHeader ¶
type PacketType2 ¶
type PasswordData ¶
type PluginDetails ¶
type QueryPacket ¶
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 []models.ColumnDefinition `yaml:"column_definitions,omitempty,flow"` ParamDefs []models.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.