brick.proto 2.04 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
syntax = "proto3";

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

service BrickSrv {
        rpc Find(FindBrickReq) returns (FindBrickResp) {}
        rpc Get(GetBrickReq) returns (GetBrickResp) {}
        rpc Write(WriteBrickReq) returns (WriteBrickResp) {}
        rpc FindObsStatus(FindObsStatusReq) returns (FindObsStatusResp) {}
        rpc FindLevel1(FindLevel1Req) returns (FindLevel1Resp) {}
}
message BrickRecord {
        int64 id = 1;
        float ra = 2;
        float dec = 3;        
        string boundingbox = 4;
}
message BrickObsStatusRecord {
        int64 brick_id = 1;
        string band = 2;
        int32 cover_num = 3;        
        string update_time = 4;
}
message BrickLevel1Record {
        int64 brick_id = 1;
        int64 level1_id = 2;
        string obs_id = 3;
        string module = 4;    
        string obs_time = 5;
}
message FindBrickReq {
        int32 limit = 1;
        map<string,string> other_conditions = 2;
}

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

message GetBrickReq {
        int64 id = 1;
}
message GetBrickResp {
        BrickRecord record = 1;
}

message WriteBrickReq {
        BrickRecord record = 1;
}
message WriteBrickResp {
        bool success = 1;
        common.Error error = 2;
        BrickRecord record = 3;
}
message FindObsStatusReq {
        int64 brick_id = 1;
        string band = 2;
        int32 limit = 3;
        map<string,string> other_conditions = 4;
}

message FindObsStatusResp {
        bool success = 1;
        int32 totalCount = 2;
        common.Error error = 3;
        repeated BrickObsStatusRecord records = 4;
}
message FindLevel1Req {
        int64 brick_id = 1;
        int64 level1_id = 2;
        string module = 3;
        int32 limit = 4;
}

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