Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConf ¶
type AppConf struct { ServerConf *ServerConf `mapstructure:"app"` DataConf *DataConf `mapstructure:"data"` LogConf *LogConf `mapstructure:"log"` JwtConf *JwtConf `mapstructure:"jwt"` LocaleConf *locale.Conf `mapstructure:"locale"` EmailConf *EmailConf `mapstructure:"email"` BuildMeta BuildInfo }
AppConf wilson config contains all needed configurations
type DataConf ¶
type DataConf struct { DatabaseConf *DatabaseConf `mapstructure:"database"` RedisConf *RedisConf `mapstructure:"redis"` }
DataConf Here are the data related configurations
type DatabaseConf ¶
type DatabaseConf struct { Driver string `mapstructure:"driver"` Network string `mapstructure:"network"` Address string `mapstructure:"addr"` User string `mapstructure:"user"` Password string `mapstructure:"pswd"` Params string `mapstructure:"params"` MaxOpenCons int `mapstructure:"maxOpenCons"` MaxIdleCons int `mapstructure:"maxIdleCons"` MaxIdleTime time.Duration `mapstructure:"maxIdleTime"` MaxLifetime time.Duration `mapstructure:"maxLifetime"` }
DatabaseConf relational database config
type EmailConf ¶
type HttpConf ¶
type HttpConf struct { Address string `mapstructure:"address"` TlsConf *TlsConf `mapstructure:"tls"` CorsConf *httpx.Cors `mapstructure:"cors"` ReadTimeout time.Duration `mapstructure:"readTimeout"` WriteTimeout time.Duration `mapstructure:"writeTimeout"` ReadHeadTimeout time.Duration `mapstructure:"readHeaderTimeout"` IdleTimeout time.Duration `mapstructure:"idleTimeout"` MultipartMax int64 `mapstructure:"multipartMax"` MaxHeader int `mapstructure:"maxHeader"` }
HttpConf http server config
type JwtConf ¶
type JwtConf struct { Sig string `mapstructure:"sig"` Isu string `mapstructure:"isu"` Exp time.Duration `mapstructure:"exp"` RExp time.Duration `mapstructure:"rexp"` Delay time.Duration `mapstructure:"delay"` }
JwtConf jwt config
type LogConf ¶
type LogConf struct { Format string `mapstructure:"format"` Level string `mapstructure:"level"` InfoLog string `mapstructure:"infoLog"` ErrorLog string `mapstructure:"errorLog"` TimeFormat string Order []string }
LogConf app logger config
type RedisConf ¶
type RedisConf struct { Address string `mapstructure:"addr"` Auth string `mapstructure:"auth"` Retry int `mapstructure:"retry"` ReadTimeout time.Duration `mapstructure:"readTimeout"` WriteTimeout time.Duration `mapstructure:"writeTimeout"` }
RedisConf redis client configuration
type ServerConf ¶
type ServerConf struct { Swagger bool `mapstructure:"swagger"` OpenAPI bool `mapstructure:"openapi"` HttpConf HttpConf `mapstructure:"http"` }
ServerConf app config
Click to show internal directories.
Click to hide internal directories.