session

package
v0.0.0-...-d3c4416 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(cmd *cobra.Command, sessionManagerCfg *SessionManagerConfig) error

Types

type CmdType

type CmdType int
const (
	CmdType_Select   CmdType = 0
	CmdType_MakeView CmdType = 1
	CmdType_Other    CmdType = 256
)

type ConnHandler

type ConnHandler struct {
	server.EmptyHandler
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(config *SessionManagerConfig, connIdent string) (*ConnHandler, error)

func (*ConnHandler) Finalize

func (h *ConnHandler) Finalize() error

func (*ConnHandler) HandleFieldList

func (h *ConnHandler) HandleFieldList(table string, fieldWildcard string) ([]*mysql.Field, error)

func (*ConnHandler) HandleQuery

func (h *ConnHandler) HandleQuery(query string) (*mysql.Result, error)

func (*ConnHandler) HandleStmtExecute

func (h *ConnHandler) HandleStmtExecute(context interface{}, query string, args []interface{}) (*mysql.Result, error)

func (*ConnHandler) HandleStmtPrepare

func (h *ConnHandler) HandleStmtPrepare(query string) (int, int, interface{}, error)

func (*ConnHandler) UseDB

func (h *ConnHandler) UseDB(db string) error

type MySQLConfig

type MySQLConfig struct {
	Host    string
	Port    int
	User    string
	Pass    string
	Db      string
	Options string
}

MySQLConfig configures a MySQL compatible database connection.

type SessionManagerConfig

type SessionManagerConfig struct {
	User  string
	Pass  string
	Port  int
	MySQL MySQLConfig
}

SessionManagerConfig is the configuration for the step.

Jump to

Keyboard shortcuts

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