Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2020 Changes in this version + const DBConfigFile + const DBTypeMongo + const DBTypeMySQL + const DBTypePostgres + type DBConfig struct + IsInitialized bool + Type DBType + func SharedDBConfig() *DBConfig + func (this *DBConfig) Save() error + func (this *DBConfig) TypeName() string + type DBType = string + type MongoAccessLogConfig struct + CleanHour int + KeepDays int + type MongoConfig struct + AccessLog *MongoAccessLogConfig + Addr string + AuthEnabled bool + AuthMechanism string + AuthMechanismProperties []*shared.Variable + DBName string + Password string + PoolSize int + RequestURI string + Scheme string + TeaVersion string + Timeout int + URI string + Username string + func DefaultMongoConfig() *MongoConfig + func LoadMongoConfig() (*MongoConfig, error) + func NewMongoConfig() *MongoConfig + func (this *MongoConfig) AuthMechanismPropertiesMap() map[string]string + func (this *MongoConfig) AuthMechanismPropertiesString() string + func (this *MongoConfig) ComposeURI() string + func (this *MongoConfig) ComposeURIMask(mask bool) string + func (this *MongoConfig) Host() string + func (this *MongoConfig) LoadAuthMechanismProperties(properties string) + func (this *MongoConfig) ParseFromURI(uri string) error + func (this *MongoConfig) Port() int + func (this *MongoConfig) Save() error + func (this *MongoConfig) SetAddr(host string, port uint) + type MySQLAccessLogConfig struct + CleanHour int + KeepDays int + type MySQLConfig struct + AccessLog *MySQLAccessLogConfig + Addr string + DBName string + DSN string + Password string + PoolSize int + Username string + func DefaultMySQLConfig() *MySQLConfig + func LoadMySQLConfig() (*MySQLConfig, error) + func NewMySQLConfig() *MySQLConfig + func (this *MySQLConfig) ComposeDSN() string + func (this *MySQLConfig) Save() error + type PostgresAccessLogConfig struct + CleanHour int + KeepDays int + type PostgresConfig struct + AccessLog *PostgresAccessLogConfig + Addr string + DBName string + DSN string + Password string + PoolSize int + Username string + func DefaultPostgresConfig() *PostgresConfig + func LoadPostgresConfig() (*PostgresConfig, error) + func NewPostgresConfig() *PostgresConfig + func (this *PostgresConfig) ComposeDSN() string + func (this *PostgresConfig) Save() error