command

package
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinlogDumpBody

type BinlogDumpBody struct {
	BinlogPos      int
	Flags          int
	ServerID       int
	BinlogFilename string
}

BinlogDumpBody ...

func (*BinlogDumpBody) Map

func (p *BinlogDumpBody) Map() model.Map

Map ...

func (*BinlogDumpBody) String

func (p *BinlogDumpBody) String() string

type BinlogDumpGtidBody

type BinlogDumpGtidBody struct {
	Flags             int
	ServerID          int
	BinlogFilenameLen int
	BinlogFilename    string
	BinlogPos         int
	ExtraData         string
}

BinlogDumpGtidBody ...

func (*BinlogDumpGtidBody) Map

func (p *BinlogDumpGtidBody) Map() model.Map

Map ...

func (*BinlogDumpGtidBody) String

func (p *BinlogDumpGtidBody) String() string

type ChangeUserBody

type ChangeUserBody struct {
	User      string
	ExtraData string
}

ChangeUserBody change user body

func DecodeChangeUserReq

func DecodeChangeUserReq(src *parse.Source) (*ChangeUserBody, error)

DecodeChangeUserReq 解码query请求 doc: https://dev.mysql.com/doc/internals/en/com-change-user.html

func (*ChangeUserBody) Map

func (q *ChangeUserBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*ChangeUserBody) String

func (q *ChangeUserBody) String() string

type Columndef

type Columndef struct {
	// 0x03 def
	Schema     string
	Table      string
	OrgTable   string
	ColName    string
	OrgColName string
	// next_length always 0x0c
	Charset    uint16 // 2bytes
	ColLength  int    // int<4>
	Type       byte
	ExtraBytes []byte
}

Columndef table的一个字段的定义

func DecodeColumnDef

func DecodeColumnDef(src *parse.Source) (Columndef, error)

DecodeColumnDef 解码column定义

func (*Columndef) Map

func (colDef *Columndef) Map() model.Map

Map 把self转成一个model.Map对象

type ConnectOutReq

type ConnectOutReq struct {
}

ConnectOutReq connect req

func DecodeConnectOutReq

func DecodeConnectOutReq(src *parse.Source) (*ConnectOutReq, error)

DecodeConnectOutReq 解码com_connect_out请求 doc: https://dev.mysql.com/doc/internals/en/com-connect-out.html

func (*ConnectOutReq) Map

func (q *ConnectOutReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*ConnectOutReq) String

func (q *ConnectOutReq) String() string

type ConnectReq

type ConnectReq struct {
}

ConnectReq connect req

func DecodeConnectReq

func DecodeConnectReq(src *parse.Source) (*ConnectReq, error)

DecodeConnectReq 解码com_connect请求 doc: https://dev.mysql.com/doc/internals/en/com-connect.html

func (*ConnectReq) Map

func (q *ConnectReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*ConnectReq) String

func (q *ConnectReq) String() string

type CreateDBBody

type CreateDBBody struct {
	Database string
}

CreateDBBody create db body

func DecodeCreateDBReq

func DecodeCreateDBReq(src *parse.Source) (*CreateDBBody, error)

DecodeCreateDBReq 解码create db请求 doc: https://dev.mysql.com/doc/internals/en/com-create-db.html

func (*CreateDBBody) Map

func (q *CreateDBBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*CreateDBBody) String

func (q *CreateDBBody) String() string

type DaemonReq

type DaemonReq struct {
}

DaemonReq daemon req

func DecodeDaemonReq

func DecodeDaemonReq(src *parse.Source) (*DaemonReq, error)

DecodeDaemonReq 解码com daemon请求 doc: https://dev.mysql.com/doc/internals/en/com-daemon.html

func (*DaemonReq) Map

func (q *DaemonReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*DaemonReq) String

func (q *DaemonReq) String() string

type DebugReq

type DebugReq struct {
}

DebugReq debug req

func DecodeDebugReq

func DecodeDebugReq(src *parse.Source) (*DebugReq, error)

DecodeDebugReq 解码com_debug请求 doc: https://dev.mysql.com/doc/internals/en/com-debug.html

func (*DebugReq) Map

func (q *DebugReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*DebugReq) String

func (q *DebugReq) String() string

type DelayedInsertReq

type DelayedInsertReq struct {
}

DelayedInsertReq delayed insert req

func DecodeDelayedInsertReq

func DecodeDelayedInsertReq(src *parse.Source) (*DelayedInsertReq, error)

DecodeDelayedInsertReq 解码com delayed insert请求 doc: https://dev.mysql.com/doc/internals/en/com-delayed-insert.html

func (*DelayedInsertReq) Map

func (q *DelayedInsertReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*DelayedInsertReq) String

func (q *DelayedInsertReq) String() string

type DropDBBody

type DropDBBody struct {
	Database string
}

DropDBBody drop db body

func DecodeDropDBReq

func DecodeDropDBReq(src *parse.Source) (*DropDBBody, error)

