syntax = "proto3"; package dfs.facility.detector; option go_package = "cnlab.net/csst/proto/facility/detector"; import "common/error.proto"; service DetectorSrv { rpc Find(FindDetectorReq) returns (FindDetectorResp) {} rpc Get(GetDetectorReq) returns (GetDetectorResp) {} rpc Write(WriteDetectorReq) returns (WriteDetectorResp) {} rpc Update(UpdateDetectorReq) returns (UpdateDetectorResp) {} rpc Delete(DeleteDetectorReq) returns (DeleteDetectorResp) {} rpc FindStatus(FindStatusReq) returns (FindStatusResp) {} rpc GetStatus(GetStatusReq) returns (GetStatusResp) {} rpc WriteStatus(WriteStatusReq) returns (WriteStatusResp) {} } message Detector { string no = 1; string detector_name = 2; string module_id = 3; string filter_id = 4; string create_time = 5; string update_time = 6; } message DetectorStatus { int64 id = 1; string detector_no = 2; string status = 3; string status_time = 4; string create_time = 5; } message FindDetectorReq { string module_id = 1; string key = 2; } message FindDetectorResp { bool success = 1; int32 totalCount = 2; common.Error error = 3; repeated Detector records = 4; } message GetDetectorReq { string no = 1; } message GetDetectorResp { Detector record = 1; } message WriteDetectorReq { Detector record = 1; } message WriteDetectorResp { bool success = 1; common.Error error = 2; Detector record = 3; } message UpdateDetectorReq { Detector record = 3; } message UpdateDetectorResp { bool success = 1; common.Error error = 2; } message DeleteDetectorReq { string no = 1; } message DeleteDetectorResp { bool success = 1; common.Error error = 2; } message FindStatusReq { string detector_no = 1; string status_begin_time = 2; string status_end_time = 3; int32 limit = 4; } message FindStatusResp { bool success = 1; int32 totalCount = 2; common.Error error = 3; repeated DetectorStatus records = 4; } message GetStatusReq { int64 id = 1; } message GetStatusResp { DetectorStatus record = 1; } message WriteStatusReq { DetectorStatus record = 1; } message WriteStatusResp { bool success = 1; common.Error error = 2; DetectorStatus record = 3; }