1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00
semantic/semantic.proto

59 lines
1022 B
Protocol Buffer
Raw Normal View History

2018-05-21 21:01:27 +03:00
syntax = "proto3";
2018-05-31 01:04:07 +03:00
import "types.proto";
2018-05-21 21:01:27 +03:00
package semantic;
2018-05-21 21:25:42 +03:00
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
}
ServingStatus status = 1;
}
2018-05-21 21:01:27 +03:00
service SemanticAPI {
2018-05-21 21:25:42 +03:00
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
2018-05-21 21:01:27 +03:00
rpc FetchSummaries (SummariesRequest) returns (SummariesResponse) {}
rpc ParseBlobs (ParseRequest) returns (ParseResponse) {}
}
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 Error errors = 2;
}
message ParseResponse {
bytes json_tree = 1;
repeated Error errors = 2;
}
message Summary {
string categoryName = 1;
string termName = 2;
Span span = 3;
string changeType = 4;
}
message Error {
string error = 1;
Span span = 2;
string language = 3;
}