mirror of
https://github.com/harness/drone.git
synced 2025-05-05 21:01:27 +08:00

* pull/push impl done * Basic auth for harness * gitrpc as top level package * New ctor for package * gitrpcserver instead of server2
56 lines
1.7 KiB
Protocol Buffer
56 lines
1.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
package rpc;
|
|
|
|
option go_package = "github.com/harness/gitness/gitrpc/rpc";
|
|
|
|
// SmartHTTPService is a service that provides RPCs required for HTTP-based Git
|
|
// clones via the smart HTTP protocol.
|
|
service SmartHTTPService {
|
|
// The response body for GET /info/refs?service=git-upload-pack
|
|
// Will be invoked when the user executes a `git fetch`, meaning the server
|
|
// will upload the packs to that user. The user doesn't upload new objects.
|
|
rpc InfoRefs(InfoRefsRequest) returns (stream InfoRefsResponse) {}
|
|
|
|
// ServicePack is just upload-pack or receive-pack
|
|
rpc ServicePack(stream ServicePackRequest) returns (stream ServicePackResponse) {}
|
|
}
|
|
|
|
message InfoRefsRequest {
|
|
string repo_uid = 1;
|
|
// Service can be: upload-pack or receive-pack
|
|
string service = 2;
|
|
// Parameters to use with git -c (key=value pairs)
|
|
repeated string git_config_options = 3;
|
|
|
|
// Git protocol version
|
|
string git_protocol = 4;
|
|
}
|
|
|
|
message InfoRefsResponse {
|
|
bytes data = 1;
|
|
}
|
|
|
|
message ServicePackRequest {
|
|
// repository should only be present only in the first message of the stream
|
|
string repo_uid = 1;
|
|
// Service can be: upload-pack or receive-pack
|
|
string service = 2;
|
|
// Raw data to be copied to stdin of 'git upload-pack'
|
|
bytes data = 3;
|
|
// Parameters to use with git -c (key=value pairs)
|
|
repeated string git_config_options = 4;
|
|
|
|
// Git protocol version
|
|
string git_protocol = 5;
|
|
|
|
// user_id become env variable, used by the Git {pre,post}-receive
|
|
// hooks. They should only be present in the first message of the stream.
|
|
string principal_id = 6;
|
|
}
|
|
|
|
message ServicePackResponse {
|
|
// Raw data from stdout of 'git upload-pack'
|
|
bytes data = 1;
|
|
}
|
|
|