Documentation ¶
Index ¶
Constants ¶
View Source
const ( MYSQL = "mysql" POSTGRES = "postgres" SQLite = "sqlite3" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { *gorm.DB `init:"entity"` Conf DatabaseConfig `init:"config"` }
type DatabaseConfig ¶
type DatabaseConfig struct {
Type, Charset, Database, Schema, TimeZone string
Host string `flag:"name:db_host;usage:数据库host"`
User, Password string
TimeFormat string
MaxIdleConns, MaxOpenConns int
Port int32
//bug 字段gorm toml不生效
Gorm gormi.GORMConfig
Prometheus bool
}
func (*DatabaseConfig) Init ¶
func (c *DatabaseConfig) Init()
Click to show internal directories.
Click to hide internal directories.