diff options
author | Toon Claes <toon@gitlab.com> | 2021-09-30 18:06:15 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2021-09-30 18:06:15 +0300 |
commit | 1ec2f7682f9aad976a323881c4437228f4e7c201 (patch) | |
tree | aab863f7db31c4cd62f2a9f8c9126cf87721ec96 /proto | |
parent | eeca095e5680831ad140c2338d0f1c7d8b06a1ba (diff) | |
parent | 7d681ebd6c531e048a9e5d41f524dafc02e76516 (diff) |
Merge branch 'qmnguyen0711/1219-create-postuploadpackwithsidechannel-postuploadpack-replacement-using-sidechannel' into 'master'
Create PostUploadPackWithSidechannel
See merge request gitlab-org/gitaly!3883
Diffstat (limited to 'proto')
-rw-r--r-- | proto/go/gitalypb/smarthttp.pb.go | 313 | ||||
-rw-r--r-- | proto/go/gitalypb/smarthttp_grpc.pb.go | 41 | ||||
-rw-r--r-- | proto/smarthttp.proto | 18 |
3 files changed, 292 insertions, 80 deletions
diff --git a/proto/go/gitalypb/smarthttp.pb.go b/proto/go/gitalypb/smarthttp.pb.go index bbedd31b2..e7ec4a48a 100644 --- a/proto/go/gitalypb/smarthttp.pb.go +++ b/proto/go/gitalypb/smarthttp.pb.go @@ -255,6 +255,110 @@ func (x *PostUploadPackResponse) GetData() []byte { return nil } +type PostUploadPackWithSidechannelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // repository should only be present in the first message of the stream + Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` + // Parameters to use with git -c (key=value pairs) + GitConfigOptions []string `protobuf:"bytes,2,rep,name=git_config_options,json=gitConfigOptions,proto3" json:"git_config_options,omitempty"` + // Git protocol version + GitProtocol string `protobuf:"bytes,3,opt,name=git_protocol,json=gitProtocol,proto3" json:"git_protocol,omitempty"` +} + +func (x *PostUploadPackWithSidechannelRequest) Reset() { + *x = PostUploadPackWithSidechannelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_smarthttp_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostUploadPackWithSidechannelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostUploadPackWithSidechannelRequest) ProtoMessage() {} + +func (x *PostUploadPackWithSidechannelRequest) ProtoReflect() protoreflect.Message { + mi := &file_smarthttp_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostUploadPackWithSidechannelRequest.ProtoReflect.Descriptor instead. +func (*PostUploadPackWithSidechannelRequest) Descriptor() ([]byte, []int) { + return file_smarthttp_proto_rawDescGZIP(), []int{4} +} + +func (x *PostUploadPackWithSidechannelRequest) GetRepository() *Repository { + if x != nil { + return x.Repository + } + return nil +} + +func (x *PostUploadPackWithSidechannelRequest) GetGitConfigOptions() []string { + if x != nil { + return x.GitConfigOptions + } + return nil +} + +func (x *PostUploadPackWithSidechannelRequest) GetGitProtocol() string { + if x != nil { + return x.GitProtocol + } + return "" +} + +type PostUploadPackWithSidechannelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PostUploadPackWithSidechannelResponse) Reset() { + *x = PostUploadPackWithSidechannelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_smarthttp_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostUploadPackWithSidechannelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostUploadPackWithSidechannelResponse) ProtoMessage() {} + +func (x *PostUploadPackWithSidechannelResponse) ProtoReflect() protoreflect.Message { + mi := &file_smarthttp_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostUploadPackWithSidechannelResponse.ProtoReflect.Descriptor instead. +func (*PostUploadPackWithSidechannelResponse) Descriptor() ([]byte, []int) { + return file_smarthttp_proto_rawDescGZIP(), []int{5} +} + type PostReceivePackRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -278,7 +382,7 @@ type PostReceivePackRequest struct { func (x *PostReceivePackRequest) Reset() { *x = PostReceivePackRequest{} if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[4] + mi := &file_smarthttp_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -291,7 +395,7 @@ func (x *PostReceivePackRequest) String() string { func (*PostReceivePackRequest) ProtoMessage() {} func (x *PostReceivePackRequest) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[4] + mi := &file_smarthttp_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -304,7 +408,7 @@ func (x *PostReceivePackRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostReceivePackRequest.ProtoReflect.Descriptor instead. func (*PostReceivePackRequest) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{4} + return file_smarthttp_proto_rawDescGZIP(), []int{6} } func (x *PostReceivePackRequest) GetRepository() *Repository { @@ -368,7 +472,7 @@ type PostReceivePackResponse struct { func (x *PostReceivePackResponse) Reset() { *x = PostReceivePackResponse{} if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[5] + mi := &file_smarthttp_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -381,7 +485,7 @@ func (x *PostReceivePackResponse) String() string { func (*PostReceivePackResponse) ProtoMessage() {} func (x *PostReceivePackResponse) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[5] + mi := &file_smarthttp_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -394,7 +498,7 @@ func (x *PostReceivePackResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PostReceivePackResponse.ProtoReflect.Descriptor instead. func (*PostReceivePackResponse) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{5} + return file_smarthttp_proto_rawDescGZIP(), []int{7} } func (x *PostReceivePackResponse) GetData() []byte { @@ -437,54 +541,76 @@ var file_smarthttp_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6c, 0x22, 0x2c, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x92, 0x02, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x42, 0x04, 0x98, 0xc6, 0x2c, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x13, 0x0a, 0x05, 0x67, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x67, 0x6c, 0x49, 0x64, 0x12, - 0x23, 0x0a, 0x0d, 0x67, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x6c, 0x55, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x69, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2d, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xf6, 0x02, 0x0a, 0x10, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x48, - 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x12, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, - 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, - 0x6c, 0x79, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x52, 0x0a, - 0x13, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x50, 0x61, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, + 0x61, 0x22, 0xb1, 0x01, 0x0a, 0x24, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x50, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x42, 0x04, 0x98, 0xc6, 0x2c, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x10, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x27, 0x0a, 0x25, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x64, 0x65, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, + 0x02, 0x0a, 0x16, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x42, 0x04, 0x98, 0xc6, 0x2c, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x13, 0x0a, 0x05, 0x67, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x67, 0x6c, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x67, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x10, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x2d, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x32, 0xfd, 0x03, 0x0a, 0x10, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x48, 0x54, 0x54, 0x50, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x12, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x66, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, - 0x01, 0x12, 0x5b, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, - 0x61, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, - 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x5e, - 0x0a, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, 0x63, - 0x6b, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x28, 0x01, 0x30, 0x01, 0x42, 0x34, - 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, - 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, - 0x31, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, - 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x13, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, 0x63, + 0x6b, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, + 0x61, 0x6c, 0x79, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x30, 0x01, 0x12, 0x5b, + 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, + 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x1d, + 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x57, 0x69, + 0x74, 0x68, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2c, 0x2e, + 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x50, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x69, + 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x50, + 0x61, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x53, 0x69, 0x64, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, + 0x08, 0x02, 0x12, 0x5e, 0x0a, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x28, 0x01, + 0x30, 0x01, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, + 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, + 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -499,33 +625,38 @@ func file_smarthttp_proto_rawDescGZIP() []byte { return file_smarthttp_proto_rawDescData } -var file_smarthttp_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_smarthttp_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_smarthttp_proto_goTypes = []interface{}{ - (*InfoRefsRequest)(nil), // 0: gitaly.InfoRefsRequest - (*InfoRefsResponse)(nil), // 1: gitaly.InfoRefsResponse - (*PostUploadPackRequest)(nil), // 2: gitaly.PostUploadPackRequest - (*PostUploadPackResponse)(nil), // 3: gitaly.PostUploadPackResponse - (*PostReceivePackRequest)(nil), // 4: gitaly.PostReceivePackRequest - (*PostReceivePackResponse)(nil), // 5: gitaly.PostReceivePackResponse - (*Repository)(nil), // 6: gitaly.Repository + (*InfoRefsRequest)(nil), // 0: gitaly.InfoRefsRequest + (*InfoRefsResponse)(nil), // 1: gitaly.InfoRefsResponse + (*PostUploadPackRequest)(nil), // 2: gitaly.PostUploadPackRequest + (*PostUploadPackResponse)(nil), // 3: gitaly.PostUploadPackResponse + (*PostUploadPackWithSidechannelRequest)(nil), // 4: gitaly.PostUploadPackWithSidechannelRequest + (*PostUploadPackWithSidechannelResponse)(nil), // 5: gitaly.PostUploadPackWithSidechannelResponse + (*PostReceivePackRequest)(nil), // 6: gitaly.PostReceivePackRequest + (*PostReceivePackResponse)(nil), // 7: gitaly.PostReceivePackResponse + (*Repository)(nil), // 8: gitaly.Repository } var file_smarthttp_proto_depIdxs = []int32{ - 6, // 0: gitaly.InfoRefsRequest.repository:type_name -> gitaly.Repository - 6, // 1: gitaly.PostUploadPackRequest.repository:type_name -> gitaly.Repository - 6, // 2: gitaly.PostReceivePackRequest.repository:type_name -> gitaly.Repository - 0, // 3: gitaly.SmartHTTPService.InfoRefsUploadPack:input_type -> gitaly.InfoRefsRequest - 0, // 4: gitaly.SmartHTTPService.InfoRefsReceivePack:input_type -> gitaly.InfoRefsRequest - 2, // 5: gitaly.SmartHTTPService.PostUploadPack:input_type -> gitaly.PostUploadPackRequest - 4, // 6: gitaly.SmartHTTPService.PostReceivePack:input_type -> gitaly.PostReceivePackRequest - 1, // 7: gitaly.SmartHTTPService.InfoRefsUploadPack:output_type -> gitaly.InfoRefsResponse - 1, // 8: gitaly.SmartHTTPService.InfoRefsReceivePack:output_type -> gitaly.InfoRefsResponse - 3, // 9: gitaly.SmartHTTPService.PostUploadPack:output_type -> gitaly.PostUploadPackResponse - 5, // 10: gitaly.SmartHTTPService.PostReceivePack:output_type -> gitaly.PostReceivePackResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 8, // 0: gitaly.InfoRefsRequest.repository:type_name -> gitaly.Repository + 8, // 1: gitaly.PostUploadPackRequest.repository:type_name -> gitaly.Repository + 8, // 2: gitaly.PostUploadPackWithSidechannelRequest.repository:type_name -> gitaly.Repository + 8, // 3: gitaly.PostReceivePackRequest.repository:type_name -> gitaly.Repository + 0, // 4: gitaly.SmartHTTPService.InfoRefsUploadPack:input_type -> gitaly.InfoRefsRequest + 0, // 5: gitaly.SmartHTTPService.InfoRefsReceivePack:input_type -> gitaly.InfoRefsRequest + 2, // 6: gitaly.SmartHTTPService.PostUploadPack:input_type -> gitaly.PostUploadPackRequest + 4, // 7: gitaly.SmartHTTPService.PostUploadPackWithSidechannel:input_type -> gitaly.PostUploadPackWithSidechannelRequest + 6, // 8: gitaly.SmartHTTPService.PostReceivePack:input_type -> gitaly.PostReceivePackRequest + 1, // 9: gitaly.SmartHTTPService.InfoRefsUploadPack:output_type -> gitaly.InfoRefsResponse + 1, // 10: gitaly.SmartHTTPService.InfoRefsReceivePack:output_type -> gitaly.InfoRefsResponse + 3, // 11: gitaly.SmartHTTPService.PostUploadPack:output_type -> gitaly.PostUploadPackResponse + 5, // 12: gitaly.SmartHTTPService.PostUploadPackWithSidechannel:output_type -> gitaly.PostUploadPackWithSidechannelResponse + 7, // 13: gitaly.SmartHTTPService.PostReceivePack:output_type -> gitaly.PostReceivePackResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_smarthttp_proto_init() } @@ -585,7 +716,7 @@ func file_smarthttp_proto_init() { } } file_smarthttp_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostReceivePackRequest); i { + switch v := v.(*PostUploadPackWithSidechannelRequest); i { case 0: return &v.state case 1: @@ -597,6 +728,30 @@ func file_smarthttp_proto_init() { } } file_smarthttp_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostUploadPackWithSidechannelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smarthttp_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostReceivePackRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smarthttp_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostReceivePackResponse); i { case 0: return &v.state @@ -615,7 +770,7 @@ func file_smarthttp_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smarthttp_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/go/gitalypb/smarthttp_grpc.pb.go b/proto/go/gitalypb/smarthttp_grpc.pb.go index da3528e32..523303520 100644 --- a/proto/go/gitalypb/smarthttp_grpc.pb.go +++ b/proto/go/gitalypb/smarthttp_grpc.pb.go @@ -28,6 +28,8 @@ type SmartHTTPServiceClient interface { InfoRefsReceivePack(ctx context.Context, in *InfoRefsRequest, opts ...grpc.CallOption) (SmartHTTPService_InfoRefsReceivePackClient, error) // Request and response body for POST /upload-pack PostUploadPack(ctx context.Context, opts ...grpc.CallOption) (SmartHTTPService_PostUploadPackClient, error) + // Request and response body for POST /upload-pack using sidechannel protocol + PostUploadPackWithSidechannel(ctx context.Context, in *PostUploadPackWithSidechannelRequest, opts ...grpc.CallOption) (*PostUploadPackWithSidechannelResponse, error) // Request and response body for POST /receive-pack PostReceivePack(ctx context.Context, opts ...grpc.CallOption) (SmartHTTPService_PostReceivePackClient, error) } @@ -135,6 +137,15 @@ func (x *smartHTTPServicePostUploadPackClient) Recv() (*PostUploadPackResponse, return m, nil } +func (c *smartHTTPServiceClient) PostUploadPackWithSidechannel(ctx context.Context, in *PostUploadPackWithSidechannelRequest, opts ...grpc.CallOption) (*PostUploadPackWithSidechannelResponse, error) { + out := new(PostUploadPackWithSidechannelResponse) + err := c.cc.Invoke(ctx, "/gitaly.SmartHTTPService/PostUploadPackWithSidechannel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *smartHTTPServiceClient) PostReceivePack(ctx context.Context, opts ...grpc.CallOption) (SmartHTTPService_PostReceivePackClient, error) { stream, err := c.cc.NewStream(ctx, &SmartHTTPService_ServiceDesc.Streams[3], "/gitaly.SmartHTTPService/PostReceivePack", opts...) if err != nil { @@ -180,6 +191,8 @@ type SmartHTTPServiceServer interface { InfoRefsReceivePack(*InfoRefsRequest, SmartHTTPService_InfoRefsReceivePackServer) error // Request and response body for POST /upload-pack PostUploadPack(SmartHTTPService_PostUploadPackServer) error + // Request and response body for POST /upload-pack using sidechannel protocol + PostUploadPackWithSidechannel(context.Context, *PostUploadPackWithSidechannelRequest) (*PostUploadPackWithSidechannelResponse, error) // Request and response body for POST /receive-pack PostReceivePack(SmartHTTPService_PostReceivePackServer) error mustEmbedUnimplementedSmartHTTPServiceServer() @@ -198,6 +211,9 @@ func (UnimplementedSmartHTTPServiceServer) InfoRefsReceivePack(*InfoRefsRequest, func (UnimplementedSmartHTTPServiceServer) PostUploadPack(SmartHTTPService_PostUploadPackServer) error { return status.Errorf(codes.Unimplemented, "method PostUploadPack not implemented") } +func (UnimplementedSmartHTTPServiceServer) PostUploadPackWithSidechannel(context.Context, *PostUploadPackWithSidechannelRequest) (*PostUploadPackWithSidechannelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PostUploadPackWithSidechannel not implemented") +} func (UnimplementedSmartHTTPServiceServer) PostReceivePack(SmartHTTPService_PostReceivePackServer) error { return status.Errorf(codes.Unimplemented, "method PostReceivePack not implemented") } @@ -282,6 +298,24 @@ func (x *smartHTTPServicePostUploadPackServer) Recv() (*PostUploadPackRequest, e return m, nil } +func _SmartHTTPService_PostUploadPackWithSidechannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PostUploadPackWithSidechannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SmartHTTPServiceServer).PostUploadPackWithSidechannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitaly.SmartHTTPService/PostUploadPackWithSidechannel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SmartHTTPServiceServer).PostUploadPackWithSidechannel(ctx, req.(*PostUploadPackWithSidechannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SmartHTTPService_PostReceivePack_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(SmartHTTPServiceServer).PostReceivePack(&smartHTTPServicePostReceivePackServer{stream}) } @@ -314,7 +348,12 @@ func (x *smartHTTPServicePostReceivePackServer) Recv() (*PostReceivePackRequest, var SmartHTTPService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gitaly.SmartHTTPService", HandlerType: (*SmartHTTPServiceServer)(nil), - Methods: []grpc.MethodDesc{}, + Methods: []grpc.MethodDesc{ + { + MethodName: "PostUploadPackWithSidechannel", + Handler: _SmartHTTPService_PostUploadPackWithSidechannel_Handler, + }, + }, Streams: []grpc.StreamDesc{ { StreamName: "InfoRefsUploadPack", diff --git a/proto/smarthttp.proto b/proto/smarthttp.proto index 26d057685..f9e3977d6 100644 --- a/proto/smarthttp.proto +++ b/proto/smarthttp.proto @@ -33,6 +33,13 @@ service SmartHTTPService { }; } + // Request and response body for POST /upload-pack using sidechannel protocol + rpc PostUploadPackWithSidechannel(PostUploadPackWithSidechannelRequest) returns (PostUploadPackWithSidechannelResponse) { + option (op_type) = { + op: ACCESSOR + }; + } + // Request and response body for POST /receive-pack rpc PostReceivePack(stream PostReceivePackRequest) returns (stream PostReceivePackResponse) { option (op_type) = { @@ -71,6 +78,17 @@ message PostUploadPackResponse { bytes data = 1; } +message PostUploadPackWithSidechannelRequest { + // repository should only be present in the first message of the stream + Repository repository = 1 [(target_repository)=true]; + // Parameters to use with git -c (key=value pairs) + repeated string git_config_options = 2; + // Git protocol version + string git_protocol = 3; +} + +message PostUploadPackWithSidechannelResponse { } + message PostReceivePackRequest { // repository should only be present in the first message of the stream Repository repository = 1 [(target_repository)=true]; |