Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct { Name string `mapstructure:"name"` Module string `mapstructure:"module"` Port int `mapstructure:"port"` Mode string `mapstructure:"mode"` }
应用
type Config ¶
type Config struct { App App `mapstructure:"app"` Secret Secret `mapstructire:"secret"` Log Log `mapstructure:"log"` Database DBType `mapstructure:"database"` Cache Cache `mapstructure:"cache"` Mq Mq `mapstructure:"mq"` Jwt Jwt `mapstructure:"jwt"` OSS OSS `mapstructure:"oss"` Email Email `mapstructure:"email"` Custom map[string]string `mapstructure:"custom"` }
配置项
var GLOBAL *Config
全局使用
type Database ¶
type Database struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` User string `mapstructure:"user"` Password string `mapstructure:"password"` DB string `mapstructure:"db"` }
数据库
type Email ¶
type Email struct { Smtp string `mapstructure:"smtp"` Port int `mapstructure:"port"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Alias string `mapstructure:"alias"` }
邮件服务器配置
type Jwt ¶
type Jwt struct { Key string `mapstructure:"key"` Expires int64 `mapstructure:"expires"` Excludes []string `mapstructure:"excludes"` }
JWT权限设置
Click to show internal directories.
Click to hide internal directories.