1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- 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"`
- OpenChannel string `mapstructure:"openChannel"`
- DisconnectUrl string `mapstructure:"disconnectUrl"`
- }
- type Param struct {
- FirstOpen string `mapstructure:"firstOpen"`
- }
- 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"`
- Log2File Log2File `mapstructure:"log2file"`
- Param Param `mapstructure:"Param"`
- }
- // Server 服务启动端口配置
- type Server struct {
- Port string `mapstructure:"port"`
- }
- // SQLite Mysql 数据源配置
- type SQLite struct {
- Url string `mapstructure:"url"`
- }
- // Jwt 用户认证配置
- type Jwt struct {
- SigningKey string `mapstructure:"signingKey"`
- }
- // Upload 文件上传相关路径配置
- type Upload struct {
- SavePath string `mapstructer:"savePath"`
- AccessUrl string `mapstructure:"accessUrl"`
- }
- type Websocket struct {
- WSUrl string `mapstructure:"ws-url"`
- }
- type Log2File struct {
- FilePath string `mapstructure:"filePath"`
- FileName string `mapstructure:"FileName"`
- FileSuffix string `mapstructure:"FileSuffix"`
- }
|