blob: 2584961534d5e2e36c805310e0210e09939233a5 [file] [log] [blame]
syntax = "proto3";
package depotview;
option go_package = "code.hackerspace.pl/hscloud/devtools/depotview/proto";
message ResolveRequest {
string ref = 1;
}
message ResolveResponse {
string hash = 1;
int64 last_checked = 2;
}
message StatRequest {
string hash = 1;
string path = 2;
}
message StatResponse {
enum Type {
TYPE_INVALID = 0;
TYPE_NOT_PRESENT = 1;
TYPE_FILE = 2;
TYPE_DIRECTORY = 3;
};
Type type = 1;
}
message ReadRequest {
string hash = 1;
string path = 2;
}
message ReadResponse {
// Chunk of data. Empty once everything has been sent over.
bytes data = 1;
}
service DepotView {
// Resolve a git branch/tag/ref... into a commit hash.
rpc Resolve(ResolveRequest) returns (ResolveResponse);
// Minimal file access API. It kinda stinks.
rpc Stat(StatRequest) returns (StatResponse);
rpc Read(ReadRequest) returns (stream ReadResponse);
}