Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
syntax = "proto3";
package pb;
service Watermark {
rpc Get (GetRequest) returns (GetReply) {}
rpc Watermark (WatermarkRequest) returns (WatermarkReply) {}
rpc Status (StatusRequest) returns (StatusReply) {}
rpc AddDocument (AddDocumentRequest) returns (AddDocumentReply) {}
rpc ServiceStatus (ServiceStatusRequest) returns (ServiceStatusReply) {}
}
message Document {
string content = 1;
string title = 2;
string author = 3;
string topic = 4;
string watermark = 5;
}
message GetRequest {
message Filters {
string key = 1;
string value = 2;
}
repeated Filters filters = 1;
}
message GetReply {
repeated Document documents = 1;
string Err = 2;
}
message StatusRequest {
string ticketID = 1;
}
message StatusReply {
enum Status {
PENDING = 0;
STARTED = 1;
IN_PROGRESS = 2;
FINISHED = 3;
FAILED = 4;
}
Status status = 1;
string Err = 2;
}
message WatermarkRequest {
string ticketID = 1;
string mark = 2;
}
message WatermarkReply {
int64 code = 1;
string err = 2;
}
message AddDocumentRequest {
Document document = 1;
}
message AddDocumentReply {
string ticketID = 1;
string err = 2;
}
message ServiceStatusRequest {}
message ServiceStatusReply {
int64 code = 1;
string err = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment