Versions in this module Expand all Collapse all v1 v1.1.2 Oct 27, 2020 v1.1.1 Oct 27, 2020 Changes in this version + var ErrAccessDenied = errors.New("access denied") + func NewServerTLSConfig(caPem, certPem, keyPem []byte, authType tls.ClientAuthType) *tls.Config + type Conn struct + func NewConn(conn net.Conn, user string, password string, h Handler) (*Conn, error) + func NewCustomizedConn(conn net.Conn, serverConf *Server, p CredentialProvider, h Handler) (*Conn, error) + func (c *Conn) ClearInTransaction() + func (c *Conn) Close() + func (c *Conn) Closed() bool + func (c *Conn) ConnectionID() uint32 + func (c *Conn) GetUser() string + func (c *Conn) HandleCommand() error + func (c *Conn) IsAutoCommit() bool + func (c *Conn) IsInTransaction() bool + func (c *Conn) SetInTransaction() + type CredentialProvider interface + CheckUsername func(username string) (bool, error) + GetCredential func(username string) (password string, found bool, err error) + type EmptyHandler struct + func (h EmptyHandler) HandleFieldList(table string, fieldWildcard string) ([]*Field, error) + func (h EmptyHandler) HandleOtherCommand(cmd byte, data []byte) error + func (h EmptyHandler) HandleQuery(query string) (*Result, error) + func (h EmptyHandler) HandleStmtClose(context interface{}) error + func (h EmptyHandler) HandleStmtExecute(context interface{}, query string, args []interface{}) (*Result, error) + func (h EmptyHandler) HandleStmtPrepare(query string) (int, int, interface{}, error) + func (h EmptyHandler) UseDB(dbName string) error + type Handler interface + HandleFieldList func(table string, fieldWildcard string) ([]*Field, error) + HandleOtherCommand func(cmd byte, data []byte) error + HandleQuery func(query string) (*Result, error) + HandleStmtClose func(context interface{}) error + HandleStmtExecute func(context interface{}, query string, args []interface{}) (*Result, error) + HandleStmtPrepare func(query string) (params int, columns int, context interface{}, err error) + UseDB func(dbName string) error + type InMemoryProvider struct + func NewInMemoryProvider() *InMemoryProvider + func (m *InMemoryProvider) AddUser(username, password string) + func (m *InMemoryProvider) CheckUsername(username string) (found bool, err error) + func (m *InMemoryProvider) GetCredential(username string) (password string, found bool, err error) + type Provider InMemoryProvider + type Server struct + func NewDefaultServer() *Server + func NewServer(serverVersion string, collationId uint8, defaultAuthMethod string, ...) *Server + func (s *Server) InvalidateCache(username string, host string) + type Stmt struct + Args []interface{} + Columns int + Context interface{} + ID uint32 + Params int + Query string + func (s *Stmt) ResetParams() + func (s *Stmt) Rest(params int, columns int, context interface{})