level1.proto 2.6 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
110
111
112
113
114
115
116
117
118
119
syntax = "proto3";

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

service Level1Srv {
	rpc Find(FindLevel1Req) returns (FindLevel1Resp) {}
	rpc FindByIds(FindByIdsReq) returns (FindByIdsResp) {}
	rpc FindByBrickIds(FindByBrickIdsReq) returns (FindByBrickIdsResp) {}
	rpc FindByQc1Status(FindLevel1Req) returns (FindLevel1Resp) {}
	rpc Get(GetLevel1Req) returns (GetLevel1Resp) {}
	rpc Write(stream WriteLevel1Req) returns (WriteLevel1Resp) {}
	rpc UpdateQc1Status(UpdateQc1StatusReq) returns (UpdateQc1StatusResp) {}
	rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}	
}
message Level1Record {
	int64 id = 1;
	string level0_id = 2;
	string data_type = 3;
	int64 cor_sci_id = 4; 
	string module_id = 5;
	string prc_params = 6;
	string filter = 7;
	string filename = 8;
	string file_path = 9;
	int32 qc1_status = 10;
	string qc1_time = 11;
	int32 prc_status = 12;
	string prc_time = 13;
	string create_time = 14;
	string pipeline_id = 15; 
	string header = 16;
	string detector_no = 17;
	string pmapname = 18;
	int32 build = 19;
	map<string,string> refs = 20;
}

message FindLevel1Req {
	string obs_id = 1;
	string level0_id = 2;
	string data_type = 3;
	string module_id = 4;
	string create_time_start = 5;
	string create_time_end = 6;
	int32 qc1_status = 7;
	int32 prc_status = 8;
	string filename = 9;
	int32 limit = 10;
	string pipeline_id = 11;
	string detector_no = 12;
	string filter = 13;
	string object_name = 14;
	string pmapname = 15;
	int32 build = 16;
	map<string,string> other_conditions = 17;
}

message FindLevel1Resp {
	bool success = 1;
	int32 totalCount = 2;
	common.Error error = 3;
	repeated Level1Record records = 4;
}
message FindByBrickIdsReq {
	repeated int32 brick_ids = 1;
}
message FindByBrickIdsResp {
	bool success = 1;
	common.Error error = 2;
	repeated Level1Record records = 3;
}
message FindByIdsReq {
	repeated int32 ids = 1;
}
message FindByIdsResp {
	bool success = 1;
	common.Error error = 2;
	repeated Level1Record records = 3;
}
message GetLevel1Req {
	int64 id = 1;
	string level0_id = 2;
	string data_type = 3;	
}

message GetLevel1Resp {
	Level1Record record = 1;
}

message WriteLevel1Req {
	Level1Record record = 1;
	bytes data = 2;
}

message WriteLevel1Resp {
	bool success = 1;
	common.Error error = 2;
	Level1Record record = 3;
}
message UpdateQc1StatusReq {
	int64 id = 1;
	int32 status = 2;
}

message UpdateQc1StatusResp {
	bool success = 1;
	common.Error error = 2;
}
message UpdateProcStatusReq {
	int64 id = 1;
	int32 status = 2;
}

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