1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00
semantic/semantic.proto
2018-06-01 18:25:29 -04:00

64 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
import "types.proto";
package semantic;
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
}
ServingStatus status = 1;
}
service SemanticAPI {
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
rpc FetchSummaries (SummariesRequest) returns (SummariesResponse) {}
rpc ParseBlobs (ParseRequest) returns (ParseResponse) {}
rpc ParseRawBlobs (ParseRequest) returns (RawParseResponse) {}
}
message SummariesRequest {
repeated BlobPair blobPairs = 1;
}
message ParseRequest {
repeated Blob source = 1;
}
message BlobPair {
Blob before = 1;
Blob after = 2;
}
message SummariesResponse {
repeated Summary changes = 1;
repeated SummaryError errors = 2;
}
message ParseResponse {
bytes json_tree = 1;
repeated SummaryError errors = 2;
}
message RawParseResponse {
repeated Term terms = 1;
}
message Summary {
string categoryName = 1;
string termName = 2;
Span span = 3;
string changeType = 4;
}
message SummaryError {
string error = 1;
Span span = 2;
string language = 3;
}