DecodeDropDBReq 解码drop db请求 doc: https://dev.mysql.com/doc/internals/en/com-drop-db.html

func (*DropDBBody) Map

func (q *DropDBBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*DropDBBody) String

func (q *DropDBBody) String() string

type EOFResp

type EOFResp struct {
	Warnings   int // 2 bytes
	StatusFlag int // 2 bytes
}

EOFResp EOF的返回

func DecodeEOFPacket

func DecodeEOFPacket(src *parse.Source) (*EOFResp, error)

DecodeEOFPacket 解码EOF的response doc: https://dev.mysql.com/doc/internals/en/packet-EOF_Packet.html

func (*EOFResp) Map

func (eof *EOFResp) Map() model.Map

Map converts itself to model.Map

func (*EOFResp) String

func (eof *EOFResp) String() string

type ErrResp

type ErrResp struct {
	Header     byte
	ErrCode    int
	ExtraBytes []byte
}

ErrResp 错误返回包

func DecodeErrPacket

func DecodeErrPacket(src *parse.Source) (*ErrResp, error)

DecodeErrPacket 解码err response包 doc: https://dev.mysql.com/doc/internals/en/packet-ERR_Packet.html

func (*ErrResp) Map

func (e *ErrResp) Map() model.Map

Map converts itself to a model.Map

func (*ErrResp) String

func (e *ErrResp) String() string

type FetchBody

type FetchBody struct {
	StatementID int
	NumRows     int
}

FetchBody ...

func (*FetchBody) Map

func (p *FetchBody) Map() model.Map

Map ...

func (*FetchBody) String

func (p *FetchBody) String() string

type FieldListBody

type FieldListBody struct {
	Table string
	Field string
}

FieldListBody field list body

func DecodeFieldListReq

func DecodeFieldListReq(src *parse.Source) (*FieldListBody, error)

DecodeFieldListReq 解码com field list请求 doc: https://dev.mysql.com/doc/internals/en/com-field-list.html

func (*FieldListBody) Map

func (q *FieldListBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*FieldListBody) String

func (q *FieldListBody) String() string

type InitDBBody

type InitDBBody struct {
	Table string
}

InitDBBody init db body

func DecodeInitDBReq

func DecodeInitDBReq(src *parse.Source) (*InitDBBody, error)

DecodeInitDBReq 解码init db请求 doc: https://dev.mysql.com/doc/internals/en/com-init-db.html

func (*InitDBBody) Map

func (q *InitDBBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*InitDBBody) String

func (q *InitDBBody) String() string

type OKResp

type OKResp struct {
	Header       byte
	AffectedRows int // lenenc_int
	LastInsertID int // lenenc_int
	StatusFlag   int // 2 bytes
	Warnings     int // 2 bytes
	ExtraBytes   []byte
}

OKResp OK的返回

func DecodeOKPacket

func DecodeOKPacket(src *parse.Source) (*OKResp, error)

DecodeOKPacket 解码OK的response doc: https://dev.mysql.com/doc/internals/en/packet-OK_Packet.html

func (*OKResp) Map

func (ok *OKResp) Map() model.Map

Map converts itself to model.Map

func (*OKResp) String

func (ok *OKResp) String() string

type PingReq

type PingReq struct {
}

PingReq ping req

func DecodePingReq

func DecodePingReq(src *parse.Source) (*PingReq, error)

DecodePingReq 解码com_ping请求 doc: https://dev.mysql.com/doc/internals/en/com-ping.html

func (*PingReq) Map

func (q *PingReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*PingReq) String

func (q *PingReq) String() string

type ProcessKillBody

type ProcessKillBody struct {
	ConnectionID int
}

ProcessKillBody process kill body

func DecodeProcessKillReq

func DecodeProcessKillReq(src *parse.Source) (*ProcessKillBody, error)

DecodeProcessKillReq 解码com process kill请求 doc: https://dev.mysql.com/doc/internals/en/com-process-kill.html

func (*ProcessKillBody) Map

func (q *ProcessKillBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*ProcessKillBody) String

func (q *ProcessKillBody) String() string

type ProcessReq

type ProcessReq struct {
}

ProcessReq process req

func DecodeProcessReq

func DecodeProcessReq(src *parse.Source) (*ProcessReq, error)

DecodeProcessReq 解码com_process_info请求 doc: https://dev.mysql.com/doc/internals/en/com-process-info.html

func (*ProcessReq) Map

func (q *ProcessReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*ProcessReq) String

func (q *ProcessReq) String() string

type QueryBody

type QueryBody struct {
	RawBody string
}

QueryBody query body

func DecodeQueryReq

func DecodeQueryReq(src *parse.Source) (*QueryBody, error)

DecodeQueryReq 解码query请求 doc: https://dev.mysql.com/doc/internals/en/com-query.html

func (*QueryBody) Map

func (q *QueryBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*QueryBody) String

func (q *QueryBody) String() string

type QuitReq

type QuitReq struct {
}

