Versions in this module Expand all Collapse all v0 v0.1.0 Oct 3, 2022 Changes in this version + var C = new(Config) + func MustLoad(path string) + func PrintWithJSON() + type AppWx struct + AppID string + AppSecret string + type CORS struct + AllowCredentials bool + AllowHeaders []string + AllowMethods []string + AllowOrigins []string + Enable bool + MaxAge int + type Config struct + AppWx AppWx + CORS CORS + DefaultPassword string + Gorm Gorm + HTTP HTTP + JWTAuth JWTAuth + LogGormHook LogGormHook + LogMongoHook LogMongoHook + MiniWx MiniWx + MpWx MpWx + MySQL MySQL + Postgres Postgres + PrintConfig bool + RateLimiter RateLimiter + Redis Redis + RunMode string + Sqlite3 Sqlite3 + Swagger bool + func (c *Config) IsDebugMode() bool + type Gorm struct + DBType string + DbName string + Debug bool + EnableAutoMigrate bool + MaxIdleConns int + MaxLifetime int + MaxOpenConns int + TablePrefix string + type HTTP struct + CertFile string + Host string + KeyFile string + MaxContentLength int64 + MaxReqLoggerLength int + MaxResLoggerLength int + Port int + ShutdownTimeout int + type JWTAuth struct + Enable bool + Expired int + FilePath string + RedisDB int + RedisPrefix string + SigningKey string + SigningMethod string + Store string + type LogGormHook struct + DBType string + MaxIdleConns int + MaxLifetime int + MaxOpenConns int + Table string + type LogHook string + func (h LogHook) IsGorm() bool + type LogMongoHook struct + Collection string + type MiniWx struct + AppID string + AppSecret string + type MpWx struct + AppID string + AppSecret string + type MySQL struct + DBName string + Host string + Parameters string + Password string + Port int + User string + func (a MySQL) DSN() string + type Postgres struct + DBName string + Host string + Password string + Port int + SSLMode string + User string + func (a Postgres) DSN() string + type RateLimiter struct + Count int64 + Enable bool + RedisDB int + type Redis struct + Addr string + DB int + KeyPrefix string + Password string + type Sqlite3 struct + Path string + func (a Sqlite3) DSN() string