Documentation ¶
Index ¶
- Constants
- Variables
- type Db
- func (db *Db) AddDb(dbconf *DbConfig, passwdGet ...PasswordDecode)
- func (db *Db) CreateDb(dbname string, collate string) bool
- func (db *Db) CreateUser(username string, hostname string, passwd string) bool
- func (db *Db) GrantUserPrivileges(dbname string, username string, hostname string) bool
- func (db *Db) SizeDb(dbname string) float32
- func (db *Db) SizeTable(dbname string) []TableSize
- type DbConfig
- type DbInstruct
- type PasswordDecode
- type TableSize
Constants ¶
View Source
const USER_DEFAULT_PRIVILEGES = "CREATE, CREATE VIEW, CREATE TEMPORARY TABLES, SELECT, INSERT, UPDATE, DELETE, EXECUTE, LOCK TABLES, TRIGGER"
Variables ¶
View Source
var MAX_IDLE_CONNS = 0
View Source
var MAX_OPEN_CONNS = 500
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db struct {
// contains filtered or unexported fields
}
func (*Db) AddDb ¶
func (db *Db) AddDb(dbconf *DbConfig, passwdGet ...PasswordDecode)
func (*Db) CreateUser ¶
func (*Db) GrantUserPrivileges ¶
type DbConfig ¶
type DbConfig struct {
// contains filtered or unexported fields
}
func NewDbConfig ¶ added in v0.0.6
func (*DbConfig) GetSqlConfig ¶
func (dbc *DbConfig) GetSqlConfig(passwdGet ...PasswordDecode) *mysql.Config
type DbInstruct ¶
type PasswordDecode ¶
Click to show internal directories.
Click to hide internal directories.