Documentation
¶
Index ¶
- func CloseConnection(conn *sql.DB) (err error)
- func GetMySQLConnInfo(conn *sql.DB) (connInfo string, err error)
- func GetMySQLConnInfoIgnoreErr(conn *sql.DB) (connInfo string)
- type CheckPair
- type Field
- type Host
- type MysqlDB
- type PooledMysqlDB
- type QueryRow
- type QueryRows
- type Scanner
- type UnanimityHost
- type UnanimityHostWithDomains
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMySQLConnInfo ¶
GetMySQLConnInfo 获取MySQL连接的字符串显示
func GetMySQLConnInfoIgnoreErr ¶
GetMySQLConnInfoIgnoreErr 获取MySQL连接的字符串显示,忽略错误信息
Types ¶
type MysqlDB ¶
type MysqlDB struct { Host UserName string Passwd string DatabaseType string DBName string ConnectTimeout int QueryTimeout int }
MysqlDB Mysql主机实例
func NewMysqlDBWithAllParam ¶
NewMysqlDBWithAllParam 带参数创建MySQL数据库
type PooledMysqlDB ¶
type PooledMysqlDB struct { MysqlDB // contains filtered or unexported fields }
PooledMysqlDB Mysql主机实例
func NewPooledMysqlDBWithAllParam ¶
func NewPooledMysqlDBWithAllParam( ip string, port int, userName, passwd, dbName string) ( pmd *PooledMysqlDB)
NewPooledMysqlDBWithAllParam 带参数创建MySQL数据库
func NewPooledMysqlDBWithParam ¶
func NewPooledMysqlDBWithParam( ip string, port int, userName, passwd string) ( pmd *PooledMysqlDB)
NewPooledMysqlDBWithParam 带参数创建MySQL数据库
func (*PooledMysqlDB) CloseConnection ¶
func (pmd *PooledMysqlDB) CloseConnection() (err error)
CloseConnection 获取数据库连接
func (*PooledMysqlDB) GetConnection ¶
func (pmd *PooledMysqlDB) GetConnection() (conn *sql.DB, err error)
GetConnection 获取数据库连接
type Scanner ¶
Scanner SQL rows读取器
func NewShowNullScanner ¶
func NewShowNullScanner() (s Scanner)
NewShowNullScanner 显示NULL值的接收器,要求Scan的时候传入的参数是string类型
type UnanimityHost ¶
UnanimityHost id标示的主机
func (*UnanimityHost) String ¶
func (uh *UnanimityHost) String() string
type UnanimityHostWithDomains ¶
type UnanimityHostWithDomains struct { UnanimityHost IP string `json:"ip"` Domains []string `json:"domains"` }
UnanimityHostWithDomains 带域名的id标示的主机
Click to show internal directories.
Click to hide internal directories.