数据上报
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.8 KiB

package config
type Consumer struct {
Consumer string `json:"consumer"`
}
type MqttConfig struct {
Host string `json:"host"`
Port int `json:"port"`
UserName string `json:"userName"`
Password string `json:"password"`
ClientId string `json:"clientId"`
Topics []string `json:"topics"`
}
type KafkaConfig struct {
Brokers []string `json:"brokers"`
GroupId string `json:"groupId"`
Topics []string `json:"topics"`
}
type UdpConfig struct {
Host string `json:"host"`
Port int `json:"port"`
}
type HttpConfig struct {
Url string `json:"url"`
Method string `json:"method"` //post,put,get,delete
Token Token `json:"token,omitempty"`
}
type Token struct {
Static string `json:"static,omitempty"`
RefreshInterval string `json:"refreshInterval,omitempty"`
Url string `json:"url,omitempty"`
AppKey string `json:"appKey,omitempty"`
AppSecret string `json:"appSecret,omitempty"`
}
type FileConfig struct {
Directory string `json:"directory"` //文件目录
FileNameExtension string `json:"fileNameExtension"` //文件拓展名 如"*.csv,*.txt"
}
type FileMonitorConfig struct {
FileConfig
CronStr string `json:"cronStr"`
}
//type configFile struct {
// Consumer
// IOConfig string `json:"config"`
// SensorMap string `json:"sensorMap"`
//}
//
//type UserConfig struct {
// InMqtt MqttConfig `json:"inMqtt"`
// OutMqtt MqttConfig `json:"outMqtt"`
// SensorConfig sensorConfig `json:"SensorConfig"`
// Rc4key string `json:"rc4key"`
//}
//
//type sensorConfig struct {
// TYCJsensorNameMap map[string]int64 `json:"TYCJsensorNameMap"`
// CZsensorRoadnoMap map[string]int64 `json:"CZsensorRoadnoMap"`
// ZDsensorMCMap map[string]int64 `json:"ZDsensorM-CMap"`
//}