Commit 462fb961 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

add prototype file

parent 3fb7c29f
Pipeline #3293 passed with stage
......@@ -40,6 +40,6 @@ test_reports.xml
**/_version.py
**/*.proto
# **/*.proto
.hypothesis
syntax = "proto3";
package dfs.common.account;
option go_package = "cnlab.net/csst/proto/common/account";
service Account {
rpc Read(ReadRequest) returns (ReadResponse) {}
rpc Create(CreateRequest) returns (CreateResponse) {}
rpc Update(UpdateRequest) returns (UpdateResponse) {}
rpc Delete(DeleteRequest) returns (DeleteResponse) {}
rpc Search(SearchRequest) returns (SearchResponse) {}
}
message Record {
// uuid
string id = 1;
// service or user
string type = 2;
// service name, username, etc
string client_id = 3;
// we leave this blank in responses
// used for update and create
string client_secret = 4;
map<string,string> metadata = 5;
// unix timestamp
int64 created = 6;
// unix timestamp
int64 updated = 7;
}
message ReadRequest {
string id = 1;
}
message ReadResponse {
Record account = 1;
}
message CreateRequest {
// If id is blank, one will be generated
Record account = 1;
}
message CreateResponse {
}
message UpdateRequest {
// Id and client_id cannot be changed
Record account = 1;
}
message UpdateResponse {
}
message DeleteRequest {
string id = 1;
}
message DeleteResponse {
}
message SearchRequest {
string client_id = 1;
string type = 2;
int64 limit = 3;
int64 offset = 4;
}
message SearchResponse {
repeated Record accounts = 1;
}
syntax = "proto3";
package dfs.ephem;
option go_package = "cnlab.net/csst/proto/common/ephem";
import "common/error.proto";
service EphemSearchSrv {
rpc Gaia3Search(EphemSearchRequest) returns (stream Gaia3SearchResponse) {}
}
message Gaia3Record {
int64 SolutionId = 1;
string Designation = 2;
int64 SourceId = 3;
int64 RandomIndex = 4;
double RefEpoch = 5;
double Ra = 6;
double RaError = 7;
double Dec = 8;
double DecError = 9;
double Parallax = 10;
double ParallaxError = 11;
double ParallaxOverError = 12;
double Pm = 13;
double Pmra = 14;
double PmraError = 15;
double Pmdec = 16;
double PmdecError = 17;
double RaDecCorr = 18;
double RaParallaxCorr = 19;
double RaPmraCorr = 20;
double RaPmdecCorr = 21;
double DecParallaxCorr = 22;
double DecPmraCorr = 23;
double DecPmdecCorr = 24;
double ParallaxPmraCorr = 25;
double ParallaxPmdecCorr = 26;
double PmraPmdecCorr = 27;
int64 AstrometricNObsAl = 28;
int64 AstrometricNObsAc = 29;
int64 AstrometricNGoodObsAl = 30;
int64 AstrometricNBadObsAl = 31;
double AstrometricGofAl = 32;
double AstrometricChi2Al = 33;
double AstrometricExcessNoise = 34;
double AstrometricExcessNoiseSig = 35;
int64 AstrometricParamsSolved = 36;
int32 AstrometricPrimaryFlag = 37;
double NuEffUsedInAstrometry = 38;
double Pseudocolour = 39;
double PseudocolourError = 40;
double RaPseudocolourCorr = 41;
double DecPseudocolourCorr = 42;
double ParallaxPseudocolourCorr = 43;
double PmraPseudocolourCorr = 44;
double PmdecPseudocolourCorr = 45;
int64 AstrometricMatchedTransits = 46;
int64 VisibilityPeriodsUsed = 47;
double AstrometricSigma5dMax = 48;
int64 MatchedTransits = 49;
int64 NewMatchedTransits = 50;
int64 MatchedTransitsRemoved = 51;
double IpdGofHarmonicAmplitude = 52;
double IpdGofHarmonicPhase = 53;
int64 IpdFracMultiPeak = 54;
int64 IpdFracOddWin = 55;
double Ruwe = 56;
double ScanDirectionStrengthK1 = 57;
double ScanDirectionStrengthK2 = 58;
double ScanDirectionStrengthK3 = 59;
double ScanDirectionStrengthK4 = 60;
double ScanDirectionMeanK1 = 61;
double ScanDirectionMeanK2 = 62;
double ScanDirectionMeanK3 = 63;
double ScanDirectionMeanK4 = 64;
int32 DuplicatedSource = 65;
int64 PhotGNObs = 66;
double PhotGMeanFlux = 67;
double PhotGMeanFluxError = 68;
double PhotGMeanFluxOverError = 69;
double PhotGMeanMag = 70;
int64 PhotBpNObs = 71;
double PhotBpMeanFlux = 72;
double PhotBpMeanFluxError = 73;
double PhotBpMeanFluxOverError = 74;
double PhotBpMeanMag = 75;
int64 PhotRpNObs = 76;
double PhotRpMeanFlux = 77;
double PhotRpMeanFluxError = 78;
double PhotRpMeanFluxOverError = 79;
double PhotRpMeanMag = 80;
double PhotBpRpExcessFactor = 81;
double PhotBpNContaminatedTransits = 82;
double PhotBpNBlendedTransits = 83;
double PhotRpNContaminatedTransits = 84;
double PhotRpNBlendedTransits = 85;
double PhotProcMode = 86;
double BpRp = 87;
double BpG = 88;
double GRp = 89;
double RadialVelocity = 90;
double RadialVelocityError = 91;
double RvMethodUsed = 92;
double RvNbTransits = 93;
double RvNbDeblendedTransits = 94;
double RvVisibilityPeriodsUsed = 95;
double RvExpectedSigToNoise = 96;
double RvRenormalisedGof = 97;
double RvChisqPvalue = 98;
double RvTimeDuration = 99;
double RvAmplitudeRobust = 100;
double RvTemplateTeff = 101;
double RvTemplateLogg = 102;
double RvTemplateFeH = 103;
double RvAtmParamOrigin = 104;
double Vbroad = 105;
double VbroadError = 106;
double VbroadNbTransits = 107;
double GrvsMag = 108;
double GrvsMagError = 109;
double GrvsMagNbTransits = 110;
double RvsSpecSigToNoise = 111;
string PhotVariableFlag = 112;
double L = 113;
double B = 114;
double EclLon = 115;
double EclLat = 116;
int32 InQsoCandidates = 117;
int32 InGalaxyCandidates = 118;
int64 NonSingleStar = 119;
int32 HasXpContinuous = 120;
int32 HasXpSampled = 121;
int32 HasRvs = 122;
int32 HasEpochPhotometry = 123;
int32 HasEpochRv = 124;
int32 HasMcmcGspphot = 125;
int32 HasMcmcMsc = 126;
int32 InAndromedaSurvey = 127;
double ClassprobDscCombmodQuasar = 128;
double ClassprobDscCombmodGalaxy = 129;
double ClassprobDscCombmodStar = 130;
double TeffGspphot = 131;
double TeffGspphotLower = 132;
double TeffGspphotUpper = 133;
double LoggGspphot = 134;
double LoggGspphotLower = 135;
double LoggGspphotUpper = 136;
double MhGspphot = 137;
double MhGspphotLower = 138;
double MhGspphotUpper = 139;
double DistanceGspphot = 140;
double DistanceGspphotLower = 141;
double DistanceGspphotUpper = 142;
double AzeroGspphot = 143;
double AzeroGspphotLower = 144;
double AzeroGspphotUpper = 145;
double AgGspphot = 146;
double AgGspphotLower = 147;
double AgGspphotUpper = 148;
double EbpminrpGspphot = 149;
double EbpminrpGspphotLower = 150;
double EbpminrpGspphotUpper = 151;
string LibnameGspphot = 152;
int32 NS8HIdx = 153;
int32 NS16HIdx = 154;
int32 NS32HIdx = 155;
int32 NS64HIdx = 156;
int32 FileIdx = 157;
}
message EphemSearchRequest {
double ra = 1;
double dec = 2;
double radius = 3;
string columns = 4;
double minMag = 5;
double maxMag = 6;
int64 obstime = 7;
int64 limit = 8;
}
message Gaia3SearchResponse {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
bytes records = 4;
}
syntax = "proto3";
package common;
option go_package = "cnlab.net/csst/proto/common";
message Error {
int32 code = 1;
string detail = 2;
}
\ No newline at end of file
syntax = "proto3";
package dfs.jwt;
option go_package = "cnlab.net/csst/proto/common/auth";
import "common/error.proto";
service AuthSrv {
rpc MakeAccessToken (Request) returns (Response) {
}
rpc DelUserAccessToken (Request) returns (Response) {
}
rpc GetCachedAccessToken (Request) returns (Response) {
}
}
message Request {
int64 userId = 1;
string userName = 2;
string token = 3;
}
message Response {
bool success = 1;
common.Error error = 2;
string token = 3;
}
\ No newline at end of file
syntax = "proto3";
package dfs.common.misc;
option go_package = "cnlab.net/csst/proto/common/misc";
service MiscSrv {
rpc GetSeqId(GetSeqIdReq) returns (GetSeqIdResp) {}
}
message GetSeqIdReq {
string prefix = 1;
}
message GetSeqIdResp {
int64 nextId = 1;
}
syntax = "proto3";
package dfs.common.oauth2;
option go_package = "cnlab.net/csst/proto/common/oauth2";
service Oauth2 {
rpc Authorize(AuthorizeRequest) returns (AuthorizeResponse) {}
rpc Token(TokenRequest) returns (TokenResponse) {}
rpc Revoke(RevokeRequest) returns (RevokeResponse) {}
rpc Introspect(IntrospectRequest) returns (IntrospectResponse) {}
}
message Token {
string access_token = 1;
string token_type = 2;
string refresh_token = 3;
int64 expires_at = 4;
repeated string scopes = 5;
// metadata associated with the token
map<string,string> metadata = 6;
}
message AuthorizeRequest {
// code, token (not supported)
string response_type = 1;
string client_id = 2;
repeated string scopes = 3;
string state = 4;
string redirect_uri = 5;
}
message AuthorizeResponse {
string code = 1;
string state = 2;
// implicit response
Token token = 3;
}
message TokenRequest {
string client_id = 1;
string client_secret = 2;
string code = 3;
// password (not supported), client_credentials, authorization_code, refresh_token
string grant_type = 4;
string redirect_uri = 5;
string refresh_token = 6;
// scopes can be added for client_credentials request
repeated string scopes = 7;
// metadata to be stored with a token that's generated
map<string, string> metadata = 8;
}
message TokenResponse {
Token token = 1;
}
message RevokeRequest {
// revoke access token
string access_token = 1;
// revoke via refresh token
string refresh_token = 2;
}
message RevokeResponse {
}
message IntrospectRequest {
string access_token = 1;
}
message IntrospectResponse {
Token token = 1;
bool active = 2;
}
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;
}
\ No newline at end of file
syntax = "proto3";
package dfs.facility.calmerge;
option go_package = "cnlab.net/csst/proto/facility/calmerge";
import "common/error.proto";
service CalMergeSrv {
rpc Find(FindCalMergeReq) returns (FindCalMergeResp) {}
rpc GetLatestByL0(GetLatestByL0Req) returns (GetLatestByL0Resp) {}
rpc Get(GetCalMergeReq) returns (GetCalMergeResp) {}
rpc Write(WriteCalMergeReq) returns (WriteCalMergeResp) {}
rpc UpdateQc1Status(UpdateQc1StatusReq) returns (UpdateQc1StatusResp) {}
rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
}
message CalMergeRecord {
int64 id = 1;
string cal_id = 2;
string detector_no = 3;
string ref_type = 4;
string obs_time = 5;
float exp_time = 6;
string filename = 7;
string file_path = 8;
int32 qc1_status = 9;
string qc1_time = 10;
int32 prc_status = 11;
string prc_time = 12;
string create_time = 13;
repeated string level0_ids = 14;
}
message FindCalMergeReq {
string detector_no = 1;
string ref_type = 2;
string exp_time_start = 3;
string exp_time_end = 4;
int32 qc1_status = 5;
int32 prc_status = 6;
string file_name = 7;
int32 limit = 8;
map<string,string> other_conditions = 9;
}
message FindCalMergeResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated CalMergeRecord records = 4;
}
message GetLatestByL0Req {
string level0_id = 1;
string ref_type = 2;
}
message GetLatestByL0Resp {
CalMergeRecord record = 3;
}
message GetCalMergeReq {
int64 id = 1;
string cal_id = 2;
}
message GetCalMergeResp {
CalMergeRecord record = 1;
}
message WriteCalMergeReq {
CalMergeRecord record = 1;
}
message WriteCalMergeResp {
bool success = 1;
common.Error error = 2;
CalMergeRecord record = 3;
}
message UpdateQc1StatusReq {
int64 id = 1;
string cal_id = 2;
int32 status = 3;
}
message UpdateQc1StatusResp {
bool success = 1;
common.Error error = 2;
}
message UpdateProcStatusReq {
int64 id = 1;
string cal_id = 2;
int32 status = 3;
}
message UpdateProcStatusResp {
bool success = 1;
common.Error error = 2;
}
syntax = "proto3";
package dfs.facility.detector;
option go_package = "cnlab.net/csst/proto/facility/detector";
import "common/error.proto";
service DetectorSrv {
rpc Find(FindDetectorReq) returns (FindDetectorResp) {}
rpc Get(GetDetectorReq) returns (GetDetectorResp) {}
rpc Write(WriteDetectorReq) returns (WriteDetectorResp) {}
rpc Update(UpdateDetectorReq) returns (UpdateDetectorResp) {}
rpc Delete(DeleteDetectorReq) returns (DeleteDetectorResp) {}
rpc FindStatus(FindStatusReq) returns (FindStatusResp) {}
rpc GetStatus(GetStatusReq) returns (GetStatusResp) {}
rpc WriteStatus(WriteStatusReq) returns (WriteStatusResp) {}
}
message Detector {
string no = 1;
string detector_name = 2;
string module_id = 3;
string filter_id = 4;
string create_time = 5;
string update_time = 6;
}
message DetectorStatus {
int64 id = 1;
string detector_no = 2;
string status = 3;
string status_time = 4;
string create_time = 5;
}
message FindDetectorReq {
string module_id = 1;
string key = 2;
}
message FindDetectorResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Detector records = 4;
}
message GetDetectorReq {
string no = 1;
}
message GetDetectorResp {
Detector record = 1;
}
message WriteDetectorReq {
Detector record = 1;
}
message WriteDetectorResp {
bool success = 1;
common.Error error = 2;
Detector record = 3;
}
message UpdateDetectorReq {
Detector record = 3;
}
message UpdateDetectorResp {
bool success = 1;
common.Error error = 2;
}
message DeleteDetectorReq {
string no = 1;
}
message DeleteDetectorResp {
bool success = 1;
common.Error error = 2;
}
message FindStatusReq {
string detector_no = 1;
string status_begin_time = 2;
string status_end_time = 3;
int32 limit = 4;
}
message FindStatusResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated DetectorStatus records = 4;
}
message GetStatusReq {
int64 id = 1;
}
message GetStatusResp {
DetectorStatus record = 1;
}
message WriteStatusReq {
DetectorStatus record = 1;
}
message WriteStatusResp {
bool success = 1;
common.Error error = 2;
DetectorStatus record = 3;
}
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;
}
syntax = "proto3";
package dfs.facility.level0prc;
option go_package = "cnlab.net/csst/proto/facility/level0prc";
import "common/error.proto";
service Level0PrcSrv {
rpc Find(FindLevel0PrcReq) returns (FindLevel0PrcResp) {}
rpc Write(WriteLevel0PrcReq) returns (WriteLevel0PrcResp) {}
rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
}
message Level0PrcRecord {
int64 id = 1;
string level0_id = 2;
string pipeline_id = 3;
string prc_module = 4;
string params_file_path = 5;
int32 prc_status = 6;
string prc_time = 7;
string result_file_path = 8;
}
message FindLevel0PrcReq {
string level0_id = 1;
string pipeline_id = 2;
string prc_module = 3;
int32 prc_status = 4;
map<string,string> other_conditions = 5;
}
message FindLevel0PrcResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Level0PrcRecord records = 4;
}
message WriteLevel0PrcReq {
Level0PrcRecord record = 1;
}
message WriteLevel0PrcResp {
bool success = 1;
common.Error error = 2;
Level0PrcRecord record = 3;
}
message UpdateProcStatusReq {
int64 id = 1;
int32 status = 2;
}
message UpdateProcStatusResp {
bool success = 1;
common.Error error = 2;
}
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;
}
syntax = "proto3";
package dfs.facility.level1prc;
option go_package = "cnlab.net/csst/proto/facility/level1prc";
import "common/error.proto";
service Level1PrcSrv {
rpc Find(FindLevel1PrcReq) returns (FindLevel1PrcResp) {}
rpc Write(WriteLevel1PrcReq) returns (WriteLevel1PrcResp) {}
rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
}
message Level1PrcRecord {
int64 id = 1;
int64 level1_id = 2;
string pipeline_id = 3;
string prc_module = 4;
string params_file_path = 5;
int32 prc_status = 6;
string prc_time = 7;
string result_file_path = 8;
}
message FindLevel1PrcReq {
int64 level1_id = 1;
string pipeline_id = 2;
string prc_module = 3;
int32 prc_status = 4;
map<string,string> other_conditions = 5;
}
message FindLevel1PrcResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Level1PrcRecord records = 4;
}
message WriteLevel1PrcReq {
Level1PrcRecord record = 1;
}
message WriteLevel1PrcResp {
bool success = 1;
common.Error error = 2;
Level1PrcRecord record = 3;
}
message UpdateProcStatusReq {
int64 id = 1;
int32 status = 2;
}
message UpdateProcStatusResp {
bool success = 1;
common.Error error = 2;
}
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;
}
\ No newline at end of file
syntax = "proto3";
package dfs.facility.level2producer;
option go_package = "cnlab.net/csst/proto/facility/level2producer";
import "common/error.proto";
service Level2ProducerSrv {
rpc Register(RegisterReq) returns (RegisterResp) {}
rpc Find(FindReq) returns (FindResp) {}
rpc FindNexts(FindNextsReq) returns (FindNextsResp) {}
rpc FindStart(FindStartReq) returns (FindStartResp) {}
rpc Get(GetReq) returns (GetResp) {}
rpc Update(UpdateReq) returns (UpdateResp) {}
rpc Delete(DeleteReq) returns (DeleteResp) {}
rpc NewJob(NewJobReq) returns (NewJobResp) {}
rpc GetJob(GetJobReq) returns (GetJobResp) {}
rpc UpdateJob(UpdateJobReq) returns (UpdateJobResp) {}
rpc WriteRunning(WriteRunningReq) returns (WriteRunningResp) {}
rpc GetRunning(GetRunningReq) returns (GetRunningResp) {}
rpc UpdateRunning(UpdateRunningReq) returns (UpdateRunningResp) {}
rpc FindRunning(FindRunningReq) returns (FindRunningResp) {}
}
message Level2ProducerRecord {
int64 id = 1;
string name = 2;
string gitlink = 3;
string paramfiles = 4;
string image = 5;
int32 priority = 6;
repeated int64 pre_producers = 7;
string create_time = 8;
string update_time = 9;
}
message Level2JobRecord {
int64 id = 1;
string name = 2;
string dag = 3;
int32 status = 4;
string create_time = 5;
string update_time = 6;
}
message Level2ProducerRuningRecord {
int64 id = 1;
int64 job_id = 2;
int64 producer_id = 3;
int64 brick_id = 4;
string start_time = 5;
string end_time = 6;
int32 prc_status = 7;
string prc_result = 8;
string create_time = 9;
string update_time = 10;
}
message RegisterReq {
Level2ProducerRecord record = 1;
}
message RegisterResp {
bool success = 1;
common.Error error = 2;
Level2ProducerRecord record = 3;
}
message FindReq {
string key = 1;
int32 limit = 2;
}
message FindResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Level2ProducerRecord records = 4;
}
message FindStartReq {
string key = 1;
}
message FindStartResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Level2ProducerRecord records = 4;
}
message FindNextsReq {
int64 id = 1;
}
message FindNextsResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Level2ProducerRecord records = 4;
}
message GetReq {
int64 id = 1;
}
message GetResp {
Level2ProducerRecord record = 1;
}
message UpdateReq {
Level2ProducerRecord record = 1;
}
message UpdateResp {
bool success = 1;
common.Error error = 2;
}
message DeleteReq {
int64 id = 1;
}
message DeleteResp {
bool success = 1;
common.Error error = 2;
}
message NewJobReq {
Level2JobRecord record = 1;
}
message NewJobResp {
bool success = 1;
common.Error error = 2;
Level2JobRecord record = 3;
}
message GetJobReq {
int64 id = 1;
}
message GetJobResp {
Level2JobRecord record = 1;
}
message UpdateJobReq {
Level2JobRecord record = 1;
}
message UpdateJobResp {
bool success = 1;
common.Error error = 2;
}
message WriteRunningReq {
Level2ProducerRuningRecord record = 1;
}
message WriteRunningResp {
bool success = 1;
common.Error error = 2;
Level2ProducerRuningRecord record = 3;
}
message GetRunningReq {
int64 id = 1;
}
message GetRunningResp {
Level2ProducerRuningRecord record = 1;
}
message UpdateRunningReq {
Level2ProducerRuningRecord record = 1;
}
message UpdateRunningResp {
bool success = 1;
common.Error error = 2;
}
message FindRunningReq {
int64 job_id = 1;
int64 producer_id = 2;
int64 brick_id = 3;
int32 prc_status = 4;
string start_time = 5;
string end_time = 6;
int32 limit = 7;
}
message FindRunningResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Level2ProducerRuningRecord records = 4;
}
syntax = "proto3";
package dfs.facility.level2Type;
option go_package = "cnlab.net/csst/proto/facility/level2Type";
import "common/error.proto";
service Level2TypeSrv {
rpc Find(FindLevel2TypeReq) returns (FindLevel2TypeResp) {}
rpc Get(GetLevel2TypeReq) returns (GetLevel2TypeResp) {}
rpc Write(stream WriteLevel2TypeReq) returns (WriteLevel2TypeResp) {}
rpc UpdateImportStatus(UpdateImportStatusReq) returns (UpdateImportStatusResp) {}
}
message Level2TypeRecord {
string data_type = 1;
string module_id = 2;
string key_column = 3;
int32 hdu_index = 4;
string demo_filename = 5;
string demo_file_path = 6;
string ra_column = 7;
string dec_column = 8;
string update_time = 9;
string create_time = 10;
int32 import_status = 11;
}
message FindLevel2TypeReq {
string module_id = 1;
string data_type = 2;
int32 import_status = 3;
int32 page = 4;
int32 limit = 5;
}
message FindLevel2TypeResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Level2TypeRecord records = 4;
}
message GetLevel2TypeReq {
string data_type = 1;
}
message GetLevel2TypeResp {
Level2TypeRecord record = 1;
}
message WriteLevel2TypeReq {
Level2TypeRecord record = 1;
bytes data = 2;
}
message WriteLevel2TypeResp {
bool success = 1;
common.Error error = 2;
Level2TypeRecord record = 3;
}
message UpdateImportStatusReq {
string data_type = 1;
int32 status = 2;
}
message UpdateImportStatusResp {
bool success = 1;
common.Error error = 2;
}
\ No newline at end of file
syntax = "proto3";
package dfs.facility.observation;
option go_package = "cnlab.net/csst/proto/facility/observation";
import "common/error.proto";
service ObservationSrv {
rpc Find(FindObservationReq) returns (FindObservationResp) {}
rpc Get(GetObservationReq) returns (GetObservationResp) {}
rpc Write(WriteObservationReq) returns (WriteObservationResp) {}
rpc UpdateQc0Status(UpdateQc0StatusReq) returns (UpdateQc0StatusResp) {}
rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
}
message Observation {
int64 id = 1;
string obs_id = 2;
string obs_time = 3;
float exp_time = 4;
string module_id = 5;
string obs_type = 6;
int64 facility_status_id = 7;
int64 module_status_id = 8;
int32 qc0_status = 9;
string qc0_time = 10;
int32 prc_status = 11;
string prc_time = 12;
string create_time = 13;
int32 import_status = 14;
}
message FindObservationReq {
string module_id = 1;
string obs_type = 2;
string exp_time_start = 3;
string exp_time_end = 4;
int32 qc0_status = 5;
int32 prc_status = 6;
int32 limit = 7;
map<string,string> other_conditions = 8;
}
message FindObservationResp {
bool success = 1;
int32 totalCount = 2;
common.Error error = 3;
repeated Observation records = 4;
}
message GetObservationReq {
int64 id = 1;
string obs_id = 2;
}
message GetObservationResp {
Observation observation = 1;
}
message WriteObservationReq {
Observation record = 1;
}
message WriteObservationResp {
bool success = 1;
common.Error error = 2;
Observation record = 3;
}
message UpdateQc0StatusReq {
int64 id = 1;
string obs_id = 2;
int32 status = 3;
}
message UpdateQc0StatusResp {
bool success = 1;
common.Error error = 2;
}
message UpdateProcStatusReq {
int64 id = 1;
string obs_id = 2;
int32 status = 3;
}
message UpdateProcStatusResp {
bool success = 1;
common.Error error = 2;
}
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;
}
syntax = "proto3";
package dfs.hstdm.level2;
option go_package = "cnlab.net/csst/proto/hstdm/level2";
import "common/error.proto";
service Level2Srv {
rpc Find(FindLevel2Req) returns (FindLevel2Resp) {}
rpc Get(GetLevel2Req) returns (GetLevel2Resp) {}
rpc Write(stream WriteLevel2Req) returns (WriteLevel2Resp) {}
rpc UpdateQc2Status(UpdateQc2StatusReq) returns (UpdateQc2StatusResp) {}
rpc UpdateProcStatus(UpdateProcStatusReq) returns (UpdateProcStatusResp) {}
}
message Level2Record {
int64 id = 1;
string level0_id = 2;
int64 level1_id = 3;
int64 project_id = 4;
string file_type = 5;
string filename = 6;
string file_path = 7;
int32 qc2_status = 8;
string qc2_time = 9;
int32 prc_status = 10;
string prc_time = 11;
string create_time = 12;
string pipeline_id = 13;
}
message FindLevel2Req {
string level0_id = 1;
int64 level1_id = 2;
int64 project_id = 3;
int64 file_type = 4;
string create_time_start = 5;
string create_time_end = 6;
int32 qc2_status = 7;
int32 prc_status = 8;
string filename = 9;
int32 limit = 10;
map<string,string> other_conditions = 11;
}
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;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment