Versions in this module Expand all Collapse all v0 v0.0.4 Aug 10, 2023 v0.0.3 May 18, 2023 v0.0.2 Mar 5, 2023 v0.0.1 May 18, 2023 Changes in this version + const CIPHER_TEXT_PREFIX + const JSONFormat + const TextFormat + const ToFile + const ToStdout + func LoadConfigFromEnv() error + func LoadConfigFromToml(filePath string) error + func LoadGloabal() (err error) + type App struct + EncryptKey string + Host string + Name string + Port string + func NewDefaultApp() *App + func (a *App) GrpcAddr() string + func (a *App) HttpAddr() string + func (a *App) RestfulAddr() string + type Config struct + App *App + Log *Log + Mcenter *rpc.Config + MySQL *MySQL + func C() *Config + func NewDefaultConfig() *Config + func (c *Config) InitGloabl() error + type Log struct + Format LogFormat + Level string + PathDir string + To LogTo + func NewDefaultLog() *Log + type LogFormat string + type LogTo string + type MySQL struct + Database string + Host string + MaxIdleConn int + MaxIdleTime int + MaxLifeTime int + MaxOpenConn int + Password string + Port string + UserName string + func NewDefaultMySQL() *MySQL + func (m *MySQL) GetDB() *sql.DB + func (m *MySQL) GetOrmDB() *gorm.DB + func (m *MySQL) GetOrmDBConn() (*gorm.DB, error)