1000f8a80d
- Add gRPC service modules: auth, channel, channel settings, member, permission - Update protobuf definitions and generated code - Remove immediate/ real-time module (superseded by IM service) - Update etcd discovery and registration - Update cache, error, config, and build infrastructure - Add ADR documentation - Update OpenAPI spec
100 lines
2.1 KiB
Protocol Buffer
100 lines
2.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package gitks;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "oid.proto";
|
|
import "repository.proto";
|
|
|
|
|
|
message FindDefaultBranchNameRequest {
|
|
RepositoryHeader repository = 1;
|
|
}
|
|
|
|
message FindDefaultBranchNameResponse {
|
|
string name = 1;
|
|
}
|
|
|
|
message RefExistsRequest {
|
|
RepositoryHeader repository = 1;
|
|
string ref_name = 2;
|
|
}
|
|
|
|
message RefExistsResponse {
|
|
bool exists = 1;
|
|
}
|
|
|
|
|
|
message RefUpdateEntry {
|
|
string ref_name = 1;
|
|
string new_oid = 2;
|
|
string old_oid = 3; // expected old OID (empty = no check)
|
|
}
|
|
|
|
message UpdateReferencesRequest {
|
|
RepositoryHeader repository = 1;
|
|
repeated RefUpdateEntry updates = 2;
|
|
}
|
|
|
|
message UpdateReferencesResponse {
|
|
repeated string failed_refs = 1;
|
|
string error = 2;
|
|
}
|
|
|
|
message DeleteRefsRequest {
|
|
RepositoryHeader repository = 1;
|
|
repeated string ref_names = 2;
|
|
}
|
|
|
|
message DeleteRefsResponse {
|
|
repeated string failed_refs = 1;
|
|
string error = 2;
|
|
}
|
|
|
|
|
|
message FindRefsByOIDRequest {
|
|
RepositoryHeader repository = 1;
|
|
string oid = 2;
|
|
RefFilter filter = 3;
|
|
}
|
|
|
|
message RefFilter {
|
|
repeated string prefixes = 1; // e.g. ["refs/heads/", "refs/tags/"]
|
|
uint32 limit = 2;
|
|
}
|
|
|
|
message FoundRef {
|
|
string ref_name = 1;
|
|
string target_oid = 2;
|
|
bool symbolic = 3;
|
|
string symbolic_target = 4;
|
|
}
|
|
|
|
message FindRefsByOIDResponse {
|
|
repeated FoundRef refs = 1;
|
|
}
|
|
|
|
|
|
message ListRefsRequest {
|
|
RepositoryHeader repository = 1;
|
|
repeated string prefixes = 2;
|
|
string pattern = 3; // glob pattern, e.g. "refs/heads/*"
|
|
repeated string containing_oids = 4;
|
|
SortDirection sort_direction = 5;
|
|
Pagination pagination = 6;
|
|
}
|
|
|
|
message ListRefsResponse {
|
|
repeated FoundRef refs = 1;
|
|
PageInfo page_info = 2;
|
|
}
|
|
|
|
service RefService {
|
|
rpc FindDefaultBranchName(FindDefaultBranchNameRequest) returns (FindDefaultBranchNameResponse);
|
|
rpc RefExists(RefExistsRequest) returns (RefExistsResponse);
|
|
rpc UpdateReferences(UpdateReferencesRequest) returns (UpdateReferencesResponse);
|
|
rpc DeleteRefs(DeleteRefsRequest) returns (DeleteRefsResponse);
|
|
rpc FindRefsByOID(FindRefsByOIDRequest) returns (FindRefsByOIDResponse);
|
|
rpc ListRefs(ListRefsRequest) returns (ListRefsResponse);
|
|
}
|