Commit 28902eaa authored by Jacob Vosmaer's avatar Jacob Vosmaer Committed by Nick Thomas

Upgrade gitaly library code to v1.57.0

parent 497439b9
......@@ -15,7 +15,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
......
......@@ -23,7 +23,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/git"
......
......@@ -12,7 +12,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
......
......@@ -19,7 +19,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
......
......@@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper"
)
......
......@@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
......
......@@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
......
......@@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
......
......@@ -5,7 +5,7 @@ import (
"io"
"net/http"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
......
......@@ -7,7 +7,7 @@ import (
"net/http"
"strconv"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
)
......
......@@ -6,7 +6,7 @@ import (
"io"
"net/http"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
)
......
......@@ -8,9 +8,9 @@ import (
"github.com/golang/protobuf/proto"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
gitalyauth "gitlab.com/gitlab-org/gitaly/auth"
gitalyclient "gitlab.com/gitlab-org/gitaly/client"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"google.golang.org/grpc"
grpccorrelation "gitlab.com/gitlab-org/labkit/correlation/grpc"
......
package gitaly
import "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
import "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
// NamespaceClient encapsulates NamespaceService calls
type NamespaceClient struct {
......
......@@ -5,7 +5,7 @@ import (
"fmt"
"io"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
)
......
......@@ -5,7 +5,7 @@ import (
"fmt"
"io"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
)
......
......@@ -4,7 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
)
func TestUnmarshalJSON(t *testing.T) {
......
......@@ -10,7 +10,7 @@ import (
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/labkit/log"
"golang.org/x/net/context"
"google.golang.org/grpc/codes"
......
package testhelper
import (
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"golang.org/x/net/context"
)
......@@ -176,3 +176,15 @@ func (s *GitalyTestServer) FetchHTTPRemote(context.Context, *gitalypb.FetchHTTPR
func (s *GitalyTestServer) PreFetch(context.Context, *gitalypb.PreFetchRequest) (*gitalypb.PreFetchResponse, error) {
return nil, nil
}
func (s *GitalyTestServer) CloneFromPool(context.Context, *gitalypb.CloneFromPoolRequest) (*gitalypb.CloneFromPoolResponse, error) {
return nil, nil
}
func (s *GitalyTestServer) CloneFromPoolInternal(context.Context, *gitalypb.CloneFromPoolInternalRequest) (*gitalypb.CloneFromPoolInternalResponse, error) {
return nil, nil
}
func (s *GitalyTestServer) GetObjectDirectorySize(context.Context, *gitalypb.GetObjectDirectorySizeRequest) (*gitalypb.GetObjectDirectorySizeResponse, error) {
return nil, nil
}
......@@ -20,7 +20,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/labkit/log"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
......
The MIT License (MIT)
Copyright (c) 2016-2017 GitLab B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cleanup.proto
package gitalypb // import "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type ApplyBfgObjectMapRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
// A raw object-map file as generated by BFG: https://rtyley.github.io/bfg-repo-cleaner
// Each line in the file has two object SHAs, space-separated - the original
// SHA of the object, and the SHA after BFG has rewritten the object.
ObjectMap []byte `protobuf:"bytes,2,opt,name=object_map,json=objectMap,proto3" json:"object_map,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApplyBfgObjectMapRequest) Reset() { *m = ApplyBfgObjectMapRequest{} }
func (m *ApplyBfgObjectMapRequest) String() string { return proto.CompactTextString(m) }
func (*ApplyBfgObjectMapRequest) ProtoMessage() {}
func (*ApplyBfgObjectMapRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_cleanup_048c113e3f69de1a, []int{0}
}
func (m *ApplyBfgObjectMapRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyBfgObjectMapRequest.Unmarshal(m, b)
}
func (m *ApplyBfgObjectMapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApplyBfgObjectMapRequest.Marshal(b, m, deterministic)
}
func (dst *ApplyBfgObjectMapRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApplyBfgObjectMapRequest.Merge(dst, src)
}
func (m *ApplyBfgObjectMapRequest) XXX_Size() int {
return xxx_messageInfo_ApplyBfgObjectMapRequest.Size(m)
}
func (m *ApplyBfgObjectMapRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ApplyBfgObjectMapRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ApplyBfgObjectMapRequest proto.InternalMessageInfo
func (m *ApplyBfgObjectMapRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *ApplyBfgObjectMapRequest) GetObjectMap() []byte {
if m != nil {
return m.ObjectMap
}
return nil
}
type ApplyBfgObjectMapResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApplyBfgObjectMapResponse) Reset() { *m = ApplyBfgObjectMapResponse{} }
func (m *ApplyBfgObjectMapResponse) String() string { return proto.CompactTextString(m) }
func (*ApplyBfgObjectMapResponse) ProtoMessage() {}
func (*ApplyBfgObjectMapResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_cleanup_048c113e3f69de1a, []int{1}
}
func (m *ApplyBfgObjectMapResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyBfgObjectMapResponse.Unmarshal(m, b)
}
func (m *ApplyBfgObjectMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApplyBfgObjectMapResponse.Marshal(b, m, deterministic)
}
func (dst *ApplyBfgObjectMapResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApplyBfgObjectMapResponse.Merge(dst, src)
}
func (m *ApplyBfgObjectMapResponse) XXX_Size() int {
return xxx_messageInfo_ApplyBfgObjectMapResponse.Size(m)
}
func (m *ApplyBfgObjectMapResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ApplyBfgObjectMapResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ApplyBfgObjectMapResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*ApplyBfgObjectMapRequest)(nil), "gitaly.ApplyBfgObjectMapRequest")
proto.RegisterType((*ApplyBfgObjectMapResponse)(nil), "gitaly.ApplyBfgObjectMapResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// CleanupServiceClient is the client API for CleanupService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CleanupServiceClient interface {
ApplyBfgObjectMap(ctx context.Context, opts ...grpc.CallOption) (CleanupService_ApplyBfgObjectMapClient, error)
}
type cleanupServiceClient struct {
cc *grpc.ClientConn
}
func NewCleanupServiceClient(cc *grpc.ClientConn) CleanupServiceClient {
return &cleanupServiceClient{cc}
}
func (c *cleanupServiceClient) ApplyBfgObjectMap(ctx context.Context, opts ...grpc.CallOption) (CleanupService_ApplyBfgObjectMapClient, error) {
stream, err := c.cc.NewStream(ctx, &_CleanupService_serviceDesc.Streams[0], "/gitaly.CleanupService/ApplyBfgObjectMap", opts...)
if err != nil {
return nil, err
}
x := &cleanupServiceApplyBfgObjectMapClient{stream}
return x, nil
}
type CleanupService_ApplyBfgObjectMapClient interface {
Send(*ApplyBfgObjectMapRequest) error
CloseAndRecv() (*ApplyBfgObjectMapResponse, error)
grpc.ClientStream
}
type cleanupServiceApplyBfgObjectMapClient struct {
grpc.ClientStream
}
func (x *cleanupServiceApplyBfgObjectMapClient) Send(m *ApplyBfgObjectMapRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *cleanupServiceApplyBfgObjectMapClient) CloseAndRecv() (*ApplyBfgObjectMapResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(ApplyBfgObjectMapResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// CleanupServiceServer is the server API for CleanupService service.
type CleanupServiceServer interface {
ApplyBfgObjectMap(CleanupService_ApplyBfgObjectMapServer) error
}
func RegisterCleanupServiceServer(s *grpc.Server, srv CleanupServiceServer) {
s.RegisterService(&_CleanupService_serviceDesc, srv)
}
func _CleanupService_ApplyBfgObjectMap_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(CleanupServiceServer).ApplyBfgObjectMap(&cleanupServiceApplyBfgObjectMapServer{stream})
}
type CleanupService_ApplyBfgObjectMapServer interface {
SendAndClose(*ApplyBfgObjectMapResponse) error
Recv() (*ApplyBfgObjectMapRequest, error)
grpc.ServerStream
}
type cleanupServiceApplyBfgObjectMapServer struct {
grpc.ServerStream
}
func (x *cleanupServiceApplyBfgObjectMapServer) SendAndClose(m *ApplyBfgObjectMapResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *cleanupServiceApplyBfgObjectMapServer) Recv() (*ApplyBfgObjectMapRequest, error) {
m := new(ApplyBfgObjectMapRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _CleanupService_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.CleanupService",
HandlerType: (*CleanupServiceServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "ApplyBfgObjectMap",
Handler: _CleanupService_ApplyBfgObjectMap_Handler,
ClientStreams: true,
},
},
Metadata: "cleanup.proto",
}
func init() { proto.RegisterFile("cleanup.proto", fileDescriptor_cleanup_048c113e3f69de1a) }
var fileDescriptor_cleanup_048c113e3f69de1a = []byte{
// 234 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xce, 0x49, 0x4d,
0xcc, 0x2b, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0xcf, 0x2c, 0x49, 0xcc,
0xa9, 0x94, 0xe2, 0x29, 0xce, 0x48, 0x2c, 0x4a, 0x4d, 0x81, 0x88, 0x2a, 0x95, 0x72, 0x49, 0x38,
0x16, 0x14, 0xe4, 0x54, 0x3a, 0xa5, 0xa5, 0xfb, 0x27, 0x65, 0xa5, 0x26, 0x97, 0xf8, 0x26, 0x16,
0x04, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x19, 0x71, 0x71, 0x15, 0xa5, 0x16, 0xe4, 0x17,
0x67, 0x96, 0xe4, 0x17, 0x55, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xe9, 0x41, 0x8c,
0xd1, 0x0b, 0x82, 0xcb, 0x04, 0x21, 0xa9, 0x12, 0x92, 0xe5, 0xe2, 0xca, 0x07, 0x9b, 0x13, 0x9f,
0x9b, 0x58, 0x20, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x13, 0xc4, 0x99, 0x0f, 0x33, 0xd9, 0x8a, 0xed,
0xd3, 0x74, 0x0d, 0x26, 0x0e, 0x46, 0x25, 0x69, 0x2e, 0x49, 0x2c, 0xd6, 0x16, 0x17, 0xe4, 0xe7,
0x15, 0xa7, 0x1a, 0xe5, 0x71, 0xf1, 0x39, 0x43, 0x9c, 0x1e, 0x9c, 0x5a, 0x54, 0x96, 0x99, 0x9c,
0x2a, 0x14, 0xc3, 0x25, 0x88, 0xa1, 0x5c, 0x48, 0x01, 0xe6, 0x14, 0x5c, 0x1e, 0x90, 0x52, 0xc4,
0xa3, 0x02, 0x62, 0x97, 0x12, 0x83, 0x06, 0xa3, 0x93, 0x41, 0x14, 0x48, 0x5d, 0x4e, 0x62, 0x92,
0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x84, 0xa9, 0x9b, 0x5f, 0x94, 0xae, 0x0f, 0xd1, 0xad, 0x0b, 0x0e,
0x29, 0xfd, 0xf4, 0x7c, 0x28, 0xbf, 0x20, 0x29, 0x89, 0x0d, 0x2c, 0x64, 0x0c, 0x08, 0x00, 0x00,
0xff, 0xff, 0x10, 0x0a, 0xea, 0x78, 0x63, 0x01, 0x00, 0x00,
}
module gitlab.com/gitlab-org/gitaly-proto/go/gitalypb
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: notifications.proto
package gitalypb // import "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type PostReceiveRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PostReceiveRequest) Reset() { *m = PostReceiveRequest{} }
func (m *PostReceiveRequest) String() string { return proto.CompactTextString(m) }
func (*PostReceiveRequest) ProtoMessage() {}
func (*PostReceiveRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_notifications_d4195fd8574bef8b, []int{0}
}
func (m *PostReceiveRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PostReceiveRequest.Unmarshal(m, b)
}
func (m *PostReceiveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PostReceiveRequest.Marshal(b, m, deterministic)
}
func (dst *PostReceiveRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PostReceiveRequest.Merge(dst, src)
}
func (m *PostReceiveRequest) XXX_Size() int {
return xxx_messageInfo_PostReceiveRequest.Size(m)
}
func (m *PostReceiveRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PostReceiveRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PostReceiveRequest proto.InternalMessageInfo
func (m *PostReceiveRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
type PostReceiveResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PostReceiveResponse) Reset() { *m = PostReceiveResponse{} }
func (m *PostReceiveResponse) String() string { return proto.CompactTextString(m) }
func (*PostReceiveResponse) ProtoMessage() {}
func (*PostReceiveResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_notifications_d4195fd8574bef8b, []int{1}
}
func (m *PostReceiveResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PostReceiveResponse.Unmarshal(m, b)
}
func (m *PostReceiveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PostReceiveResponse.Marshal(b, m, deterministic)
}
func (dst *PostReceiveResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PostReceiveResponse.Merge(dst, src)
}
func (m *PostReceiveResponse) XXX_Size() int {
return xxx_messageInfo_PostReceiveResponse.Size(m)
}
func (m *PostReceiveResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PostReceiveResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PostReceiveResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*PostReceiveRequest)(nil), "gitaly.PostReceiveRequest")
proto.RegisterType((*PostReceiveResponse)(nil), "gitaly.PostReceiveResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// NotificationServiceClient is the client API for NotificationService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NotificationServiceClient interface {
PostReceive(ctx context.Context, in *PostReceiveRequest, opts ...grpc.CallOption) (*PostReceiveResponse, error)
}
type notificationServiceClient struct {
cc *grpc.ClientConn
}
func NewNotificationServiceClient(cc *grpc.ClientConn) NotificationServiceClient {
return &notificationServiceClient{cc}
}
func (c *notificationServiceClient) PostReceive(ctx context.Context, in *PostReceiveRequest, opts ...grpc.CallOption) (*PostReceiveResponse, error) {
out := new(PostReceiveResponse)
err := c.cc.Invoke(ctx, "/gitaly.NotificationService/PostReceive", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NotificationServiceServer is the server API for NotificationService service.
type NotificationServiceServer interface {
PostReceive(context.Context, *PostReceiveRequest) (*PostReceiveResponse, error)
}
func RegisterNotificationServiceServer(s *grpc.Server, srv NotificationServiceServer) {
s.RegisterService(&_NotificationService_serviceDesc, srv)
}
func _NotificationService_PostReceive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PostReceiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).PostReceive(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.NotificationService/PostReceive",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).PostReceive(ctx, req.(*PostReceiveRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NotificationService_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.NotificationService",
HandlerType: (*NotificationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PostReceive",
Handler: _NotificationService_PostReceive_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "notifications.proto",
}
func init() { proto.RegisterFile("notifications.proto", fileDescriptor_notifications_d4195fd8574bef8b) }
var fileDescriptor_notifications_d4195fd8574bef8b = []byte{
// 209 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xcb, 0x2f, 0xc9,
0x4c, 0xcb, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
0x62, 0x4b, 0xcf, 0x2c, 0x49, 0xcc, 0xa9, 0x94, 0xe2, 0x29, 0xce, 0x48, 0x2c, 0x4a, 0x4d, 0x81,
0x88, 0x2a, 0x05, 0x70, 0x09, 0x05, 0xe4, 0x17, 0x97, 0x04, 0xa5, 0x26, 0xa7, 0x66, 0x96, 0xa5,
0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x19, 0x71, 0x71, 0x15, 0xa5, 0x16, 0xe4, 0x17,
0x67, 0x96, 0xe4, 0x17, 0x55, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xe9, 0x41, 0x0c,
0xd0, 0x0b, 0x82, 0xcb, 0x04, 0x21, 0xa9, 0xb2, 0x62, 0xfb, 0x34, 0x5d, 0x83, 0x89, 0x83, 0x49,
0x49, 0x94, 0x4b, 0x18, 0xc5, 0xc4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xa3, 0x78, 0x2e, 0x61,
0x3f, 0x24, 0x57, 0x05, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x0a, 0x79, 0x70, 0x71, 0x23, 0xa9,
0x16, 0x92, 0x82, 0x59, 0x82, 0xe9, 0x28, 0x29, 0x69, 0xac, 0x72, 0x10, 0xe3, 0x95, 0x18, 0x9c,
0x0c, 0xa2, 0x40, 0xf2, 0x39, 0x89, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0xa6, 0x6e, 0x7e,
0x51, 0xba, 0x3e, 0x44, 0x97, 0x2e, 0xd8, 0xbf, 0xfa, 0xe9, 0xf9, 0x50, 0x7e, 0x41, 0x52, 0x12,
0x1b, 0x58, 0xc8, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x55, 0x04, 0xb1, 0x1c, 0x2f, 0x01, 0x00,
0x00,
}
This diff is collapsed.
package gitalyauth
import (
"context"
"encoding/base64"
"fmt"
"strconv"
"time"
"golang.org/x/net/context"
"google.golang.org/grpc/credentials"
)
......
package gitalyauth
import (
"context"
"crypto/hmac"
"crypto/sha256"
"crypto/subtle"
......@@ -10,8 +11,7 @@ import (
"strings"
"time"
"github.com/grpc-ecosystem/go-grpc-middleware/auth"
"golang.org/x/net/context"
grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
......
......@@ -55,10 +55,13 @@ func Dial(rawAddress string, connOpts []grpc.DialOption) (*grpc.ClientConn, erro
connOpts = append(connOpts, grpc.WithInsecure())
case unixConnection:
canonicalAddress = rawAddress // This will be overriden by the custom dialer...
canonicalAddress = rawAddress // This will be overridden by the custom dialer...
connOpts = append(
connOpts,
grpc.WithInsecure(),
// Use a custom dialer to ensure that we don't experience
// issues in environments that have proxy configurations
// https://gitlab.com/gitlab-org/gitaly/merge_requests/1072#note_140408512
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
path, err := extractPathFromSocketURL(addr)
if err != nil {
......
......@@ -4,7 +4,7 @@ import (
"context"
"io"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
"google.golang.org/grpc"
)
......
......@@ -4,7 +4,7 @@ import (
"fmt"
"io"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
)
type stdoutStderrResponse interface {
......
......@@ -4,7 +4,7 @@ import (
"context"
"io"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
"google.golang.org/grpc"
)
......
......@@ -4,7 +4,7 @@ import (
"context"
"io"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
"google.golang.org/grpc"
)
......
package gitalypb
// Code generated by protoc-gen-gitaly. DO NOT EDIT
// GitalyProtos is a list of gitaly protobuf files
var GitalyProtos = []string{
"blob.proto",
"cleanup.proto",
"commit.proto",
"conflicts.proto",
"diff.proto",
"namespace.proto",
"objectpool.proto",
"operations.proto",
"ref.proto",
"remote.proto",
"repository-service.proto",
"server.proto",
"shared.proto",
"smarthttp.proto",
"ssh.proto",
"storage.proto",
"wiki.proto",
}
......@@ -569,36 +569,36 @@
"revisionTime": "2018-11-02T16:30:54Z"
},
{
"checksumSHA1": "0SRNhL8pjnvbTuxsGBM0a1KECl4=",
"path": "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb",
"revision": "a78297381af20d4ac7108c07c09539ae70ebf074",
"revisionTime": "2019-03-27T06:54:18Z",
"version": "v1.19.0",
"versionExact": "v1.19.0"
},
{
"checksumSHA1": "SbYAalNU5azT8lJGerDI4I/Nw84=",
"checksumSHA1": "eRUc8HVxFw7kNzeT7oi9NtEnr/Q=",
"path": "gitlab.com/gitlab-org/gitaly/auth",
"revision": "8a8daada771e4659baeb6fc08178179ea78010a6",
"revisionTime": "2018-09-07T08:03:54Z",
"version": "v0.120.0",
"versionExact": "v0.120.0"
"revision": "a8e2980b1ffe1a728ab13032dc81f90f4b990a03",
"revisionTime": "2019-08-07T10:01:44Z",
"version": "v1.57.0",
"versionExact": "v1.57.0"
},
{
"checksumSHA1": "aL94A408/lEOF/XC4KDHvZnwnbk=",
"checksumSHA1": "v26xJ6qOTee2cJ/NR8pH3YTkLpY=",
"path": "gitlab.com/gitlab-org/gitaly/client",
"revision": "ef786ff72690836cc3ec1214b11bd10748271c5b",
"revisionTime": "2019-01-14T13:41:50Z",
"version": "v1.13.0",
"versionExact": "v1.13.0"
"revision": "a8e2980b1ffe1a728ab13032dc81f90f4b990a03",
"revisionTime": "2019-08-07T10:01:44Z",
"version": "v1.57.0",
"versionExact": "v1.57.0"
},
{
"checksumSHA1": "s3Vqfux+BOQOXQN3bHvCHPxTR6k=",
"path": "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb",
"revision": "a8e2980b1ffe1a728ab13032dc81f90f4b990a03",
"revisionTime": "2019-08-07T10:01:44Z",
"version": "v1.57.0",
"versionExact": "v1.57.0"
},
{
"checksumSHA1": "mifcYH0qXpoPkX5KzXoM3mterWQ=",
"path": "gitlab.com/gitlab-org/gitaly/streamio",
"revision": "95a198aef54c42fd8e84c62acc63f0cd620864b3",
"revisionTime": "2018-01-18T11:33:00Z",
"version": "v0.71.0",
"versionExact": "v0.71.0"
"revision": "a8e2980b1ffe1a728ab13032dc81f90f4b990a03",
"revisionTime": "2019-08-07T10:01:44Z",
"version": "v1.57.0",
"versionExact": "v1.57.0"
},
{
"checksumSHA1": "86VccaJApU9EEq4KKen8DX9gMUM=",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment