123456789101112131415161718192021222324252627282930313233343536 |
- package config
- type Config struct {
- Server Server `mapstructure:"server"`
- Mysql Mysql `mapstructure:"mysql"`
- Jwt Jwt `mapstructure:"jwt"`
- Upload Upload `mapstructure:"upload"`
- Websocket Websocket `mapstructure:"websocket"`
- }
- // Server 服务启动端口配置
- type Server struct {
- Port string `mapstructure:"port"`
- }
- // Mysql 数据源配置
- type Mysql struct {
- UserName string `mapstructure:"username"`
- Password string `mapstructure:"password"`
- Url string `mapstructure:"url"`
- }
- // Jwt 用户认证配置
- type Jwt struct {
- SigningKey string `mapstructure:"signingKey"`
- }
- // 文件上传相关路径配置
- type Upload struct {
- SavePath string `mapstructer:"savePath"`
- AccessUrl string `mapstructure:"accessUrl"`
- }
- type Websocket struct {
- WSUrl string `mapstructure:"ws-url"`
- }
|