Commit a7c243bb authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Upgrade gitaly Client dependency

The client now has TLS support. So this gets pulled into this component.
To make it work, we have to upgrade the proto too.
parent 46f05944
......@@ -14,5 +14,5 @@ To update e.g. `gitaly-proto` run the following command in the root
directory of the project.
```
support/go-update-vendor gitlab.com/gitlab-org/gitaly-proto/go@v0.109.0
support/go-update-vendor gitlab.com/gitlab-org/gitaly-proto/go/gitalypb@v1.3.0
```
......@@ -5,10 +5,9 @@ import (
"fmt"
"os"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/handler"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/logger"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
)
func init() {
......@@ -24,7 +23,7 @@ func main() {
logger.Fatal("wrong number of arguments", fmt.Errorf("expected 2 arguments, got %v", os.Args))
}
var request pb.SSHReceivePackRequest
var request gitalypb.SSHReceivePackRequest
if err := json.Unmarshal([]byte(os.Args[2]), &request); err != nil {
logger.Fatal("unmarshaling request json failed", err)
}
......
......@@ -5,17 +5,16 @@ import (
"fmt"
"os"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/handler"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/logger"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
)
func init() {
logger.ProgName = "gitaly-upload-archive"
}
type uploadArchiveHandler func(gitalyAddress string, request *pb.SSHUploadArchiveRequest) (int32, error)
type uploadArchiveHandler func(gitalyAddress string, request *gitalypb.SSHUploadArchiveRequest) (int32, error)
func main() {
if err := handler.Prepare(); err != nil {
......@@ -36,7 +35,7 @@ func uploadArchive(handler uploadArchiveHandler, args []string) (int32, error) {
return 0, fmt.Errorf("wrong number of arguments: expected 2 arguments, got %v", args)
}
var request pb.SSHUploadArchiveRequest
var request gitalypb.SSHUploadArchiveRequest
if err := json.Unmarshal([]byte(args[2]), &request); err != nil {
return 0, fmt.Errorf("unmarshaling request json failed: %v", err)
}
......
......@@ -5,7 +5,7 @@ import (
"strings"
"testing"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
)
var testGitalyAddress = "unix:gitaly.socket"
......@@ -13,7 +13,7 @@ var testGitalyAddress = "unix:gitaly.socket"
func TestUploadArchiveSuccess(t *testing.T) {
testRelativePath := "myrepo.git"
requestJSON := fmt.Sprintf(`{"repository":{"relative_path":"%s"}}`, testRelativePath)
mockHandler := func(gitalyAddress string, request *pb.SSHUploadArchiveRequest) (int32, error) {
mockHandler := func(gitalyAddress string, request *gitalypb.SSHUploadArchiveRequest) (int32, error) {
if gitalyAddress != testGitalyAddress {
t.Fatalf("Expected gitaly address %s got %v", testGitalyAddress, gitalyAddress)
}
......@@ -35,7 +35,7 @@ func TestUploadArchiveSuccess(t *testing.T) {
}
func TestUploadArchiveFailure(t *testing.T) {
mockHandler := func(_ string, _ *pb.SSHUploadArchiveRequest) (int32, error) {
mockHandler := func(_ string, _ *gitalypb.SSHUploadArchiveRequest) (int32, error) {
t.Fatal("Expected handler not to be called")
return 0, nil
......
......@@ -5,10 +5,9 @@ import (
"fmt"
"os"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/handler"
"gitlab.com/gitlab-org/gitlab-shell/go/internal/logger"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
)
func init() {
......@@ -24,7 +23,7 @@ func main() {
logger.Fatal("wrong number of arguments", fmt.Errorf("expected 2 arguments, got %v", os.Args))
}
var request pb.SSHUploadPackRequest
var request gitalypb.SSHUploadPackRequest
if err := json.Unmarshal([]byte(os.Args[2]), &request); err != nil {
logger.Fatal("unmarshaling request json failed", err)
}
......
......@@ -5,11 +5,11 @@ import (
"fmt"
"os"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/client"
)
func ReceivePack(gitalyAddress string, request *pb.SSHReceivePackRequest) (int32, error) {
func ReceivePack(gitalyAddress string, request *gitalypb.SSHReceivePackRequest) (int32, error) {
if gitalyAddress == "" {
return 0, fmt.Errorf("no gitaly_address given")
}
......
......@@ -5,11 +5,11 @@ import (
"fmt"
"os"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/client"
)
func UploadArchive(gitalyAddress string, request *pb.SSHUploadArchiveRequest) (int32, error) {
func UploadArchive(gitalyAddress string, request *gitalypb.SSHUploadArchiveRequest) (int32, error) {
if gitalyAddress == "" {
return 0, fmt.Errorf("no gitaly_address given")
}
......
......@@ -5,11 +5,11 @@ import (
"fmt"
"os"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitaly-proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/client"
)
func UploadPack(gitalyAddress string, request *pb.SSHUploadPackRequest) (int32, error) {
func UploadPack(gitalyAddress string, request *gitalypb.SSHUploadPackRequest) (int32, error) {
if gitalyAddress == "" {
return 0, fmt.Errorf("no gitaly_address given")
}
......
......@@ -2,16 +2,17 @@
// source: blob.proto
/*
Package gitaly is a generated protocol buffer package.
Package gitalypb is a generated protocol buffer package.
It is generated from these files:
blob.proto
cleanup.proto
commit.proto
conflicts.proto
deprecated-services.proto
diff.proto
namespace.proto
notifications.proto
objectpool.proto
operations.proto
ref.proto
remote.proto
......@@ -36,6 +37,8 @@ It has these top-level messages:
GetNewLFSPointersResponse
GetAllLFSPointersRequest
GetAllLFSPointersResponse
ApplyBfgObjectMapRequest
ApplyBfgObjectMapResponse
CommitStatsRequest
CommitStatsResponse
CommitIsAncestorRequest
......@@ -65,6 +68,8 @@ It has these top-level messages:
RawBlameResponse
LastCommitForPathRequest
LastCommitForPathResponse
ListLastCommitsForTreeRequest
ListLastCommitsForTreeResponse
CommitsByMessageRequest
CommitsByMessageResponse
FilterShasWithSignaturesRequest
......@@ -106,6 +111,15 @@ It has these top-level messages:
RenameNamespaceResponse
PostReceiveRequest
PostReceiveResponse
ObjectPool
CreateObjectPoolRequest
CreateObjectPoolResponse
DeleteObjectPoolRequest
DeleteObjectPoolResponse
LinkRepositoryToObjectPoolRequest
LinkRepositoryToObjectPoolResponse
UnlinkRepositoryFromObjectPoolRequest
UnlinkRepositoryFromObjectPoolResponse
UserCreateBranchRequest
UserCreateBranchResponse
UserUpdateBranchRequest
......@@ -134,6 +148,10 @@ It has these top-level messages:
UserRebaseResponse
UserSquashRequest
UserSquashResponse
UserApplyPatchRequest
UserApplyPatchResponse
UserUpdateSubmoduleRequest
UserUpdateSubmoduleResponse
ListNewBlobsRequest
ListNewBlobsResponse
FindDefaultBranchNameRequest
......@@ -182,6 +200,8 @@ It has these top-level messages:
UpdateRemoteMirrorResponse
FindRemoteRepositoryRequest
FindRemoteRepositoryResponse
FindRemoteRootRefRequest
FindRemoteRootRefResponse
RepositoryExistsRequest
RepositoryExistsResponse
RepackIncrementalRequest
......@@ -271,6 +291,8 @@ It has these top-level messages:
SSHReceivePackResponse
SSHUploadArchiveRequest
SSHUploadArchiveResponse
ListDirectoriesRequest
ListDirectoriesResponse
DeleteAllRepositoriesRequest
DeleteAllRepositoriesResponse
WikiCommitDetails
......@@ -293,7 +315,7 @@ It has these top-level messages:
WikiGetFormattedDataRequest
WikiGetFormattedDataResponse
*/
package gitaly
package gitalypb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cleanup.proto
package 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
type ApplyBfgObjectMapRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" 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"`
}
func (m *ApplyBfgObjectMapRequest) Reset() { *m = ApplyBfgObjectMapRequest{} }
func (m *ApplyBfgObjectMapRequest) String() string { return proto.CompactTextString(m) }
func (*ApplyBfgObjectMapRequest) ProtoMessage() {}
func (*ApplyBfgObjectMapRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
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 {
}
func (m *ApplyBfgObjectMapResponse) Reset() { *m = ApplyBfgObjectMapResponse{} }
func (m *ApplyBfgObjectMapResponse) String() string { return proto.CompactTextString(m) }
func (*ApplyBfgObjectMapResponse) ProtoMessage() {}
func (*ApplyBfgObjectMapResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
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
// Client API for CleanupService service
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 := grpc.NewClientStream(ctx, &_CleanupService_serviceDesc.Streams[0], c.cc, "/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
}
// 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", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 195 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, 0xe5, 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, 0x59, 0x49, 0x9a,
0x4b, 0x12, 0x8b, 0x75, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, 0x79, 0x5c, 0x7c, 0xce, 0x10,
0x27, 0x07, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x0a, 0xc5, 0x70, 0x09, 0x62, 0x28, 0x17, 0x52,
0x80, 0x39, 0x01, 0x97, 0xc3, 0xa5, 0x14, 0xf1, 0xa8, 0x80, 0xd8, 0xa5, 0xc4, 0xa0, 0xc1, 0x98,
0xc4, 0x06, 0x0e, 0x02, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x2a, 0x94, 0xb4, 0x29,
0x01, 0x00, 0x00,
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: conflicts.proto
package gitaly
package gitalypb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
......@@ -26,7 +26,7 @@ type ListConflictFilesRequest struct {
func (m *ListConflictFilesRequest) Reset() { *m = ListConflictFilesRequest{} }
func (m *ListConflictFilesRequest) String() string { return proto.CompactTextString(m) }
func (*ListConflictFilesRequest) ProtoMessage() {}
func (*ListConflictFilesRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (*ListConflictFilesRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *ListConflictFilesRequest) GetRepository() *Repository {
if m != nil {
......@@ -60,7 +60,7 @@ type ConflictFileHeader struct {
func (m *ConflictFileHeader) Reset() { *m = ConflictFileHeader{} }
func (m *ConflictFileHeader) String() string { return proto.CompactTextString(m) }
func (*ConflictFileHeader) ProtoMessage() {}
func (*ConflictFileHeader) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (*ConflictFileHeader) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
func (m *ConflictFileHeader) GetRepository() *Repository {
if m != nil {
......@@ -107,7 +107,7 @@ type ConflictFile struct {
func (m *ConflictFile) Reset() { *m = ConflictFile{} }
func (m *ConflictFile) String() string { return proto.CompactTextString(m) }
func (*ConflictFile) ProtoMessage() {}
func (*ConflictFile) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
func (*ConflictFile) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
type isConflictFile_ConflictFilePayload interface{ isConflictFile_ConflictFilePayload() }
......@@ -219,7 +219,7 @@ type ListConflictFilesResponse struct {
func (m *ListConflictFilesResponse) Reset() { *m = ListConflictFilesResponse{} }
func (m *ListConflictFilesResponse) String() string { return proto.CompactTextString(m) }
func (*ListConflictFilesResponse) ProtoMessage() {}
func (*ListConflictFilesResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
func (*ListConflictFilesResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
func (m *ListConflictFilesResponse) GetFiles() []*ConflictFile {
if m != nil {
......@@ -242,7 +242,7 @@ type ResolveConflictsRequestHeader struct {
func (m *ResolveConflictsRequestHeader) Reset() { *m = ResolveConflictsRequestHeader{} }
func (m *ResolveConflictsRequestHeader) String() string { return proto.CompactTextString(m) }
func (*ResolveConflictsRequestHeader) ProtoMessage() {}
func (*ResolveConflictsRequestHeader) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
func (*ResolveConflictsRequestHeader) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{4} }
func (m *ResolveConflictsRequestHeader) GetRepository() *Repository {
if m != nil {
......@@ -310,7 +310,7 @@ type ResolveConflictsRequest struct {
func (m *ResolveConflictsRequest) Reset() { *m = ResolveConflictsRequest{} }
func (m *ResolveConflictsRequest) String() string { return proto.CompactTextString(m) }
func (*ResolveConflictsRequest) ProtoMessage() {}
func (*ResolveConflictsRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
func (*ResolveConflictsRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{5} }
type isResolveConflictsRequest_ResolveConflictsRequestPayload interface{ isResolveConflictsRequest_ResolveConflictsRequestPayload() }
......@@ -422,7 +422,7 @@ type ResolveConflictsResponse struct {
func (m *ResolveConflictsResponse) Reset() { *m = ResolveConflictsResponse{} }
func (m *ResolveConflictsResponse) String() string { return proto.CompactTextString(m) }
func (*ResolveConflictsResponse) ProtoMessage() {}
func (*ResolveConflictsResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} }
func (*ResolveConflictsResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{6} }
func (m *ResolveConflictsResponse) GetResolutionError() string {
if m != nil {
......@@ -607,9 +607,9 @@ var _ConflictsService_serviceDesc = grpc.ServiceDesc{
Metadata: "conflicts.proto",
}
func init() { proto.RegisterFile("conflicts.proto", fileDescriptor2) }
func init() { proto.RegisterFile("conflicts.proto", fileDescriptor3) }
var fileDescriptor2 = []byte{
var fileDescriptor3 = []byte{
// 575 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xd1, 0x6a, 0x13, 0x41,
0x14, 0x86, 0xbb, 0x6d, 0x93, 0x34, 0xa7, 0xdb, 0x34, 0x1d, 0x94, 0x6e, 0x03, 0xa1, 0xdb, 0xad,
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: namespace.proto
package gitaly
package gitalypb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: notifications.proto
package gitaly
package gitalypb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: server.proto
package gitaly
package gitalypb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
......@@ -23,7 +23,7 @@ type ServerInfoRequest struct {
func (m *ServerInfoRequest) Reset() { *m = ServerInfoRequest{} }
func (m *ServerInfoRequest) String() string { return proto.CompactTextString(m) }
func (*ServerInfoRequest) ProtoMessage() {}
func (*ServerInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} }
func (*ServerInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{0} }
type ServerInfoResponse struct {
ServerVersion string `protobuf:"bytes,1,opt,name=server_version,json=serverVersion" json:"server_version,omitempty"`
......@@ -34,7 +34,7 @@ type ServerInfoResponse struct {
func (m *ServerInfoResponse) Reset() { *m = ServerInfoResponse{} }
func (m *ServerInfoResponse) String() string { return proto.CompactTextString(m) }
func (*ServerInfoResponse) ProtoMessage() {}
func (*ServerInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{1} }
func (*ServerInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{1} }
func (m *ServerInfoResponse) GetServerVersion() string {
if m != nil {
......@@ -67,7 +67,7 @@ func (m *ServerInfoResponse_StorageStatus) Reset() { *m = ServerInfoResp
func (m *ServerInfoResponse_StorageStatus) String() string { return proto.CompactTextString(m) }
func (*ServerInfoResponse_StorageStatus) ProtoMessage() {}
func (*ServerInfoResponse_StorageStatus) Descriptor() ([]byte, []int) {
return fileDescriptor11, []int{1, 0}
return fileDescriptor12, []int{1, 0}
}
func (m *ServerInfoResponse_StorageStatus) GetStorageName() string {
......@@ -169,9 +169,9 @@ var _ServerService_serviceDesc = grpc.ServiceDesc{
Metadata: "server.proto",
}
func init() { proto.RegisterFile("server.proto", fileDescriptor11) }
func init() { proto.RegisterFile("server.proto", fileDescriptor12) }
var fileDescriptor11 = []byte{
var fileDescriptor12 = []byte{
// 258 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcf, 0x4a, 0xc3, 0x40,
0x10, 0xc6, 0x6d, 0x03, 0xa5, 0x9d, 0x34, 0xfe, 0x19, 0x2f, 0x35, 0x08, 0xd6, 0x80, 0x90, 0x53,
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: smarthttp.proto
package gitaly
package gitalypb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
......@@ -28,7 +28,7 @@ type InfoRefsRequest struct {
func (m *InfoRefsRequest) Reset() { *m = InfoRefsRequest{} }
func (m *InfoRefsRequest) String() string { return proto.CompactTextString(m) }
func (*InfoRefsRequest) ProtoMessage() {}
func (*InfoRefsRequest) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{0} }
func (*InfoRefsRequest) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{0} }
func (m *InfoRefsRequest) GetRepository() *Repository {
if m != nil {
......@@ -58,7 +58,7 @@ type InfoRefsResponse struct {
func (m *InfoRefsResponse) Reset() { *m = InfoRefsResponse{} }
func (m *InfoRefsResponse) String() string { return proto.CompactTextString(m) }
func (*InfoRefsResponse) ProtoMessage() {}
func (*InfoRefsResponse) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{1} }
func (*InfoRefsResponse) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{1} }
func (m *InfoRefsResponse) GetData() []byte {
if m != nil {
......@@ -81,7 +81,7 @@ type PostUploadPackRequest struct {
func (m *PostUploadPackRequest) Reset() { *m = PostUploadPackRequest{} }
func (m *PostUploadPackRequest) String() string { return proto.CompactTextString(m) }
func (*PostUploadPackRequest) ProtoMessage() {}
func (*PostUploadPackRequest) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{2} }
func (*PostUploadPackRequest) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{2} }
func (m *PostUploadPackRequest) GetRepository() *Repository {
if m != nil {
......@@ -119,7 +119,7 @@ type PostUploadPackResponse struct {
func (m *PostUploadPackResponse) Reset() { *m = PostUploadPackResponse{} }
func (m *PostUploadPackResponse) String() string { return proto.CompactTextString(m) }
func (*PostUploadPackResponse) ProtoMessage() {}
func (*PostUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{3} }
func (*PostUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{3} }
func (m *PostUploadPackResponse) GetData() []byte {
if m != nil {
......@@ -147,7 +147,7 @@ type PostReceivePackRequest struct {
func (m *PostReceivePackRequest) Reset() { *m = PostReceivePackRequest{} }
func (m *PostReceivePackRequest) String() string { return proto.CompactTextString(m) }
func (*PostReceivePackRequest) ProtoMessage() {}
func (*PostReceivePackRequest) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{4} }
func (*PostReceivePackRequest) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{4} }
func (m *PostReceivePackRequest) GetRepository() *Repository {
if m != nil {
......@@ -206,7 +206,7 @@ type PostReceivePackResponse struct {
func (m *PostReceivePackResponse) Reset() { *m = PostReceivePackResponse{} }
func (m *PostReceivePackResponse) String() string { return proto.CompactTextString(m) }
func (*PostReceivePackResponse) ProtoMessage() {}
func (*PostReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{5} }
func (*PostReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{5} }
func (m *PostReceivePackResponse) GetData() []byte {
if m != nil {
......@@ -521,9 +521,9 @@ var _SmartHTTPService_serviceDesc = grpc.ServiceDesc{
Metadata: "smarthttp.proto",
}
func init() { proto.RegisterFile("smarthttp.proto", fileDescriptor13) }
func init() { proto.RegisterFile("smarthttp.proto", fileDescriptor14) }
var fileDescriptor13 = []byte{
var fileDescriptor14 = []byte{
// 423 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xd1, 0x8a, 0xd3, 0x40,
0x14, 0x75, 0xd2, 0x6e, 0x65, 0x6f, 0xa3, 0x2d, 0x77, 0xd1, 0x0d, 0x01, 0xdd, 0x1a, 0x41, 0xf2,
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: ssh.proto
package gitaly
package gitalypb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
......@@ -31,7 +31,7 @@ type SSHUploadPackRequest struct {
func (m *SSHUploadPackRequest) Reset() { *m = SSHUploadPackRequest{} }
func (m *SSHUploadPackRequest) String() string { return proto.CompactTextString(m) }
func (*SSHUploadPackRequest) ProtoMessage() {}
func (*SSHUploadPackRequest) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{0} }
func (*SSHUploadPackRequest) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{0} }
func (m *SSHUploadPackRequest) GetRepository() *Repository {
if m != nil {
......@@ -74,7 +74,7 @@ type SSHUploadPackResponse struct {
func (m *SSHUploadPackResponse) Reset() { *m = SSHUploadPackResponse{} }
func (m *SSHUploadPackResponse) String() string { return proto.CompactTextString(m) }
func (*SSHUploadPackResponse) ProtoMessage() {}
func (*SSHUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{1} }
func (*SSHUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{1} }
func (m *SSHUploadPackResponse) GetStdout() []byte {
if m != nil {
......@@ -116,7 +116,7 @@ type SSHReceivePackRequest struct {
func (m *SSHReceivePackRequest) Reset() { *m = SSHReceivePackRequest{} }
func (m *SSHReceivePackRequest) String() string { return proto.CompactTextString(m) }
func (*SSHReceivePackRequest) ProtoMessage() {}
func (*SSHReceivePackRequest) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{2} }
func (*SSHReceivePackRequest) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{2} }
func (m *SSHReceivePackRequest) GetRepository() *Repository {
if m != nil {
......@@ -180,7 +180,7 @@ type SSHReceivePackResponse struct {
func (m *SSHReceivePackResponse) Reset() { *m = SSHReceivePackResponse{} }
func (m *SSHReceivePackResponse) String() string { return proto.CompactTextString(m) }
func (*SSHReceivePackResponse) ProtoMessage() {}
func (*SSHReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{3} }
func (*SSHReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{3} }
func (m *SSHReceivePackResponse) GetStdout() []byte {
if m != nil {
......@@ -213,7 +213,7 @@ type SSHUploadArchiveRequest struct {
func (m *SSHUploadArchiveRequest) Reset() { *m = SSHUploadArchiveRequest{} }
func (m *SSHUploadArchiveRequest) String() string { return proto.CompactTextString(m) }
func (*SSHUploadArchiveRequest) ProtoMessage() {}
func (*SSHUploadArchiveRequest) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{4} }
func (*SSHUploadArchiveRequest) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{4} }
func (m *SSHUploadArchiveRequest) GetRepository() *Repository {
if m != nil {
......@@ -241,7 +241,7 @@ type SSHUploadArchiveResponse struct {
func (m *SSHUploadArchiveResponse) Reset() { *m = SSHUploadArchiveResponse{} }
func (m *SSHUploadArchiveResponse) String() string { return proto.CompactTextString(m) }
func (*SSHUploadArchiveResponse) ProtoMessage() {}
func (*SSHUploadArchiveResponse) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{5} }
func (*SSHUploadArchiveResponse) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{5} }
func (m *SSHUploadArchiveResponse) GetStdout() []byte {
if m != nil {
......@@ -513,9 +513,9 @@ var _SSHService_serviceDesc = grpc.ServiceDesc{
Metadata: "ssh.proto",
}
func init() { proto.RegisterFile("ssh.proto", fileDescriptor14) }
func init() { proto.RegisterFile("ssh.proto", fileDescriptor15) }
var fileDescriptor14 = []byte{
var fileDescriptor15 = []byte{
// 452 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0xc5, 0x89, 0x13, 0xc8, 0xc4, 0x45, 0xd1, 0xd2, 0x16, 0x2b, 0x02, 0x6a, 0xcc, 0xc5, 0x07,
......
package helper
import (
"io"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
)
type InfoRefsClient interface {
Recv() (*pb.InfoRefsResponse, error)
}
type InfoRefsClientWriterTo struct {
InfoRefsClient
}
func (clientReader *InfoRefsClientWriterTo) WriteTo(w io.Writer) (total int64, err error) {
for {
response, err := clientReader.Recv()
if err == io.EOF {
return total, nil
} else if err != nil {
return total, err
}
n, err := w.Write(response.GetData())
total += int64(n)
if err != nil {
return total, err
}
}
}
This diff is collapsed.
// +build !darwin
package client
import "crypto/x509"
// systemCertPool has an override on macOS.
func systemCertPool() (*x509.CertPool, error) { return x509.SystemCertPool() }
This diff is collapsed.
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