| | |
| | | ReportServer string `mapstructure:"report-server"` |
| | | ReportInterval int `mapstructure:"report-interval"` |
| | | RetryInterval int `mapstructure:"retry-interval"` |
| | | Enable bool `mapstructure:"enable"` |
| | | FTPServer string `mapstructure:"ftp-server"` |
| | | RecordServer string `mapstructure:"record-server"` |
| | | } |
| | | |
| | | type image struct { |
| | |
| | | go a.Repository.FaceForward(req.FaceListObject.FaceObject) |
| | | } |
| | | |
| | | if config.ForwardConf.RecordServer != "" { |
| | | go a.Repository.PubRecordMessage(face.DeviceID, face.FaceID) |
| | | } |
| | | |
| | | rspMsg := vo.ResponseStatus{ |
| | | RequestURL: c.FullPath(), |
| | | StatusCode: vo.StatusSuccess, |
| | |
| | | |
| | | return |
| | | } |
| | | |
| | | func (c CaptureRepository) PubRecordMessage(deviceId, msgId string) { |
| | | var msg = vo.RecordMsg{ |
| | | CamId: deviceId, |
| | | MsgId: msgId, |
| | | } |
| | | |
| | | body, _ := json.Marshal(&msg) |
| | | |
| | | util.HttpPost(config.ForwardConf.RecordServer, nil, body) |
| | | } |
New file |
| | |
| | | package vo |
| | | |
| | | type RecordMsg struct { |
| | | CamId string |
| | | MsgId string |
| | | } |