Documentation
¶
Index ¶
- Constants
- func CheckPort(logger *logging.Logger)
- func CheckRestful(logger *logging.Logger)
- func CheckService(logger *logging.Logger)
- func GetPortList() ([]*utils.Port, string, error)
- func GetRestful() ([]*utils.Restful, string, error)
- func GetServerList() ([]*utils.Server, string, error)
- func SyncDevice(logger *logging.Logger)
- func SyncDeviceImg(loggerD *logging.Logger)
- func SyncDeviceLog(loggerD *logging.Logger, ca *cache.Cache)
- type DeviceImg
- type FaultLog
- type FaultTxt
- type FileInfo
- type InterfaceLog
- type LogMsg
- type Plugin
- type RestfulMsg
Constants ¶
View Source
const ( UnkownFaultLevel int = iota WarningFaultLevel MinorFaultLevel MajorFaultLevel CriticalFaultLevel )
View Source
const ( UnkownStatus int = iota SuccessStatus ErrorStatus )
View Source
const ( UnkownServiceType int64 = iota ApacheServiceType EMQXServiceType RabbitMQServiceType MySQLServiceType FreeSWITCHServiceType FVRServiceType FTPServiceType ChindeoApiServerType ChindeoDataServerType RedisServiceType MongoDBServiceType )
Variables ¶
This section is empty.
Functions ¶
func SyncDevice ¶
Types ¶
type FaultLog ¶
type FaultLog struct {
AppType string `json:"appType"`
Call Plugin `json:"call"`
Face Plugin `json:"face"`
Interf Plugin `json:"interf"`
Iptv Plugin `json:"iptv"`
Mqtt Plugin `json:"mqtt"`
IsBackground bool `json:"isBackground"`
IsEmptyBed bool `json:"isEmptyBed"`
IsMainActivity bool `json:"isMainActivity"`
Timestamp string `json:"timestamp"`
}
fault.log 文件内容 bis:床旁 nws: 护士站主机 webapp:门旁
type FaultTxt ¶
type FaultTxt struct {
Reason string `json:"reason"`
Mqtt bool `json:"mqtt"`
Timestamp string `json:"timestamp"`
}
fault.txt 文件内容 nis : 护理大屏
type InterfaceLog ¶
type InterfaceLog struct {
Msg string `json:"msg"`
PostParamJson string `json:"postParamJson"`
PostParamType int `json:"postParamType"`
Remark string `json:"remark"`
RequestType int `json:"requestType"`
Timestamp string `json:"timestamp"`
Url string `json:"url"`
}
interface.log requestType为0表示get请求,为1表示post请求, postParamType为0表示post请求的参数为Map, postParamType为1表示post请求的参数为Json,code为-1表示返回体为空,code为-2表示JSON解析出错
type LogMsg ¶
type LogMsg struct {
DevId int64 `json:"local_device_id"` // 服务id
DevStatus int64 `json:"device_status"` // 状态
DevActive int64 `json:"device_active"` // 状态
DevDesc string `json:"device_desc"` // 设备描述
DevPosition string `json:"device_position"` // 位置
LocDesc string `json:"loc_desc"` // loc_desc
RoomDesc string `json:"room_desc"` // room_desc
BedCode string `json:"bed_code"` // bed_code
DevIp string `json:"device_ip"` // 服务id
DevType int64 `json:"device_type_id"`
DeviceCode string `json:"device_code"` //设备编码
DirName string `json:"dir_name"` //系统类型,bis/nis/nws/webapp
FaultMsg string `json:"fault_msg"` //故障信息
StatusMsg string `json:"wechat_msg"` //状态信息
Status int `json:"status"` // 对应后台的 is_error 字段, SuccessStatus 表示有错误,ErrorStatus 表示没错误,正好相反
StatusType int `json:"status_type"` //故障级别 1 提示,2 次要,3 重要,4 紧急。
InterfaceError int `json:"interface_error"`
Call string `json:"call"`
Face string `json:"face"`
Interf string `json:"interf"`
Iptv string `json:"iptv"`
Mqtt string `json:"mqtt"`
CallCode string `json:"call_code"`
FaceCode string `json:"face_code"`
InterfCode string `json:"interf_code"`
IptvCode string `json:"iptv_code"`
MqttCode string `json:"mqtt_code"`
IsBackground string `json:"is_background"`
IsEmptyBed string `json:"is_empty_bed"`
IsMainActivity string `json:"is_main_activity"`
Timestamp string `json:"timestamp"`
}
type RestfulMsg ¶
Click to show internal directories.
Click to hide internal directories.