Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶ added in v1.5.0
func AutoMigrate(table interface{}) error
AutoMigrate automatically migrates the given table.
func NewDBTable ¶
func NewDBTable(name string) dbTable
Types ¶
type Config ¶
type Config struct {
Host string `json:"host" required:"true"`
User string `json:"user" required:"true"`
Pwd string `json:"pwd" required:"true"`
Name string `json:"name" required:"true"`
Port int `json:"port" required:"true"`
Life int `json:"life" required:"true"`
MaxConn int `json:"max_conn" required:"true"`
MaxIdle int `json:"max_idle" required:"true"`
DBCert string `json:"db_cert" required:"true"`
Code errorCode `json:"error_code"`
}
DbLife: the unit is minute
func (*Config) SetDefault ¶
func (p *Config) SetDefault()
type Pagination ¶
type SortByColumn ¶
Click to show internal directories.
Click to hide internal directories.