otherdata.proto 1.44 KB
Newer Older
Wei Shoulin's avatar
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
syntax = "proto3";

package dfs.facility.otherdata;
option go_package = "cnlab.net/csst/proto/facility/otherdata";
import "common/error.proto";

service OtherDataSrv {
        rpc Find(FindOtherDataReq) returns (FindOtherDataResp) {}
        rpc Get(GetOtherDataReq) returns (GetOtherDataResp) {}
        rpc Write(stream WriteOtherDataReq) returns (WriteOtherDataResp) {}
}
message OtherDataRecord {
        int64 id = 1;
        string obs_id = 2;
        string detector_no = 3;
        string module_id = 4;
        string file_type = 5;
        string filename = 6;
        string file_path = 7;
        string create_time = 8;
        string pipeline_id = 9;
}

message FindOtherDataReq {
        string obs_id = 1;
        string module_id = 2;
        string detector_no = 3;
        string file_type = 4;
        string filename = 5;
        string create_time_start = 6;
        string create_time_end = 7;
        string pipeline_id = 8;
        int32 limit = 9;
}

message FindOtherDataResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated OtherDataRecord records = 4;
}

message GetOtherDataReq {
        int64 id = 1;
}

message GetOtherDataResp {
        OtherDataRecord record = 1;
}
message WriteOtherDataReq {
        OtherDataRecord record = 1;
        bytes data = 2;
}

message WriteOtherDataResp {
        bool success = 1;
        common.Error error = 2;
        OtherDataRecord record = 3;
}