package config type Gateway struct { BaseUrl string `mpstructure:"baseUrl"` ScanUrl string `mapstructure:"scanUrl"` ScanSecond int64 `mapstructure:"scanSecond"` ConnUrl string `mapstructure:"connUrl"` NotifyUrl string `mapstructure:"notifyUrl"` WriteDataUrl string `mapstructure:"writeDataUrl"` StartCollectUrl string `mapstructure:"startCollectUrl"` } type Config struct { Server Server `mapstructure:"server"` SQLite SQLite `mapstructure:"sqlite"` Jwt Jwt `mapstructure:"jwt"` Upload Upload `mapstructure:"upload"` Websocket Websocket `mapstructure:"websocket"` Gateway Gateway `mapstructure:"gateway"` } // 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"` }