level0.proto 2.84 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
syntax = "proto3";

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

service Level0Srv {
        rpc Find(FindLevel0DataReq) returns (FindLevel0DataResp) {}
        rpc FindByBrickIds(FindByBrickIdsReq) returns (FindByBrickIdsResp) {}
        rpc Get(GetLevel0DataReq) returns (GetLevel0DataResp) {}
        rpc Write(WriteLevel0DataReq) returns (WriteLevel0DataResp) {}
        rpc UpdateQc0Status(UpdateQc0StatusReq) returns (UpdateQc0StatusResp) {}
        rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
}
message Level0Record {
        int64 id = 1;
        string level0_id = 2;
        string obs_id = 3;
        string detector_no = 4;
        string module_id = 5;
        string obs_type = 6;
        string obs_time = 7;
        float exp_time = 8;
        string filter = 9;
        int64 detector_status_id = 10;
        string filename = 11;
        string file_path = 12;
        int32 qc0_status = 13;
        string qc0_time = 14;
        int32 prc_status = 15;
        string prc_time = 16;
        string create_time = 17;
        string header = 18;
}

message FindLevel0DataReq {
        string obs_id = 1;
        string module_id = 2;
        string detector_no = 3;
        string obs_type = 4;
        string exp_time_start = 5;
        string exp_time_end = 6;
        int32 qc0_status = 7;
        int32 prc_status = 8;
        string file_name = 9;
        float ra_obj = 10;
        float dec_obj = 11;
        float radius = 12;
        string object_name = 13;
        string filter = 14;
        string version = 15;
        int32 limit = 16;
        map<string,string> other_conditions = 17;
}

message FindLevel0DataResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated Level0Record records = 4;
}
message FindByBrickIdsReq {
        repeated int32 brick_ids = 1;
}
message FindByBrickIdsResp {
        bool success = 1;
        common.Error error = 2;
        repeated Level0Record records = 3;
}
message GetLevel0DataReq {
        int64 id = 1;
        string level0_id = 2;
        string obs_type = 3;
}

message GetLevel0DataResp {
        Level0Record record = 1;
}
message WriteLevel0DataReq {
        Level0Record record = 1;
}

message WriteLevel0DataResp {
        bool success = 1;
        common.Error error = 2;
        Level0Record record = 3;
}
message UpdateQc0StatusReq {
        int64 id = 1;
        string level0_id = 2;
        string obs_type = 3;
        int32 status = 4;
}

message UpdateQc0StatusResp {
        bool success = 1;
        common.Error error = 2;
}
message UpdateProcStatusReq {
        int64 id = 1;
        string level0_id = 2;
        string obs_type = 3;
        int32 status = 4;
}

message UpdateProcStatusResp {
        bool success = 1;
        common.Error error = 2;
}