feat: init
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package gitks;
|
||||
|
||||
import "oid.proto";
|
||||
import "repository.proto";
|
||||
|
||||
message GitProtocolFeatures {
|
||||
uint32 version = 1;
|
||||
repeated string capabilities = 2;
|
||||
repeated string server_options = 3;
|
||||
repeated string agent = 4;
|
||||
}
|
||||
|
||||
message ReferenceAdvertisement {
|
||||
string name = 1;
|
||||
Oid target_oid = 2;
|
||||
Oid peeled_oid = 3;
|
||||
bool symbolic = 4;
|
||||
string symbolic_target = 5;
|
||||
}
|
||||
|
||||
message AdvertiseRefsRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
GitProtocolFeatures protocol = 2;
|
||||
string service = 3;
|
||||
}
|
||||
|
||||
message AdvertiseRefsResponse {
|
||||
repeated ReferenceAdvertisement references = 1;
|
||||
repeated string capabilities = 2;
|
||||
}
|
||||
|
||||
message UploadPackRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
GitProtocolFeatures protocol = 2;
|
||||
bytes packet = 3;
|
||||
bool done = 4;
|
||||
}
|
||||
|
||||
message UploadPackResponse {
|
||||
bytes packet = 1;
|
||||
string stderr = 2;
|
||||
}
|
||||
|
||||
message ReceivePackRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
GitProtocolFeatures protocol = 2;
|
||||
bytes packet = 3;
|
||||
bool done = 4;
|
||||
}
|
||||
|
||||
message ReceivePackResponse {
|
||||
bytes packet = 1;
|
||||
string stderr = 2;
|
||||
}
|
||||
|
||||
message PackObjectsOptions {
|
||||
repeated Oid wants = 1;
|
||||
repeated Oid haves = 2;
|
||||
repeated string shallow_revisions = 3;
|
||||
uint32 deepen = 4;
|
||||
bool thin_pack = 5;
|
||||
bool include_tag = 6;
|
||||
bool use_bitmaps = 7;
|
||||
bool delta_base_offset = 8;
|
||||
repeated string pathspec = 9;
|
||||
}
|
||||
|
||||
message PackObjectsRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
PackObjectsOptions options = 2;
|
||||
}
|
||||
|
||||
message PackfileChunk {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
message IndexPackRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
bytes data = 2;
|
||||
bool done = 3;
|
||||
bool keep = 4;
|
||||
bool strict = 5;
|
||||
}
|
||||
|
||||
message IndexPackResponse {
|
||||
Oid pack_hash = 1;
|
||||
uint64 object_count = 2;
|
||||
string stderr = 3;
|
||||
}
|
||||
|
||||
message ListPackfilesRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
Pagination pagination = 2;
|
||||
}
|
||||
|
||||
message PackfileInfo {
|
||||
string name = 1;
|
||||
Oid pack_hash = 2;
|
||||
uint64 size_bytes = 3;
|
||||
uint64 index_size_bytes = 4;
|
||||
uint64 object_count = 5;
|
||||
bool has_bitmap = 6;
|
||||
bool has_rev_index = 7;
|
||||
bool kept = 8;
|
||||
}
|
||||
|
||||
message ListPackfilesResponse {
|
||||
repeated PackfileInfo packfiles = 1;
|
||||
PageInfo page_info = 2;
|
||||
}
|
||||
|
||||
message FsckRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
bool strict = 2;
|
||||
bool connectivity_only = 3;
|
||||
}
|
||||
|
||||
message FsckResponse {
|
||||
bool ok = 1;
|
||||
repeated string errors = 2;
|
||||
repeated string warnings = 3;
|
||||
}
|
||||
|
||||
service PackService {
|
||||
rpc AdvertiseRefs(AdvertiseRefsRequest) returns (AdvertiseRefsResponse);
|
||||
rpc UploadPack(stream UploadPackRequest) returns (stream UploadPackResponse);
|
||||
rpc ReceivePack(stream ReceivePackRequest) returns (stream ReceivePackResponse);
|
||||
rpc PackObjects(PackObjectsRequest) returns (stream PackfileChunk);
|
||||
rpc IndexPack(stream IndexPackRequest) returns (IndexPackResponse);
|
||||
rpc ListPackfiles(ListPackfilesRequest) returns (ListPackfilesResponse);
|
||||
rpc Fsck(FsckRequest) returns (FsckResponse);
|
||||
}
|
||||
Reference in New Issue
Block a user