package config type Gateway struct { BaseUrl string `mapstructure:"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"` ConnectedUrl string `mapstructure:"connectedList"` } 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"` EmqConfig EmqConfig `mapstructure:"emq"` } // 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 `mapstructure:"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"` } type EmqConfig struct { Protocol string `mapstructure:"protocol"` Port int `mapstructure:"port"` Topic []string `mapstructure:"topic"` UserName string `mapstructure:"userName"` Password string `mapstructure:"password"` ClientId string `mapstructure:"clientId"` Qos int `mapstructure:"qos"` Broker string `mapstructure:"broker"` Filter []string `mapstructure:"filter"` GatewayMac string `mapstructure:"gatewayMac"` FirstOpen string }