syntax = "proto3"; package dfs.msc.level2; option go_package = "cnlab.net/csst/proto/msc/level2"; import "common/error.proto"; service Level2Srv { rpc Find(FindLevel2Req) returns (FindLevel2Resp) {} rpc FindCatalog(FindLevel2CatalogReq) returns (stream FindLevel2CatalogResp) {} rpc FindCatalogFile(FindLevel2CatalogReq) returns (FindCatalogFileResp) {} 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 DeleteCatalogByLevel2Id(DeleteCatalogByLevel2IdReq) returns (DeleteCatalogByLevel2IdResp) {} } message Level2Record { int64 id = 1; string level0_id = 2; int64 level1_id = 3; string data_type = 4; string filename = 5; string file_path = 6; string obs_time = 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; int32 import_status = 14; } message FindLevel2Req { string level0_id = 1; int64 level1_id = 2; string data_type = 3; string create_time_start = 4; string create_time_end = 5; int32 qc2_status = 6; int32 prc_status = 7; string filename = 8; int32 limit = 9; map other_conditions = 10; } 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 FindExistedBricksReq { } message FindExistedBricksResp { bool success = 1; common.Error error = 2; repeated int32 brick_ids = 3; } 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 Level2CatalogRecord { int64 level2_id = 1; int64 ID = 2; int32 CCDNO = 3; int32 objID = 4; float X = 5; double XErr = 6; float Y = 7; double YErr = 8; double RA = 9; double RAErr = 10; double DEC = 11; double DECErr = 12; float A = 13; float AErr = 14; float B = 15; float BErr = 16; float PA = 17; float PAErr = 18; int32 Flag = 19; int32 Flag_ISO = 20; int32 Flag_ISO_Num = 21; float FWHM = 22; float AB = 23; float E = 24; double Flux_Kron = 25; float FluxErr_Kron = 26; double Mag_Kron = 27; double MagErr_Kron = 28; double Radius_Kron = 29; float Sky = 30; float Flux_Aper1 = 31; float FluxErr_Aper1 = 32; float Mag_Aper1 = 33; float MagErr_Aper1 = 34; float Flux_Aper2 = 35; float FluxErr_Aper2 = 36; float Mag_Aper2 = 37; float MagErr_Aper2 = 38; float Flux_Aper3 = 39; float FluxErr_Aper3 = 40; float Mag_Aper3 = 41; float MagErr_Aper3 = 42; float Flux_Aper4 = 43; float FluxErr_Aper4 = 44; float Mag_Aper4 = 45; float MagErr_Aper4 = 46; float Flux_Aper5 = 47; float FluxErr_Aper5 = 48; float Mag_Aper5 = 49; float MagErr_Aper5 = 50; float Flux_Aper6 = 51; float FluxErr_Aper6 = 52; float Mag_Aper6 = 53; float MagErr_Aper6 = 54; float Flux_Aper7 = 55; float FluxErr_Aper7 = 56; float Mag_Aper7 = 57; float MagErr_Aper7 = 58; float Flux_Aper8 = 59; float FluxErr_Aper8 = 60; float Mag_Aper8 = 61; float MagErr_Aper8 = 62; float Flux_Aper9 = 63; float FluxErr_Aper9 = 64; float Mag_Aper9 = 65; float MagErr_Aper9 = 66; float Flux_Aper10 = 67; float FluxErr_Aper10 = 68; float Mag_Aper10 = 69; float MagErr_Aper10 = 70; float Flux_Aper11 = 71; float FluxErr_Aper11 = 72; float Mag_Aper11 = 73; float MagErr_Aper11 = 74; float Flux_Aper12 = 75; float FluxErr_Aper12 = 76; float Mag_Aper12 = 77; float MagErr_Aper12 = 78; int32 Type = 79; float R20 = 80; float R50 = 81; float R90 = 82; double X_PSF = 83; double Y_PSF = 84; double RA_PSF = 85; double DEC_PSF = 86; float Chi2_PSF = 87; float Flux_PSF = 88; float FluxErr_PSF = 89; float Mag_PSF = 90; float MagErr_PSF = 91; double X_Model = 92; double Y_Model = 93; double RA_Model = 94; double DEC_Model = 95; float Chi2_Model = 96; int32 Flag_Model = 97; float Flux_Model = 98; float FluxErr_Model = 99; float Mag_Model = 100; float MagErr_Model = 101; float Flux_Bulge = 102; float FluxErr_Bulge = 103; float Mag_Bulge = 104; float MagErr_Bulge = 105; float Re_Bulge = 106; float ReErr_Bulge = 107; float E_Bulge = 108; float EErr_Bulge = 109; float PA_Bulge = 110; float PAErr_Bulge = 111; float Flux_Disk = 112; float FluxErr_Disk = 113; float Mag_Disk = 114; float MagErr_Disk = 115; float Re_Disk = 116; float ReErr_Disk = 117; float E_Disk = 118; float EErr_Disk = 119; float PA_Disk = 120; float PAErr_Disk = 121; float Ratio_Disk = 122; float RatioErr_Disk = 123; float Spread_Model = 124; float SpreadErr_Model = 125; int32 Brick_Id = 126; } message FindLevel2CatalogReq { string brick_ids = 1; string obs_id = 2; string detector_no = 3; string filter = 4; double ra = 5; double dec = 6; double radius = 7; double minMag = 8; double maxMag = 9; string obs_time_start = 10; string obs_time_end = 11; int32 limit = 12; string columns = 13; } message FindLevel2CatalogResp { bool success = 1; int32 totalCount = 2; common.Error error = 3; bytes records = 4; } message FindCatalogFileResp { bool success = 1; int32 totalCount = 2; common.Error error = 3; repeated Level2Record records = 4; } message DeleteCatalogByLevel2IdReq { int64 level2_id = 1; } message DeleteCatalogByLevel2IdResp { bool success = 1; common.Error error = 2; }