Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2019-07-05 12:28:16 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2019-07-05 12:28:16 +0300
commitb9c9aec5cf53de4ea1a7fc3b067dd56d7828e080 (patch)
tree2693a49918682c12ea22e4085b8c569ac9e62497 /proto/smarthttp.proto
parent873a408c49ef1b34fce0cd47a80aa192f426d7c0 (diff)
Start preparation for migrating .proto files
Diffstat (limited to 'proto/smarthttp.proto')
-rw-r--r--proto/smarthttp.proto91
1 files changed, 91 insertions, 0 deletions
diff --git a/proto/smarthttp.proto b/proto/smarthttp.proto
new file mode 100644
index 000000000..92311b169
--- /dev/null
+++ b/proto/smarthttp.proto
@@ -0,0 +1,91 @@
+syntax = "proto3";
+
+package gitaly;
+
+option go_package = "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb";
+
+import "shared.proto";
+
+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 InfoRefsUploadPack(InfoRefsRequest) returns (stream InfoRefsResponse) {
+ option (op_type).op = ACCESSOR;
+ }
+
+ // The response body for GET /info/refs?service=git-receive-pack
+ // Will be invoked when the user executes a `git push`, meaning the server
+ // will receive new objects in the pack from the user.
+ rpc InfoRefsReceivePack(InfoRefsRequest) returns (stream InfoRefsResponse) {
+ option (op_type) = {
+ op: MUTATOR
+ target_repository_field: "1"
+ };
+ }
+
+ // Request and response body for POST /upload-pack
+ rpc PostUploadPack(stream PostUploadPackRequest) returns (stream PostUploadPackResponse) {
+ option (op_type).op = ACCESSOR;
+ }
+
+ // Request and response body for POST /receive-pack
+ rpc PostReceivePack(stream PostReceivePackRequest) returns (stream PostReceivePackResponse) {
+ option (op_type) = {
+ op: MUTATOR
+ target_repository_field: "1"
+ };
+ }
+}
+
+message InfoRefsRequest {
+ Repository repository = 1;
+ // Parameters to use with git -c (key=value pairs)
+ repeated string git_config_options = 2;
+
+ // Git protocol version
+ string git_protocol = 3;
+}
+
+message InfoRefsResponse {
+ bytes data = 1;
+}
+
+message PostUploadPackRequest {
+ // repository should only be present in the first message of the stream
+ Repository repository = 1;
+ // Raw data to be copied to stdin of 'git upload-pack'
+ bytes data = 2;
+ // Parameters to use with git -c (key=value pairs)
+ repeated string git_config_options = 3;
+
+ // Git protocol version
+ string git_protocol = 4;
+}
+
+message PostUploadPackResponse {
+ // Raw data from stdout of 'git upload-pack'
+ bytes data = 1;
+}
+
+message PostReceivePackRequest {
+ // repository should only be present in the first message of the stream
+ Repository repository = 1;
+ // Raw data to be copied to stdin of 'git receive-pack'
+ bytes data = 2;
+ // gl_id, gl_repository, and gl_username become env variables, used by the Git {pre,post}-receive
+ // hooks. They should only be present in the first message of the stream.
+ string gl_id = 3;
+ string gl_repository = 4;
+ string gl_username = 5;
+ // Git protocol version
+ string git_protocol = 6;
+
+ // Parameters to use with git -c (key=value pairs)
+ repeated string git_config_options = 7;
+}
+
+message PostReceivePackResponse {
+ // Raw data from stdout of 'git receive-pack'
+ bytes data = 1;
+}