level2.proto 2.95 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
syntax = "proto3";

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

service Level2Srv {
	rpc Find(FindLevel2Req) returns (FindLevel2Resp) {}
	rpc FindCatalog(FindLevel2CatalogReq) returns (stream FindLevel2CatalogResp) {}
	rpc FindExistedBricks(FindExistedBricksReq) returns (FindExistedBricksResp) {}
	rpc Get(GetLevel2Req) returns (GetLevel2Resp) {}
	rpc Write(stream WriteLevel2Req) returns (WriteLevel2Resp) {}
	rpc UpdateQc2Status(UpdateQc2StatusReq) returns (UpdateQc2StatusResp) {}
	rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
	rpc ExecSQL(ExecSQLReq) returns (ExecSQLResp) {}
	rpc CoordCond(CoordCondReq) returns (CoordCondResp) {}
}
message Level2Record {
	int64 id = 1;
	string level0_id = 2;
	int64 level1_id = 3;
	int64 brick_id = 4;
	string module_id = 5;
	string object_name = 6;
	string data_type = 7;
	string filename = 8;
	string file_path = 9;
	int32 qc2_status = 10;
	string qc2_time = 11;
	int32 prc_status = 12;
	string prc_time = 13;
	string create_time = 14;
	string update_time = 15;
	string pipeline_id = 16; 
	int32 import_status = 17;
	int32 build = 18;
}

message FindLevel2Req {
	string level0_id = 1;
	int64 level1_id = 2;
	int64 brick_id = 3;
	string data_type = 4;
	string module_id = 5;
	string create_time_start = 6;
	string create_time_end = 7;
	int32 qc2_status = 8;
	int32 prc_status = 9;
	int32 import_status = 10;
	string filename = 11;
	string object_name = 12;
	string pipeline_id = 13; 
	int32 build = 14;
	int32 limit = 15;
	int32 page = 16;
	map<string,string> other_conditions = 17;
}

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

message GetLevel2Req {
	int64 id = 1;	
}

message GetLevel2Resp {
	Level2Record record = 1;
}

message WriteLevel2Req {
	Level2Record record = 1;
	bytes data = 2;
}

message WriteLevel2Resp {
	bool success = 1;
	common.Error error = 2;
	Level2Record record = 3;
}
message UpdateQc2StatusReq {
	int64 id = 1;
	int32 status = 2;
}

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

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

message FindLevel2CatalogReq {
	string sql = 1;
	int32 limit = 2;
}

message FindLevel2CatalogResp {
	bool success = 1;
	int32 totalCount = 2;
	common.Error error = 3;
	bytes records = 4;
}
message FindExistedBricksReq {
	string data_type = 1;
}
message FindExistedBricksResp {
	bool success = 1;
	common.Error error = 2;	
	repeated int32 brick_ids = 3;
}
message ExecSQLReq {
	string sql = 1;
}

message ExecSQLResp {
	bool success = 1;
	int32 totalCount = 2;
	common.Error error = 3;
}

message CoordCondReq {
	string data_type = 1;
	double ra = 2;
	double dec = 3;
	double radius = 4;
}

message CoordCondResp {
	bool success = 1;
	int32 totalCount = 2;
	common.Error error = 3;
	string condition = 4;
}