87 lines
1.7 KiB
Protocol Buffer
87 lines
1.7 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
||
|
|
|
||
|
|
package queryorchestration;
|
||
|
|
|
||
|
|
import "google/protobuf/empty.proto";
|
||
|
|
|
||
|
|
option go_package = "./serviceinterfaces";
|
||
|
|
|
||
|
|
service QueryService {
|
||
|
|
rpc List(QueryFilter) returns (Queries);
|
||
|
|
rpc Get(IdMessage) returns (Query);
|
||
|
|
rpc Create(QueryCreate) returns (IdMessage);
|
||
|
|
rpc Update(QueryUpdate) returns (google.protobuf.Empty);
|
||
|
|
rpc Deprecate(IdMessage) returns (google.protobuf.Empty);
|
||
|
|
rpc Test(QueryTestRequest) returns (QueryTestResponse);
|
||
|
|
}
|
||
|
|
|
||
|
|
message QueryTestRequest {
|
||
|
|
string query_id = 1;
|
||
|
|
string document_id = 2;
|
||
|
|
int32 query_version = 3;
|
||
|
|
}
|
||
|
|
|
||
|
|
message QueryTestResponse {
|
||
|
|
string value = 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
enum QueryType {
|
||
|
|
QUERY_TYPE_UNSPECIFIED = 0;
|
||
|
|
QUERY_TYPE_JSON_EXTRACTOR = 1;
|
||
|
|
QUERY_TYPE_CONTEXT_FULL = 2;
|
||
|
|
}
|
||
|
|
|
||
|
|
message Query {
|
||
|
|
string id = 1;
|
||
|
|
QueryType type = 2;
|
||
|
|
int32 active_version = 3;
|
||
|
|
int32 latest_version = 4;
|
||
|
|
optional string config = 5;
|
||
|
|
repeated string required_queries = 6;
|
||
|
|
}
|
||
|
|
|
||
|
|
message QueryFilter {
|
||
|
|
repeated QueryType types = 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
message QueryCreate {
|
||
|
|
QueryType type = 1;
|
||
|
|
optional string config = 2;
|
||
|
|
repeated string required_queries = 3;
|
||
|
|
}
|
||
|
|
|
||
|
|
message QueryUpdate {
|
||
|
|
string id = 1;
|
||
|
|
optional string config = 2;
|
||
|
|
optional int32 active_version = 3;
|
||
|
|
repeated string required_queries = 4;
|
||
|
|
}
|
||
|
|
|
||
|
|
message Queries {
|
||
|
|
repeated Query queries = 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
service JobCollectorService {
|
||
|
|
rpc Create(JobCollectorCreate) returns (IdMessage);
|
||
|
|
rpc Update(JobCollectorUpdate) returns (google.protobuf.Empty);
|
||
|
|
rpc Get(IdMessage) returns (JobCollector);
|
||
|
|
}
|
||
|
|
|
||
|
|
message JobCollector {
|
||
|
|
}
|
||
|
|
message JobCollectorCreate {
|
||
|
|
}
|
||
|
|
message JobCollectorUpdate {
|
||
|
|
}
|
||
|
|
|
||
|
|
service ExportService {
|
||
|
|
rpc Trigger(ExportTrigger) returns (IdMessage);
|
||
|
|
}
|
||
|
|
|
||
|
|
message ExportTrigger {
|
||
|
|
}
|
||
|
|
|
||
|
|
message IdMessage {
|
||
|
|
string id = 1;
|
||
|
|
}
|