diff options
-rw-r--r-- | internal/gitaly/service/smarthttp/upload_pack.go | 44 | ||||
-rw-r--r-- | internal/gitaly/service/smarthttp/upload_pack_test.go | 124 | ||||
-rw-r--r-- | internal/praefect/protoregistry/protoregistry_test.go | 8 | ||||
-rw-r--r-- | internal/praefect/server_test.go | 12 | ||||
-rw-r--r-- | proto/go/gitalypb/smarthttp.pb.go | 380 | ||||
-rw-r--r-- | proto/go/gitalypb/smarthttp_grpc.pb.go | 72 | ||||
-rw-r--r-- | proto/smarthttp.proto | 26 |
7 files changed, 128 insertions, 538 deletions
diff --git a/internal/gitaly/service/smarthttp/upload_pack.go b/internal/gitaly/service/smarthttp/upload_pack.go index 14369ca89..1ee85b2bd 100644 --- a/internal/gitaly/service/smarthttp/upload_pack.go +++ b/internal/gitaly/service/smarthttp/upload_pack.go @@ -14,48 +14,8 @@ import ( "gitlab.com/gitlab-org/gitaly/v15/internal/sidechannel" "gitlab.com/gitlab-org/gitaly/v15/internal/structerr" "gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/v15/streamio" ) -type basicPostUploadPackRequest interface { - GetRepository() *gitalypb.Repository - GetGitConfigOptions() []string - GetGitProtocol() string -} - -func (s *server) PostUploadPack(stream gitalypb.SmartHTTPService_PostUploadPackServer) error { - ctx := stream.Context() - - req, err := stream.Recv() // First request contains Repository only - if err != nil { - return err - } - - if req.Data != nil { - return structerr.NewInvalidArgument("non-empty Data") - } - - repoPath, gitConfig, err := s.validateUploadPackRequest(ctx, req) - if err != nil { - return structerr.NewInvalidArgument("%w", err) - } - - stdin := streamio.NewReader(func() ([]byte, error) { - resp, err := stream.Recv() - - return resp.GetData(), err - }) - stdout := streamio.NewWriter(func(p []byte) error { - return stream.Send(&gitalypb.PostUploadPackResponse{Data: p}) - }) - - if err := s.runUploadPack(ctx, req, repoPath, gitConfig, stdin, stdout); err != nil { - return structerr.NewInternal("running upload-pack: %w", err) - } - - return nil -} - func (s *server) PostUploadPackWithSidechannel(ctx context.Context, req *gitalypb.PostUploadPackWithSidechannelRequest) (*gitalypb.PostUploadPackWithSidechannelResponse, error) { repoPath, gitConfig, err := s.validateUploadPackRequest(ctx, req) if err != nil { @@ -112,7 +72,7 @@ func (s *server) runStatsCollector(ctx context.Context, r io.Reader) (io.Reader, return io.TeeReader(r, pw), sc } -func (s *server) validateUploadPackRequest(ctx context.Context, req basicPostUploadPackRequest) (string, []git.ConfigPair, error) { +func (s *server) validateUploadPackRequest(ctx context.Context, req *gitalypb.PostUploadPackWithSidechannelRequest) (string, []git.ConfigPair, error) { repository := req.GetRepository() if err := service.ValidateRepository(repository); err != nil { return "", nil, err @@ -132,7 +92,7 @@ func (s *server) validateUploadPackRequest(ctx context.Context, req basicPostUpl return repoPath, config, nil } -func (s *server) runUploadPack(ctx context.Context, req basicPostUploadPackRequest, repoPath string, gitConfig []git.ConfigPair, stdin io.Reader, stdout io.Writer) error { +func (s *server) runUploadPack(ctx context.Context, req *gitalypb.PostUploadPackWithSidechannelRequest, repoPath string, gitConfig []git.ConfigPair, stdin io.Reader, stdout io.Writer) error { h := sha1.New() stdin = io.TeeReader(stdin, h) diff --git a/internal/gitaly/service/smarthttp/upload_pack_test.go b/internal/gitaly/service/smarthttp/upload_pack_test.go index 73e0f67d5..a53da2294 100644 --- a/internal/gitaly/service/smarthttp/upload_pack_test.go +++ b/internal/gitaly/service/smarthttp/upload_pack_test.go @@ -24,7 +24,6 @@ import ( "gitlab.com/gitlab-org/gitaly/v15/internal/testhelper/testcfg" "gitlab.com/gitlab-org/gitaly/v15/internal/testhelper/testserver" "gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb" - "gitlab.com/gitlab-org/gitaly/v15/streamio" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) @@ -34,7 +33,7 @@ const ( ) type ( - requestMaker func(t *testing.T, ctx context.Context, serverSocketPath, token string, in *gitalypb.PostUploadPackRequest, body io.Reader) (*bytes.Buffer, error) + requestMaker func(t *testing.T, ctx context.Context, serverSocketPath, token string, in *gitalypb.PostUploadPackWithSidechannelRequest, body io.Reader) (*bytes.Buffer, error) ) func runTestWithAndWithoutConfigOptions( @@ -54,12 +53,6 @@ func runTestWithAndWithoutConfigOptions( } } -func TestServer_PostUpload(t *testing.T) { - t.Parallel() - - runTestWithAndWithoutConfigOptions(t, testServerPostUpload, makePostUploadPackRequest, testcfg.WithPackObjectsCacheEnabled()) -} - func TestServer_PostUploadWithChannel(t *testing.T) { t.Parallel() @@ -87,7 +80,7 @@ func testServerPostUpload(t *testing.T, ctx context.Context, makeRequest request gittest.WritePktlineString(t, requestBuffer, fmt.Sprintf("have %s\n", oldCommit)) gittest.WritePktlineFlush(t, requestBuffer) - req := &gitalypb.PostUploadPackRequest{Repository: repo} + req := &gitalypb.PostUploadPackWithSidechannelRequest{Repository: repo} responseBuffer, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, req, requestBuffer) require.NoError(t, err) @@ -105,12 +98,6 @@ func testServerPostUpload(t *testing.T, ctx context.Context, makeRequest request require.Equal(t, 1.0, promtest.ToFloat64(metric)) } -func TestServer_PostUploadPack_gitConfigOptions(t *testing.T) { - t.Parallel() - - runTestWithAndWithoutConfigOptions(t, testServerPostUploadPackGitConfigOptions, makePostUploadPackRequest, testcfg.WithPackObjectsCacheEnabled()) -} - func TestServer_PostUploadPackSidechannel_gitConfigOptions(t *testing.T) { t.Parallel() @@ -146,7 +133,7 @@ func testServerPostUploadPackGitConfigOptions(t *testing.T, ctx context.Context, gittest.WritePktlineFlush(t, requestBody) t.Run("sanity check: ref exists and can be fetched", func(t *testing.T) { - rpcRequest := &gitalypb.PostUploadPackRequest{Repository: repo} + rpcRequest := &gitalypb.PostUploadPackWithSidechannelRequest{Repository: repo} response, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, rpcRequest, bytes.NewReader(requestBody.Bytes())) require.NoError(t, err) @@ -155,7 +142,7 @@ func testServerPostUploadPackGitConfigOptions(t *testing.T, ctx context.Context, }) t.Run("failing request because of hidden ref config", func(t *testing.T) { - rpcRequest := &gitalypb.PostUploadPackRequest{ + rpcRequest := &gitalypb.PostUploadPackWithSidechannelRequest{ Repository: repo, GitConfigOptions: []string{ "uploadpack.hideRefs=refs/hidden", @@ -174,12 +161,6 @@ func testServerPostUploadPackGitConfigOptions(t *testing.T, ctx context.Context, }) } -func TestServer_PostUploadPack_gitProtocol(t *testing.T) { - t.Parallel() - - runTestWithAndWithoutConfigOptions(t, testServerPostUploadPackGitProtocol, makePostUploadPackRequest, testcfg.WithPackObjectsCacheEnabled()) -} - func TestServer_PostUploadPackWithSidechannel_gitProtocol(t *testing.T) { t.Parallel() @@ -205,7 +186,7 @@ func testServerPostUploadPackGitProtocol(t *testing.T, ctx context.Context, make gittest.WritePktlineString(t, requestBody, "symrefs\n") gittest.WritePktlineFlush(t, requestBody) - rpcRequest := &gitalypb.PostUploadPackRequest{ + rpcRequest := &gitalypb.PostUploadPackWithSidechannelRequest{ Repository: repo, GitProtocol: git.ProtocolV2, } @@ -217,15 +198,6 @@ func testServerPostUploadPackGitProtocol(t *testing.T, ctx context.Context, make require.Equal(t, fmt.Sprintf("GIT_PROTOCOL=%s\n", git.ProtocolV2), envData) } -// This test is here because git-upload-pack returns a non-zero exit code -// on 'deepen' requests even though the request is being handled just -// fine from the client perspective. -func TestServer_PostUploadPack_suppressDeepenExitError(t *testing.T) { - t.Parallel() - - runTestWithAndWithoutConfigOptions(t, testServerPostUploadPackSuppressDeepenExitError, makePostUploadPackRequest, testcfg.WithPackObjectsCacheEnabled()) -} - func TestServer_PostUploadPackWithSidechannel_suppressDeepenExitError(t *testing.T) { t.Parallel() @@ -244,20 +216,12 @@ func testServerPostUploadPackSuppressDeepenExitError(t *testing.T, ctx context.C gittest.WritePktlineString(t, &requestBody, "deepen 1") gittest.WritePktlineFlush(t, &requestBody) - response, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, &gitalypb.PostUploadPackRequest{ - Repository: repo, - }, &requestBody) + rpcRequest := &gitalypb.PostUploadPackWithSidechannelRequest{Repository: repo} + response, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, rpcRequest, &requestBody) require.NoError(t, err) require.Equal(t, gittest.Pktlinef(t, "shallow %s", commitID)+"0000", response.String()) } -func TestServer_PostUploadPack_usesPackObjectsHook(t *testing.T) { - t.Parallel() - ctx := testhelper.Context(t) - - testServerPostUploadPackUsesPackObjectsHook(t, ctx, makePostUploadPackRequest) -} - func TestServer_PostUploadPackWithSidechannel_usesPackObjectsHook(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) @@ -293,7 +257,7 @@ func testServerPostUploadPackUsesPackObjectsHook(t *testing.T, ctx context.Conte gittest.WritePktlineString(t, &requestBuffer, fmt.Sprintf("have %s\n", oldHead)) gittest.WritePktlineFlush(t, &requestBuffer) - _, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, &gitalypb.PostUploadPackRequest{ + _, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, &gitalypb.PostUploadPackWithSidechannelRequest{ Repository: repo, }, &requestBuffer) require.NoError(t, err) @@ -305,7 +269,7 @@ func testServerPostUploadPackUsesPackObjectsHook(t *testing.T, ctx context.Conte func TestServer_PostUploadPack_validation(t *testing.T) { t.Parallel() - runTestWithAndWithoutConfigOptions(t, testServerPostUploadPackValidation, makePostUploadPackRequest, testcfg.WithPackObjectsCacheEnabled()) + runTestWithAndWithoutConfigOptions(t, testServerPostUploadPackValidation, makePostUploadPackWithSidechannelRequest, testcfg.WithPackObjectsCacheEnabled()) } func testServerPostUploadPackValidation(t *testing.T, ctx context.Context, makeRequest requestMaker, opts ...testcfg.Option) { @@ -315,16 +279,14 @@ func testServerPostUploadPackValidation(t *testing.T, ctx context.Context, makeR serverSocketPath := runSmartHTTPServer(t, cfg) cfg.SocketPath = serverSocketPath - repo, _ := gittest.CreateRepository(t, ctx, cfg) - for _, tc := range []struct { desc string - request *gitalypb.PostUploadPackRequest + request *gitalypb.PostUploadPackWithSidechannelRequest expectedErr error }{ { desc: "nonexistent repository", - request: &gitalypb.PostUploadPackRequest{ + request: &gitalypb.PostUploadPackWithSidechannelRequest{ Repository: &gitalypb.Repository{StorageName: "fake", RelativePath: "path"}, }, expectedErr: structerr.NewInvalidArgument(testhelper.GitalyOrPraefect( @@ -334,20 +296,12 @@ func testServerPostUploadPackValidation(t *testing.T, ctx context.Context, makeR }, { desc: "unset repository", - request: &gitalypb.PostUploadPackRequest{Repository: nil}, + request: &gitalypb.PostUploadPackWithSidechannelRequest{Repository: nil}, expectedErr: structerr.NewInvalidArgument(testhelper.GitalyOrPraefect( "empty Repository", "repo scoped: empty Repository", )), }, - { - desc: "data on first request", - request: &gitalypb.PostUploadPackRequest{ - Repository: repo, - Data: []byte("Fail"), - }, - expectedErr: structerr.NewInvalidArgument("non-empty Data"), - }, } { t.Run(tc.desc, func(t *testing.T) { _, err := makeRequest(t, ctx, serverSocketPath, cfg.Auth.Token, tc.request, bytes.NewBuffer(nil)) @@ -368,12 +322,12 @@ func testServerPostUploadPackWithSideChannelValidation(t *testing.T, ctx context for _, tc := range []struct { desc string - req *gitalypb.PostUploadPackRequest + req *gitalypb.PostUploadPackWithSidechannelRequest expectedErr error }{ { desc: "Repository doesn't exist", - req: &gitalypb.PostUploadPackRequest{Repository: &gitalypb.Repository{StorageName: "fake", RelativePath: "path"}}, + req: &gitalypb.PostUploadPackWithSidechannelRequest{Repository: &gitalypb.Repository{StorageName: "fake", RelativePath: "path"}}, expectedErr: structerr.NewInvalidArgument(testhelper.GitalyOrPraefect( `GetStorageByName: no such storage: "fake"`, "repo scoped: invalid Repository", @@ -381,7 +335,7 @@ func testServerPostUploadPackWithSideChannelValidation(t *testing.T, ctx context }, { desc: "Repository no provided", - req: &gitalypb.PostUploadPackRequest{Repository: nil}, + req: &gitalypb.PostUploadPackWithSidechannelRequest{Repository: nil}, expectedErr: structerr.NewInvalidArgument(testhelper.GitalyOrPraefect( "empty Repository", "repo scoped: empty Repository", @@ -434,12 +388,6 @@ func extractPackDataFromResponse(t *testing.T, buf *bytes.Buffer) ([]byte, int, return pack, version, entries } -func TestServer_PostUploadPack_partialClone(t *testing.T) { - t.Parallel() - - runTestWithAndWithoutConfigOptions(t, testServerPostUploadPackPartialClone, makePostUploadPackRequest, testcfg.WithPackObjectsCacheEnabled()) -} - func TestServer_PostUploadPackWithSidechannel_partialClone(t *testing.T) { t.Parallel() @@ -472,7 +420,7 @@ func testServerPostUploadPackPartialClone(t *testing.T, ctx context.Context, mak gittest.WritePktlineString(t, &requestBuffer, "done\n") gittest.WritePktlineFlush(t, &requestBuffer) - req := &gitalypb.PostUploadPackRequest{Repository: repo} + req := &gitalypb.PostUploadPackWithSidechannelRequest{Repository: repo} responseBuffer, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, req, &requestBuffer) require.NoError(t, err) @@ -492,13 +440,6 @@ func testServerPostUploadPackPartialClone(t *testing.T, ctx context.Context, mak require.Equal(t, 1.0, promtest.ToFloat64(metric)) } -func TestServer_PostUploadPack_allowAnySHA1InWant(t *testing.T) { - t.Parallel() - ctx := testhelper.Context(t) - - testServerPostUploadPackAllowAnySHA1InWant(t, ctx, makePostUploadPackRequest) -} - func TestServer_PostUploadPackWithSidechannel_allowAnySHA1InWant(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) @@ -522,7 +463,7 @@ func testServerPostUploadPackAllowAnySHA1InWant(t *testing.T, ctx context.Contex gittest.WritePktlineString(t, &requestBuffer, "done\n") gittest.WritePktlineFlush(t, &requestBuffer) - req := &gitalypb.PostUploadPackRequest{Repository: repo} + req := &gitalypb.PostUploadPackWithSidechannelRequest{Repository: repo} responseBuffer, err := makeRequest(t, ctx, cfg.SocketPath, cfg.Auth.Token, req, &requestBuffer) require.NoError(t, err) @@ -536,35 +477,6 @@ func testServerPostUploadPackAllowAnySHA1InWant(t *testing.T, ctx context.Contex gittest.RequireObjectExists(t, cfg, localRepoPath, newCommit) } -func makePostUploadPackRequest(t *testing.T, ctx context.Context, serverSocketPath, token string, in *gitalypb.PostUploadPackRequest, body io.Reader) (*bytes.Buffer, error) { - client, conn := newSmartHTTPClient(t, serverSocketPath, token) - defer conn.Close() - - stream, err := client.PostUploadPack(ctx) - require.NoError(t, err) - - require.NoError(t, stream.Send(in)) - - if body != nil { - sw := streamio.NewWriter(func(p []byte) error { - return stream.Send(&gitalypb.PostUploadPackRequest{Data: p}) - }) - - _, err = io.Copy(sw, body) - require.NoError(t, err) - require.NoError(t, stream.CloseSend()) - } - - responseBuffer := &bytes.Buffer{} - rr := streamio.NewReader(func() ([]byte, error) { - resp, err := stream.Recv() - return resp.GetData(), err - }) - _, err = io.Copy(responseBuffer, rr) - - return responseBuffer, err -} - func dialSmartHTTPServerWithSidechannel(t *testing.T, serverSocketPath, token string, registry *sidechannel.Registry) *grpc.ClientConn { t.Helper() @@ -580,7 +492,7 @@ func dialSmartHTTPServerWithSidechannel(t *testing.T, serverSocketPath, token st return conn } -func makePostUploadPackWithSidechannelRequest(t *testing.T, ctx context.Context, serverSocketPath, token string, in *gitalypb.PostUploadPackRequest, body io.Reader) (*bytes.Buffer, error) { +func makePostUploadPackWithSidechannelRequest(t *testing.T, ctx context.Context, serverSocketPath, token string, in *gitalypb.PostUploadPackWithSidechannelRequest, body io.Reader) (*bytes.Buffer, error) { t.Helper() registry := sidechannel.NewRegistry() diff --git a/internal/praefect/protoregistry/protoregistry_test.go b/internal/praefect/protoregistry/protoregistry_test.go index dcc894103..565262648 100644 --- a/internal/praefect/protoregistry/protoregistry_test.go +++ b/internal/praefect/protoregistry/protoregistry_test.go @@ -137,10 +137,10 @@ func TestNewProtoRegistry(t *testing.T) { "WriteRef": protoregistry.OpMutator, }, "SmartHTTPService": { - "InfoRefsReceivePack": protoregistry.OpAccessor, - "InfoRefsUploadPack": protoregistry.OpAccessor, - "PostReceivePack": protoregistry.OpMutator, - "PostUploadPack": protoregistry.OpAccessor, + "InfoRefsReceivePack": protoregistry.OpAccessor, + "InfoRefsUploadPack": protoregistry.OpAccessor, + "PostReceivePack": protoregistry.OpMutator, + "PostUploadPackWithSidechannel": protoregistry.OpAccessor, }, "SSHService": { "SSHReceivePack": protoregistry.OpMutator, diff --git a/internal/praefect/server_test.go b/internal/praefect/server_test.go index 98cf99e8d..736e5a921 100644 --- a/internal/praefect/server_test.go +++ b/internal/praefect/server_test.go @@ -718,18 +718,6 @@ func (m *mockSmartHTTP) InfoRefsReceivePack(req *gitalypb.InfoRefsRequest, strea return stream.Send(&gitalypb.InfoRefsResponse{}) } -func (m *mockSmartHTTP) PostUploadPack(stream gitalypb.SmartHTTPService_PostUploadPackServer) error { - m.m.Lock() - defer m.m.Unlock() - if m.methodsCalled == nil { - m.methodsCalled = make(map[string]int) - } - - m.methodsCalled["PostUploadPack"]++ - - return stream.Send(&gitalypb.PostUploadPackResponse{}) -} - func (m *mockSmartHTTP) PostReceivePack(stream gitalypb.SmartHTTPService_PostReceivePackServer) error { m.m.Lock() defer m.m.Unlock() diff --git a/proto/go/gitalypb/smarthttp.pb.go b/proto/go/gitalypb/smarthttp.pb.go index 575bc80c8..629f71591 100644 --- a/proto/go/gitalypb/smarthttp.pb.go +++ b/proto/go/gitalypb/smarthttp.pb.go @@ -137,131 +137,6 @@ func (x *InfoRefsResponse) GetData() []byte { } // This comment is left unintentionally blank. -type PostUploadPackRequest 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"` - // Raw data to be copied to stdin of 'git upload-pack' - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // Parameters to use with git -c (key=value pairs) - GitConfigOptions []string `protobuf:"bytes,3,rep,name=git_config_options,json=gitConfigOptions,proto3" json:"git_config_options,omitempty"` - // Git protocol version - GitProtocol string `protobuf:"bytes,4,opt,name=git_protocol,json=gitProtocol,proto3" json:"git_protocol,omitempty"` -} - -func (x *PostUploadPackRequest) Reset() { - *x = PostUploadPackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PostUploadPackRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostUploadPackRequest) ProtoMessage() {} - -func (x *PostUploadPackRequest) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[2] - 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 PostUploadPackRequest.ProtoReflect.Descriptor instead. -func (*PostUploadPackRequest) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{2} -} - -func (x *PostUploadPackRequest) GetRepository() *Repository { - if x != nil { - return x.Repository - } - return nil -} - -func (x *PostUploadPackRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *PostUploadPackRequest) GetGitConfigOptions() []string { - if x != nil { - return x.GitConfigOptions - } - return nil -} - -func (x *PostUploadPackRequest) GetGitProtocol() string { - if x != nil { - return x.GitProtocol - } - return "" -} - -// This comment is left unintentionally blank. -type PostUploadPackResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Raw data from stdout of 'git upload-pack' - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *PostUploadPackResponse) Reset() { - *x = PostUploadPackResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PostUploadPackResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PostUploadPackResponse) ProtoMessage() {} - -func (x *PostUploadPackResponse) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[3] - 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 PostUploadPackResponse.ProtoReflect.Descriptor instead. -func (*PostUploadPackResponse) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{3} -} - -func (x *PostUploadPackResponse) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -// This comment is left unintentionally blank. type PostUploadPackWithSidechannelRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -278,7 +153,7 @@ type PostUploadPackWithSidechannelRequest struct { func (x *PostUploadPackWithSidechannelRequest) Reset() { *x = PostUploadPackWithSidechannelRequest{} if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[4] + mi := &file_smarthttp_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -291,7 +166,7 @@ func (x *PostUploadPackWithSidechannelRequest) String() string { func (*PostUploadPackWithSidechannelRequest) ProtoMessage() {} func (x *PostUploadPackWithSidechannelRequest) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[4] + mi := &file_smarthttp_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -304,7 +179,7 @@ func (x *PostUploadPackWithSidechannelRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use PostUploadPackWithSidechannelRequest.ProtoReflect.Descriptor instead. func (*PostUploadPackWithSidechannelRequest) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{4} + return file_smarthttp_proto_rawDescGZIP(), []int{2} } func (x *PostUploadPackWithSidechannelRequest) GetRepository() *Repository { @@ -338,7 +213,7 @@ type PostUploadPackWithSidechannelResponse struct { func (x *PostUploadPackWithSidechannelResponse) Reset() { *x = PostUploadPackWithSidechannelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[5] + mi := &file_smarthttp_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -351,7 +226,7 @@ func (x *PostUploadPackWithSidechannelResponse) String() string { func (*PostUploadPackWithSidechannelResponse) ProtoMessage() {} func (x *PostUploadPackWithSidechannelResponse) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[5] + mi := &file_smarthttp_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -364,7 +239,7 @@ func (x *PostUploadPackWithSidechannelResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use PostUploadPackWithSidechannelResponse.ProtoReflect.Descriptor instead. func (*PostUploadPackWithSidechannelResponse) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{5} + return file_smarthttp_proto_rawDescGZIP(), []int{3} } // This comment is left unintentionally blank. @@ -393,7 +268,7 @@ type PostReceivePackRequest struct { func (x *PostReceivePackRequest) Reset() { *x = PostReceivePackRequest{} if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[6] + mi := &file_smarthttp_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -406,7 +281,7 @@ func (x *PostReceivePackRequest) String() string { func (*PostReceivePackRequest) ProtoMessage() {} func (x *PostReceivePackRequest) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[6] + mi := &file_smarthttp_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -419,7 +294,7 @@ func (x *PostReceivePackRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostReceivePackRequest.ProtoReflect.Descriptor instead. func (*PostReceivePackRequest) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{6} + return file_smarthttp_proto_rawDescGZIP(), []int{4} } func (x *PostReceivePackRequest) GetRepository() *Repository { @@ -484,7 +359,7 @@ type PostReceivePackResponse struct { func (x *PostReceivePackResponse) Reset() { *x = PostReceivePackResponse{} if protoimpl.UnsafeEnabled { - mi := &file_smarthttp_proto_msgTypes[7] + mi := &file_smarthttp_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -497,7 +372,7 @@ func (x *PostReceivePackResponse) String() string { func (*PostReceivePackResponse) ProtoMessage() {} func (x *PostReceivePackResponse) ProtoReflect() protoreflect.Message { - mi := &file_smarthttp_proto_msgTypes[7] + mi := &file_smarthttp_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -510,7 +385,7 @@ func (x *PostReceivePackResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PostReceivePackResponse.ProtoReflect.Descriptor instead. func (*PostReceivePackResponse) Descriptor() ([]byte, []int) { - return file_smarthttp_proto_rawDescGZIP(), []int{7} + return file_smarthttp_proto_rawDescGZIP(), []int{5} } func (x *PostReceivePackResponse) GetData() []byte { @@ -538,91 +413,71 @@ var file_smarthttp_proto_rawDesc = []byte{ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x26, 0x0a, 0x10, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x66, 0x73, 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, 0xb6, 0x01, 0x0a, 0x15, 0x50, - 0x6f, 0x73, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 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, 0x2c, 0x0a, 0x12, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 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, 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, 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, 0x35, 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, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 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, 0xa0, 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, 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, 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, 0x35, 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 ( @@ -637,38 +492,33 @@ func file_smarthttp_proto_rawDescGZIP() []byte { return file_smarthttp_proto_rawDescData } -var file_smarthttp_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_smarthttp_proto_msgTypes = make([]protoimpl.MessageInfo, 6) 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 - (*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 + (*PostUploadPackWithSidechannelRequest)(nil), // 2: gitaly.PostUploadPackWithSidechannelRequest + (*PostUploadPackWithSidechannelResponse)(nil), // 3: gitaly.PostUploadPackWithSidechannelResponse + (*PostReceivePackRequest)(nil), // 4: gitaly.PostReceivePackRequest + (*PostReceivePackResponse)(nil), // 5: gitaly.PostReceivePackResponse + (*Repository)(nil), // 6: gitaly.Repository } var file_smarthttp_proto_depIdxs = []int32{ - 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 + 6, // 0: gitaly.InfoRefsRequest.repository:type_name -> gitaly.Repository + 6, // 1: gitaly.PostUploadPackWithSidechannelRequest.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.PostUploadPackWithSidechannel:input_type -> gitaly.PostUploadPackWithSidechannelRequest + 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.PostUploadPackWithSidechannel:output_type -> gitaly.PostUploadPackWithSidechannelResponse + 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 } func init() { file_smarthttp_proto_init() } @@ -704,30 +554,6 @@ func file_smarthttp_proto_init() { } } file_smarthttp_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostUploadPackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_smarthttp_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostUploadPackResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_smarthttp_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostUploadPackWithSidechannelRequest); i { case 0: return &v.state @@ -739,7 +565,7 @@ func file_smarthttp_proto_init() { return nil } } - file_smarthttp_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_smarthttp_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostUploadPackWithSidechannelResponse); i { case 0: return &v.state @@ -751,7 +577,7 @@ func file_smarthttp_proto_init() { return nil } } - file_smarthttp_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_smarthttp_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostReceivePackRequest); i { case 0: return &v.state @@ -763,7 +589,7 @@ func file_smarthttp_proto_init() { return nil } } - file_smarthttp_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_smarthttp_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostReceivePackResponse); i { case 0: return &v.state @@ -782,7 +608,7 @@ func file_smarthttp_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smarthttp_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/go/gitalypb/smarthttp_grpc.pb.go b/proto/go/gitalypb/smarthttp_grpc.pb.go index a4782f5f9..a6836121f 100644 --- a/proto/go/gitalypb/smarthttp_grpc.pb.go +++ b/proto/go/gitalypb/smarthttp_grpc.pb.go @@ -30,8 +30,6 @@ type SmartHTTPServiceClient interface { // Will be invoked when the user executes a `git push`, but only advertises // references to the user. 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 @@ -110,37 +108,6 @@ func (x *smartHTTPServiceInfoRefsReceivePackClient) Recv() (*InfoRefsResponse, e return m, nil } -func (c *smartHTTPServiceClient) PostUploadPack(ctx context.Context, opts ...grpc.CallOption) (SmartHTTPService_PostUploadPackClient, error) { - stream, err := c.cc.NewStream(ctx, &SmartHTTPService_ServiceDesc.Streams[2], "/gitaly.SmartHTTPService/PostUploadPack", opts...) - if err != nil { - return nil, err - } - x := &smartHTTPServicePostUploadPackClient{stream} - return x, nil -} - -type SmartHTTPService_PostUploadPackClient interface { - Send(*PostUploadPackRequest) error - Recv() (*PostUploadPackResponse, error) - grpc.ClientStream -} - -type smartHTTPServicePostUploadPackClient struct { - grpc.ClientStream -} - -func (x *smartHTTPServicePostUploadPackClient) Send(m *PostUploadPackRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *smartHTTPServicePostUploadPackClient) Recv() (*PostUploadPackResponse, error) { - m := new(PostUploadPackResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - 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...) @@ -151,7 +118,7 @@ func (c *smartHTTPServiceClient) PostUploadPackWithSidechannel(ctx context.Conte } 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...) + stream, err := c.cc.NewStream(ctx, &SmartHTTPService_ServiceDesc.Streams[2], "/gitaly.SmartHTTPService/PostReceivePack", opts...) if err != nil { return nil, err } @@ -193,8 +160,6 @@ type SmartHTTPServiceServer interface { // Will be invoked when the user executes a `git push`, but only advertises // references to the user. 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 @@ -212,9 +177,6 @@ func (UnimplementedSmartHTTPServiceServer) InfoRefsUploadPack(*InfoRefsRequest, func (UnimplementedSmartHTTPServiceServer) InfoRefsReceivePack(*InfoRefsRequest, SmartHTTPService_InfoRefsReceivePackServer) error { return status.Errorf(codes.Unimplemented, "method InfoRefsReceivePack not implemented") } -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") } @@ -276,32 +238,6 @@ func (x *smartHTTPServiceInfoRefsReceivePackServer) Send(m *InfoRefsResponse) er return x.ServerStream.SendMsg(m) } -func _SmartHTTPService_PostUploadPack_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SmartHTTPServiceServer).PostUploadPack(&smartHTTPServicePostUploadPackServer{stream}) -} - -type SmartHTTPService_PostUploadPackServer interface { - Send(*PostUploadPackResponse) error - Recv() (*PostUploadPackRequest, error) - grpc.ServerStream -} - -type smartHTTPServicePostUploadPackServer struct { - grpc.ServerStream -} - -func (x *smartHTTPServicePostUploadPackServer) Send(m *PostUploadPackResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *smartHTTPServicePostUploadPackServer) Recv() (*PostUploadPackRequest, error) { - m := new(PostUploadPackRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - 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 { @@ -370,12 +306,6 @@ var SmartHTTPService_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, }, { - StreamName: "PostUploadPack", - Handler: _SmartHTTPService_PostUploadPack_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { StreamName: "PostReceivePack", Handler: _SmartHTTPService_PostReceivePack_Handler, ServerStreams: true, diff --git a/proto/smarthttp.proto b/proto/smarthttp.proto index a0e6aaad5..5072d40e3 100644 --- a/proto/smarthttp.proto +++ b/proto/smarthttp.proto @@ -28,13 +28,6 @@ service SmartHTTPService { }; } - // 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 /upload-pack using sidechannel protocol rpc PostUploadPackWithSidechannel(PostUploadPackWithSidechannelRequest) returns (PostUploadPackWithSidechannelResponse) { option (op_type) = { @@ -68,25 +61,6 @@ message InfoRefsResponse { } // This comment is left unintentionally blank. -message PostUploadPackRequest { - // repository should only be present in the first message of the stream - Repository repository = 1 [(target_repository)=true]; - // 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; -} - -// This comment is left unintentionally blank. -message PostUploadPackResponse { - // Raw data from stdout of 'git upload-pack' - bytes data = 1; -} - -// This comment is left unintentionally blank. message PostUploadPackWithSidechannelRequest { // repository should only be present in the first message of the stream Repository repository = 1 [(target_repository)=true]; |