12345678910111213141516171819202122232425262728293031323334 |
- package config
- type Config struct {
- Server Server `mapstructure:"server"`
- SQLite SQLite `mapstructure:"sqlite"`
- Jwt Jwt `mapstructure:"jwt"`
- Upload Upload `mapstructure:"upload"`
- Websocket Websocket `mapstructure:"websocket"`
- }
- // Server 服务启动端口配置
- type Server struct {
- Port string `mapstructure:"port"`
- }
- // Mysql 数据源配置
- type SQLite struct {
- 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"`
- }
|