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 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; }