QuitReq quit req

func DecodeQuitReq

func DecodeQuitReq(src *parse.Source) (*QuitReq, error)

DecodeQuitReq 解码com_quit请求 doc: https://dev.mysql.com/doc/internals/en/com-quit.html

func (*QuitReq) Map

func (q *QuitReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*QuitReq) String

func (q *QuitReq) String() string

type RefreshBody

type RefreshBody struct {
	SubCMD int
}

RefreshBody refresh body

func DecodeRefreshReq

func DecodeRefreshReq(src *parse.Source) (*RefreshBody, error)

DecodeRefreshReq 解码refresh请求 doc: https://dev.mysql.com/doc/internals/en/com-refresh.html

func (*RefreshBody) Map

func (q *RefreshBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*RefreshBody) String

func (q *RefreshBody) String() string

type RegisterSlaveBody

type RegisterSlaveBody struct {
	ServerID         int
	SlaveHostNameLen int
	SlaveHostName    string
	SlaveUserLen     int
	SlaveUser        string
	SlavePasswordLen int
	SlavePassword    string
	SlaveMysqlPort   int
	ReplicationRank  int
	MasterID         int
}

RegisterSlaveBody ...

func (*RegisterSlaveBody) Map

func (p *RegisterSlaveBody) Map() model.Map

Map ...

func (*RegisterSlaveBody) String

func (p *RegisterSlaveBody) String() string

type ResetConnnetionReq

type ResetConnnetionReq struct {
}

ResetConnnetionReq reset connection req

func DecodeResetConnectionReq

func DecodeResetConnectionReq(src *parse.Source) (*ResetConnnetionReq, error)

DecodeResetConnectionReq 解码com reset connection请求 doc: https://dev.mysql.com/doc/internals/en/com-reset-connection.html

func (*ResetConnnetionReq) Map

func (q *ResetConnnetionReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*ResetConnnetionReq) String

func (q *ResetConnnetionReq) String() string

type ResultSet

type ResultSet struct {
	Columns []Columndef
	DataSet [][]string
}

ResultSet query的返回结果集

func (*ResultSet) Map

func (rs *ResultSet) Map() model.Map

Map 把self转成一个model.Map对象

func (*ResultSet) String

func (rs *ResultSet) String() string

type SetOptionBody

type SetOptionBody struct {
	Operation int
}

SetOptionBody set option body

func DecodeSetOptionReq

func DecodeSetOptionReq(src *parse.Source) (*SetOptionBody, error)

DecodeSetOptionReq 解码refresh请求 doc: https://dev.mysql.com/doc/internals/en/com-set-option.html

func (*SetOptionBody) Map

func (q *SetOptionBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*SetOptionBody) String

func (q *SetOptionBody) String() string

type ShutdownBody

type ShutdownBody struct {
	ShutDown int
}

ShutdownBody shutdown body

func DecodeShutdownReq

func DecodeShutdownReq(src *parse.Source) (*ShutdownBody, error)

DecodeShutdownReq 解码shutdown请求 doc: https://dev.mysql.com/doc/internals/en/com-shutdown.html

func (*ShutdownBody) Map

func (q *ShutdownBody) Map() model.Map

Map 把self转成一个model.Map对象

func (*ShutdownBody) String

func (q *ShutdownBody) String() string

type SleepReq

type SleepReq struct {
}

SleepReq sleep req

func DecodeSleepReq

func DecodeSleepReq(src *parse.Source) (*SleepReq, error)

DecodeSleepReq 解码com_sleep请求 doc: https://dev.mysql.com/doc/internals/en/com-sleep.html

func (*SleepReq) Map

func (q *SleepReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*SleepReq) String

func (q *SleepReq) String() string

type StatisticsReq

type StatisticsReq struct {
}

StatisticsReq statistics req

func DecodeStatisticsReq

func DecodeStatisticsReq(src *parse.Source) (*StatisticsReq, error)

DecodeStatisticsReq 解码com_statistics请求 doc: https://dev.mysql.com/doc/internals/en/com-statistics.html

func (*StatisticsReq) Map

func (q *StatisticsReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*StatisticsReq) String

func (q *StatisticsReq) String() string

type TableDumpBody

type TableDumpBody struct {
	DatabaseLen int
	Database    string
	TableLen    int
	Table       string
}

TableDumpBody ...

func (*TableDumpBody) Map

func (p *TableDumpBody) Map() model.Map

Map ...

func (*TableDumpBody) String

func (p *TableDumpBody) String() string

type TimeReq

type TimeReq struct {
}

TimeReq time req

func DecodeTimeReq

func DecodeTimeReq(src *parse.Source) (*TimeReq, error)

DecodeTimeReq 解码com_time请求 doc: https://dev.mysql.com/doc/internals/en/com-time.html

func (*TimeReq) Map

func (q *TimeReq) Map() model.Map

Map 把self转成一个model.Map对象

func (*TimeReq) String

func (q *TimeReq) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL