2019-01-24 01:20:33 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2019-07-06 01:11:33 +03:00
|
|
|
package github.semantic;
|
2019-01-24 01:20:33 +03:00
|
|
|
|
2019-07-06 01:11:33 +03:00
|
|
|
option ruby_package = "Semantic::Proto";
|
2019-01-24 01:20:33 +03:00
|
|
|
|
2019-07-06 01:34:35 +03:00
|
|
|
message PingRequest {
|
|
|
|
string service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PingResponse {
|
|
|
|
string status = 1;
|
|
|
|
string hostname = 2;
|
|
|
|
string timestamp = 3;
|
|
|
|
string sha = 4;
|
|
|
|
}
|
|
|
|
|
2019-01-24 01:20:33 +03:00
|
|
|
message ParseTreeRequest {
|
|
|
|
repeated Blob blobs = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ParseTreeSymbolResponse {
|
|
|
|
repeated File files = 1;
|
|
|
|
}
|
|
|
|
|
2019-01-24 01:53:29 +03:00
|
|
|
message ParseTreeGraphResponse {
|
2019-02-05 22:16:21 +03:00
|
|
|
repeated ParseTreeFileGraph files = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ParseTreeFileGraph {
|
|
|
|
string path = 1;
|
2019-03-11 23:21:27 +03:00
|
|
|
string language = 2;
|
2019-02-05 22:16:21 +03:00
|
|
|
repeated TermVertex vertices = 3;
|
|
|
|
repeated TermEdge edges = 4;
|
|
|
|
repeated ParseError errors = 5;
|
2019-01-24 01:53:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message TermEdge {
|
2019-03-11 23:11:19 +03:00
|
|
|
int32 source = 1;
|
|
|
|
int32 target = 2;
|
2019-01-24 01:53:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message TermVertex {
|
2019-03-11 23:11:19 +03:00
|
|
|
int32 vertex_id = 1;
|
2019-01-25 21:12:12 +03:00
|
|
|
string term = 2;
|
2019-01-24 01:53:29 +03:00
|
|
|
Span span = 3;
|
|
|
|
}
|
|
|
|
|
2019-02-05 21:05:10 +03:00
|
|
|
message ParseError {
|
2019-02-05 22:16:21 +03:00
|
|
|
string error = 1;
|
2019-01-24 03:06:29 +03:00
|
|
|
}
|
|
|
|
|
2019-01-24 01:20:33 +03:00
|
|
|
message DiffTreeRequest {
|
|
|
|
repeated BlobPair blobs = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiffTreeTOCResponse {
|
|
|
|
repeated TOCSummaryFile files = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TOCSummaryFile {
|
2019-01-24 20:17:07 +03:00
|
|
|
string path = 1;
|
2019-03-11 23:21:27 +03:00
|
|
|
string language = 2;
|
2019-01-24 20:17:07 +03:00
|
|
|
repeated TOCSummaryChange changes = 3;
|
|
|
|
repeated TOCSummaryError errors = 4;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message TOCSummaryChange {
|
|
|
|
string category = 1;
|
|
|
|
string term = 2;
|
|
|
|
Span span = 3;
|
2019-02-09 00:52:34 +03:00
|
|
|
ChangeType change_type = 4;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message TOCSummaryError {
|
|
|
|
string error = 1;
|
|
|
|
Span span = 2;
|
|
|
|
}
|
|
|
|
|
2019-01-24 23:53:30 +03:00
|
|
|
enum ChangeType {
|
|
|
|
NONE = 0;
|
|
|
|
ADDED = 1;
|
|
|
|
REMOVED = 2;
|
|
|
|
MODIFIED = 3;
|
|
|
|
}
|
|
|
|
|
2019-01-24 01:20:33 +03:00
|
|
|
message DiffTreeGraphResponse {
|
2019-02-05 22:16:21 +03:00
|
|
|
repeated DiffTreeFileGraph files = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiffTreeFileGraph {
|
|
|
|
string path = 1;
|
2019-03-11 23:21:27 +03:00
|
|
|
string language = 2;
|
2019-02-05 22:16:21 +03:00
|
|
|
repeated DiffTreeVertex vertices = 3;
|
|
|
|
repeated DiffTreeEdge edges = 4;
|
|
|
|
repeated ParseError errors = 5;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message DiffTreeEdge {
|
2019-03-11 23:11:19 +03:00
|
|
|
int32 source = 1;
|
|
|
|
int32 target = 2;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message DiffTreeVertex {
|
2019-03-11 23:11:19 +03:00
|
|
|
int32 diff_vertex_id = 1;
|
2019-02-09 00:52:34 +03:00
|
|
|
oneof diff_term {
|
|
|
|
DeletedTerm deleted = 2;
|
|
|
|
InsertedTerm inserted = 3;
|
|
|
|
ReplacedTerm replaced = 4;
|
|
|
|
MergedTerm merged = 5;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeletedTerm {
|
2019-01-24 23:53:30 +03:00
|
|
|
string term = 1;
|
|
|
|
Span span = 2;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message InsertedTerm {
|
2019-01-24 23:53:30 +03:00
|
|
|
string term = 1;
|
|
|
|
Span span = 2;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ReplacedTerm {
|
2019-02-09 00:52:34 +03:00
|
|
|
string before_term = 1;
|
|
|
|
Span before_span = 2;
|
|
|
|
string after_term = 3;
|
|
|
|
Span after_span = 4;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message MergedTerm {
|
2019-01-24 23:53:30 +03:00
|
|
|
string term = 1;
|
2019-02-09 00:52:34 +03:00
|
|
|
Span before_span = 2;
|
|
|
|
Span after_span = 3;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Blob {
|
2019-01-29 01:37:50 +03:00
|
|
|
string content = 1;
|
|
|
|
string path = 2;
|
2019-03-11 23:21:27 +03:00
|
|
|
string language = 3;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message BlobPair {
|
|
|
|
Blob before = 1;
|
|
|
|
Blob after = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message File {
|
2019-01-24 20:17:07 +03:00
|
|
|
string path = 1;
|
2019-03-11 23:21:27 +03:00
|
|
|
string language = 2;
|
2019-01-24 20:17:07 +03:00
|
|
|
repeated Symbol symbols = 3;
|
2019-02-05 22:16:21 +03:00
|
|
|
repeated ParseError errors = 4;
|
2019-04-13 01:48:49 +03:00
|
|
|
string blob_oid = 5;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Symbol {
|
2019-01-24 20:17:07 +03:00
|
|
|
string symbol = 1;
|
|
|
|
string kind = 2;
|
|
|
|
string line = 3;
|
|
|
|
Span span = 4;
|
2019-02-19 21:55:24 +03:00
|
|
|
Docstring docs = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Docstring {
|
|
|
|
string docstring = 1;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Position {
|
2019-03-11 23:11:19 +03:00
|
|
|
int32 line = 1;
|
|
|
|
int32 column = 2;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Span {
|
|
|
|
Position start = 1;
|
|
|
|
Position end = 2;
|
|
|
|
}
|