Commit 61d6c6dc authored by Kim "BKC" Carlbäcker's avatar Kim "BKC" Carlbäcker

Update vendoring for gitaly

parent 5f1ab210
v5.4.0
- Update Gitaly vendoring to use new RPC calls instead of old deprecated ones
v5.3.1
- Gracefully handle internal API errors when getting merge request URLs
......
......@@ -19,6 +19,8 @@ It is generated from these files:
It has these top-level messages:
GetBlobRequest
GetBlobResponse
CommitStatsRequest
CommitStatsResponse
CommitIsAncestorRequest
CommitIsAncestorResponse
TreeEntryRequest
......@@ -27,6 +29,13 @@ It has these top-level messages:
CommitsBetweenResponse
CountCommitsRequest
CountCommitsResponse
TreeEntry
GetTreeEntriesRequest
GetTreeEntriesResponse
ListFilesRequest
ListFilesResponse
FindCommitRequest
FindCommitResponse
CommitDiffRequest
CommitDiffResponse
CommitDeltaRequest
......@@ -48,6 +57,12 @@ It has these top-level messages:
FindLocalBranchCommitAuthor
RepositoryExistsRequest
RepositoryExistsResponse
RepackIncrementalRequest
RepackIncrementalResponse
RepackFullRequest
RepackFullResponse
GarbageCollectRequest
GarbageCollectResponse
Repository
GitCommit
CommitAuthor
......
......@@ -43,7 +43,88 @@ func (x TreeEntryResponse_ObjectType) String() string {
return proto.EnumName(TreeEntryResponse_ObjectType_name, int32(x))
}
func (TreeEntryResponse_ObjectType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor1, []int{3, 0}
return fileDescriptor1, []int{5, 0}
}
type TreeEntry_EntryType int32
const (
TreeEntry_BLOB TreeEntry_EntryType = 0
TreeEntry_TREE TreeEntry_EntryType = 1
TreeEntry_COMMIT TreeEntry_EntryType = 3
)
var TreeEntry_EntryType_name = map[int32]string{
0: "BLOB",
1: "TREE",
3: "COMMIT",
}
var TreeEntry_EntryType_value = map[string]int32{
"BLOB": 0,
"TREE": 1,
"COMMIT": 3,
}
func (x TreeEntry_EntryType) String() string {
return proto.EnumName(TreeEntry_EntryType_name, int32(x))
}
func (TreeEntry_EntryType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{10, 0} }
type CommitStatsRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
Revision []byte `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
}
func (m *CommitStatsRequest) Reset() { *m = CommitStatsRequest{} }
func (m *CommitStatsRequest) String() string { return proto.CompactTextString(m) }
func (*CommitStatsRequest) ProtoMessage() {}
func (*CommitStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *CommitStatsRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *CommitStatsRequest) GetRevision() []byte {
if m != nil {
return m.Revision
}
return nil
}
type CommitStatsResponse struct {
// OID is the commit. Empty means not found
Oid string `protobuf:"bytes,1,opt,name=oid" json:"oid,omitempty"`
Additions int32 `protobuf:"varint,2,opt,name=additions" json:"additions,omitempty"`
Deletions int32 `protobuf:"varint,3,opt,name=deletions" json:"deletions,omitempty"`
}
func (m *CommitStatsResponse) Reset() { *m = CommitStatsResponse{} }
func (m *CommitStatsResponse) String() string { return proto.CompactTextString(m) }
func (*CommitStatsResponse) ProtoMessage() {}
func (*CommitStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (m *CommitStatsResponse) GetOid() string {
if m != nil {
return m.Oid
}
return ""
}
func (m *CommitStatsResponse) GetAdditions() int32 {
if m != nil {
return m.Additions
}
return 0
}
func (m *CommitStatsResponse) GetDeletions() int32 {
if m != nil {
return m.Deletions
}
return 0
}
type CommitIsAncestorRequest struct {
......@@ -55,7 +136,7 @@ type CommitIsAncestorRequest struct {
func (m *CommitIsAncestorRequest) Reset() { *m = CommitIsAncestorRequest{} }
func (m *CommitIsAncestorRequest) String() string { return proto.CompactTextString(m) }
func (*CommitIsAncestorRequest) ProtoMessage() {}
func (*CommitIsAncestorRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (*CommitIsAncestorRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
func (m *CommitIsAncestorRequest) GetRepository() *Repository {
if m != nil {
......@@ -85,7 +166,7 @@ type CommitIsAncestorResponse struct {
func (m *CommitIsAncestorResponse) Reset() { *m = CommitIsAncestorResponse{} }
func (m *CommitIsAncestorResponse) String() string { return proto.CompactTextString(m) }
func (*CommitIsAncestorResponse) ProtoMessage() {}
func (*CommitIsAncestorResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (*CommitIsAncestorResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
func (m *CommitIsAncestorResponse) GetValue() bool {
if m != nil {
......@@ -106,7 +187,7 @@ type TreeEntryRequest struct {
func (m *TreeEntryRequest) Reset() { *m = TreeEntryRequest{} }
func (m *TreeEntryRequest) String() string { return proto.CompactTextString(m) }
func (*TreeEntryRequest) ProtoMessage() {}
func (*TreeEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
func (*TreeEntryRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
func (m *TreeEntryRequest) GetRepository() *Repository {
if m != nil {
......@@ -150,7 +231,7 @@ type TreeEntryResponse struct {
func (m *TreeEntryResponse) Reset() { *m = TreeEntryResponse{} }
func (m *TreeEntryResponse) String() string { return proto.CompactTextString(m) }
func (*TreeEntryResponse) ProtoMessage() {}
func (*TreeEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
func (*TreeEntryResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
func (m *TreeEntryResponse) GetType() TreeEntryResponse_ObjectType {
if m != nil {
......@@ -196,7 +277,7 @@ type CommitsBetweenRequest struct {
func (m *CommitsBetweenRequest) Reset() { *m = CommitsBetweenRequest{} }
func (m *CommitsBetweenRequest) String() string { return proto.CompactTextString(m) }
func (*CommitsBetweenRequest) ProtoMessage() {}
func (*CommitsBetweenRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
func (*CommitsBetweenRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
func (m *CommitsBetweenRequest) GetRepository() *Repository {
if m != nil {
......@@ -226,7 +307,7 @@ type CommitsBetweenResponse struct {
func (m *CommitsBetweenResponse) Reset() { *m = CommitsBetweenResponse{} }
func (m *CommitsBetweenResponse) String() string { return proto.CompactTextString(m) }
func (*CommitsBetweenResponse) ProtoMessage() {}
func (*CommitsBetweenResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
func (*CommitsBetweenResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
func (m *CommitsBetweenResponse) GetCommits() []*GitCommit {
if m != nil {
......@@ -243,7 +324,7 @@ type CountCommitsRequest struct {
func (m *CountCommitsRequest) Reset() { *m = CountCommitsRequest{} }
func (m *CountCommitsRequest) String() string { return proto.CompactTextString(m) }
func (*CountCommitsRequest) ProtoMessage() {}
func (*CountCommitsRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
func (*CountCommitsRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
func (m *CountCommitsRequest) GetRepository() *Repository {
if m != nil {
......@@ -266,7 +347,7 @@ type CountCommitsResponse struct {
func (m *CountCommitsResponse) Reset() { *m = CountCommitsResponse{} }
func (m *CountCommitsResponse) String() string { return proto.CompactTextString(m) }
func (*CountCommitsResponse) ProtoMessage() {}
func (*CountCommitsResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
func (*CountCommitsResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} }
func (m *CountCommitsResponse) GetCount() int32 {
if m != nil {
......@@ -275,7 +356,201 @@ func (m *CountCommitsResponse) GetCount() int32 {
return 0
}
type TreeEntry struct {
// OID of the object this tree entry points to
Oid string `protobuf:"bytes,1,opt,name=oid" json:"oid,omitempty"`
// OID of the tree attached to commit_oid
RootOid string `protobuf:"bytes,2,opt,name=root_oid,json=rootOid" json:"root_oid,omitempty"`
// Path relative to repository root
Path []byte `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
Type TreeEntry_EntryType `protobuf:"varint,4,opt,name=type,enum=gitaly.TreeEntry_EntryType" json:"type,omitempty"`
// File mode e.g. 0644
Mode int32 `protobuf:"varint,5,opt,name=mode" json:"mode,omitempty"`
// The commit object via which this entry was retrieved
CommitOid string `protobuf:"bytes,6,opt,name=commit_oid,json=commitOid" json:"commit_oid,omitempty"`
}
func (m *TreeEntry) Reset() { *m = TreeEntry{} }
func (m *TreeEntry) String() string { return proto.CompactTextString(m) }
func (*TreeEntry) ProtoMessage() {}
func (*TreeEntry) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} }
func (m *TreeEntry) GetOid() string {
if m != nil {
return m.Oid
}
return ""
}
func (m *TreeEntry) GetRootOid() string {
if m != nil {
return m.RootOid
}
return ""
}
func (m *TreeEntry) GetPath() []byte {
if m != nil {
return m.Path
}
return nil
}
func (m *TreeEntry) GetType() TreeEntry_EntryType {
if m != nil {
return m.Type
}
return TreeEntry_BLOB
}
func (m *TreeEntry) GetMode() int32 {
if m != nil {
return m.Mode
}
return 0
}
func (m *TreeEntry) GetCommitOid() string {
if m != nil {
return m.CommitOid
}
return ""
}
type GetTreeEntriesRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
Revision []byte `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
Path []byte `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
}
func (m *GetTreeEntriesRequest) Reset() { *m = GetTreeEntriesRequest{} }
func (m *GetTreeEntriesRequest) String() string { return proto.CompactTextString(m) }
func (*GetTreeEntriesRequest) ProtoMessage() {}
func (*GetTreeEntriesRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{11} }
func (m *GetTreeEntriesRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *GetTreeEntriesRequest) GetRevision() []byte {
if m != nil {
return m.Revision
}
return nil
}
func (m *GetTreeEntriesRequest) GetPath() []byte {
if m != nil {
return m.Path
}
return nil
}
type GetTreeEntriesResponse struct {
Entries []*TreeEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}
func (m *GetTreeEntriesResponse) Reset() { *m = GetTreeEntriesResponse{} }
func (m *GetTreeEntriesResponse) String() string { return proto.CompactTextString(m) }
func (*GetTreeEntriesResponse) ProtoMessage() {}
func (*GetTreeEntriesResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{12} }
func (m *GetTreeEntriesResponse) GetEntries() []*TreeEntry {
if m != nil {
return m.Entries
}
return nil
}
type ListFilesRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
Revision []byte `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
}
func (m *ListFilesRequest) Reset() { *m = ListFilesRequest{} }
func (m *ListFilesRequest) String() string { return proto.CompactTextString(m) }
func (*ListFilesRequest) ProtoMessage() {}
func (*ListFilesRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{13} }
func (m *ListFilesRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *ListFilesRequest) GetRevision() []byte {
if m != nil {
return m.Revision
}
return nil
}
// A single 'page' of the paginated response
type ListFilesResponse struct {
// Remember to force encoding utf-8 on the client side
Paths [][]byte `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
}
func (m *ListFilesResponse) Reset() { *m = ListFilesResponse{} }
func (m *ListFilesResponse) String() string { return proto.CompactTextString(m) }
func (*ListFilesResponse) ProtoMessage() {}
func (*ListFilesResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{14} }
func (m *ListFilesResponse) GetPaths() [][]byte {
if m != nil {
return m.Paths
}
return nil
}
type FindCommitRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
Revision []byte `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
}
func (m *FindCommitRequest) Reset() { *m = FindCommitRequest{} }
func (m *FindCommitRequest) String() string { return proto.CompactTextString(m) }
func (*FindCommitRequest) ProtoMessage() {}
func (*FindCommitRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{15} }
func (m *FindCommitRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *FindCommitRequest) GetRevision() []byte {
if m != nil {
return m.Revision
}
return nil
}
type FindCommitResponse struct {
// commit is nil when the commit was not found
Commit *GitCommit `protobuf:"bytes,1,opt,name=commit" json:"commit,omitempty"`
}
func (m *FindCommitResponse) Reset() { *m = FindCommitResponse{} }
func (m *FindCommitResponse) String() string { return proto.CompactTextString(m) }
func (*FindCommitResponse) ProtoMessage() {}
func (*FindCommitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{16} }
func (m *FindCommitResponse) GetCommit() *GitCommit {
if m != nil {
return m.Commit
}
return nil
}
func init() {
proto.RegisterType((*CommitStatsRequest)(nil), "gitaly.CommitStatsRequest")
proto.RegisterType((*CommitStatsResponse)(nil), "gitaly.CommitStatsResponse")
proto.RegisterType((*CommitIsAncestorRequest)(nil), "gitaly.CommitIsAncestorRequest")
proto.RegisterType((*CommitIsAncestorResponse)(nil), "gitaly.CommitIsAncestorResponse")
proto.RegisterType((*TreeEntryRequest)(nil), "gitaly.TreeEntryRequest")
......@@ -284,7 +559,15 @@ func init() {
proto.RegisterType((*CommitsBetweenResponse)(nil), "gitaly.CommitsBetweenResponse")
proto.RegisterType((*CountCommitsRequest)(nil), "gitaly.CountCommitsRequest")
proto.RegisterType((*CountCommitsResponse)(nil), "gitaly.CountCommitsResponse")
proto.RegisterType((*TreeEntry)(nil), "gitaly.TreeEntry")
proto.RegisterType((*GetTreeEntriesRequest)(nil), "gitaly.GetTreeEntriesRequest")
proto.RegisterType((*GetTreeEntriesResponse)(nil), "gitaly.GetTreeEntriesResponse")
proto.RegisterType((*ListFilesRequest)(nil), "gitaly.ListFilesRequest")
proto.RegisterType((*ListFilesResponse)(nil), "gitaly.ListFilesResponse")
proto.RegisterType((*FindCommitRequest)(nil), "gitaly.FindCommitRequest")
proto.RegisterType((*FindCommitResponse)(nil), "gitaly.FindCommitResponse")
proto.RegisterEnum("gitaly.TreeEntryResponse_ObjectType", TreeEntryResponse_ObjectType_name, TreeEntryResponse_ObjectType_value)
proto.RegisterEnum("gitaly.TreeEntry_EntryType", TreeEntry_EntryType_name, TreeEntry_EntryType_value)
}
// Reference imports to suppress errors if they are not otherwise used.
......@@ -302,6 +585,10 @@ type CommitServiceClient interface {
TreeEntry(ctx context.Context, in *TreeEntryRequest, opts ...grpc.CallOption) (CommitService_TreeEntryClient, error)
CommitsBetween(ctx context.Context, in *CommitsBetweenRequest, opts ...grpc.CallOption) (CommitService_CommitsBetweenClient, error)
CountCommits(ctx context.Context, in *CountCommitsRequest, opts ...grpc.CallOption) (*CountCommitsResponse, error)
GetTreeEntries(ctx context.Context, in *GetTreeEntriesRequest, opts ...grpc.CallOption) (CommitService_GetTreeEntriesClient, error)
ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (CommitService_ListFilesClient, error)
FindCommit(ctx context.Context, in *FindCommitRequest, opts ...grpc.CallOption) (*FindCommitResponse, error)
CommitStats(ctx context.Context, in *CommitStatsRequest, opts ...grpc.CallOption) (*CommitStatsResponse, error)
}
type commitServiceClient struct {
......@@ -394,6 +681,88 @@ func (c *commitServiceClient) CountCommits(ctx context.Context, in *CountCommits
return out, nil
}
func (c *commitServiceClient) GetTreeEntries(ctx context.Context, in *GetTreeEntriesRequest, opts ...grpc.CallOption) (CommitService_GetTreeEntriesClient, error) {
stream, err := grpc.NewClientStream(ctx, &_CommitService_serviceDesc.Streams[2], c.cc, "/gitaly.CommitService/GetTreeEntries", opts...)
if err != nil {
return nil, err
}
x := &commitServiceGetTreeEntriesClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type CommitService_GetTreeEntriesClient interface {
Recv() (*GetTreeEntriesResponse, error)
grpc.ClientStream
}
type commitServiceGetTreeEntriesClient struct {
grpc.ClientStream
}
func (x *commitServiceGetTreeEntriesClient) Recv() (*GetTreeEntriesResponse, error) {
m := new(GetTreeEntriesResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *commitServiceClient) ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (CommitService_ListFilesClient, error) {
stream, err := grpc.NewClientStream(ctx, &_CommitService_serviceDesc.Streams[3], c.cc, "/gitaly.CommitService/ListFiles", opts...)
if err != nil {
return nil, err
}
x := &commitServiceListFilesClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type CommitService_ListFilesClient interface {
Recv() (*ListFilesResponse, error)
grpc.ClientStream
}
type commitServiceListFilesClient struct {
grpc.ClientStream
}
func (x *commitServiceListFilesClient) Recv() (*ListFilesResponse, error) {
m := new(ListFilesResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *commitServiceClient) FindCommit(ctx context.Context, in *FindCommitRequest, opts ...grpc.CallOption) (*FindCommitResponse, error) {
out := new(FindCommitResponse)
err := grpc.Invoke(ctx, "/gitaly.CommitService/FindCommit", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commitServiceClient) CommitStats(ctx context.Context, in *CommitStatsRequest, opts ...grpc.CallOption) (*CommitStatsResponse, error) {
out := new(CommitStatsResponse)
err := grpc.Invoke(ctx, "/gitaly.CommitService/CommitStats", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for CommitService service
type CommitServiceServer interface {
......@@ -401,6 +770,10 @@ type CommitServiceServer interface {
TreeEntry(*TreeEntryRequest, CommitService_TreeEntryServer) error
CommitsBetween(*CommitsBetweenRequest, CommitService_CommitsBetweenServer) error
CountCommits(context.Context, *CountCommitsRequest) (*CountCommitsResponse, error)
GetTreeEntries(*GetTreeEntriesRequest, CommitService_GetTreeEntriesServer) error
ListFiles(*ListFilesRequest, CommitService_ListFilesServer) error
FindCommit(context.Context, *FindCommitRequest) (*FindCommitResponse, error)
CommitStats(context.Context, *CommitStatsRequest) (*CommitStatsResponse, error)
}
func RegisterCommitServiceServer(s *grpc.Server, srv CommitServiceServer) {
......@@ -485,6 +858,84 @@ func _CommitService_CountCommits_Handler(srv interface{}, ctx context.Context, d
return interceptor(ctx, in, info, handler)
}
func _CommitService_GetTreeEntries_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetTreeEntriesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(CommitServiceServer).GetTreeEntries(m, &commitServiceGetTreeEntriesServer{stream})
}
type CommitService_GetTreeEntriesServer interface {
Send(*GetTreeEntriesResponse) error
grpc.ServerStream
}
type commitServiceGetTreeEntriesServer struct {
grpc.ServerStream
}
func (x *commitServiceGetTreeEntriesServer) Send(m *GetTreeEntriesResponse) error {
return x.ServerStream.SendMsg(m)
}
func _CommitService_ListFiles_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ListFilesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(CommitServiceServer).ListFiles(m, &commitServiceListFilesServer{stream})
}
type CommitService_ListFilesServer interface {
Send(*ListFilesResponse) error
grpc.ServerStream
}
type commitServiceListFilesServer struct {
grpc.ServerStream
}
func (x *commitServiceListFilesServer) Send(m *ListFilesResponse) error {
return x.ServerStream.SendMsg(m)
}
func _CommitService_FindCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindCommitRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommitServiceServer).FindCommit(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.CommitService/FindCommit",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommitServiceServer).FindCommit(ctx, req.(*FindCommitRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommitService_CommitStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CommitStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommitServiceServer).CommitStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.CommitService/CommitStats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommitServiceServer).CommitStats(ctx, req.(*CommitStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CommitService_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.CommitService",
HandlerType: (*CommitServiceServer)(nil),
......@@ -497,6 +948,14 @@ var _CommitService_serviceDesc = grpc.ServiceDesc{
MethodName: "CountCommits",
Handler: _CommitService_CountCommits_Handler,
},
{
MethodName: "FindCommit",
Handler: _CommitService_FindCommit_Handler,
},
{
MethodName: "CommitStats",
Handler: _CommitService_CommitStats_Handler,
},
},
Streams: []grpc.StreamDesc{
{
......@@ -509,6 +968,16 @@ var _CommitService_serviceDesc = grpc.ServiceDesc{
Handler: _CommitService_CommitsBetween_Handler,
ServerStreams: true,
},
{
StreamName: "GetTreeEntries",
Handler: _CommitService_GetTreeEntries_Handler,
ServerStreams: true,
},
{
StreamName: "ListFiles",
Handler: _CommitService_ListFiles_Handler,
ServerStreams: true,
},
},
Metadata: "commit.proto",
}
......@@ -516,39 +985,56 @@ var _CommitService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("commit.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 532 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x5b, 0x6b, 0x13, 0x41,
0x14, 0xc7, 0xbb, 0xd9, 0xdc, 0x7a, 0x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b, 0x6d, 0xd7, 0xba, 0x27, 0xf9, 0xb8, 0x2b, 0xae,
0xed, 0x1b, 0x9a, 0x57, 0x10, 0x06, 0x0f, 0xfb, 0x62, 0x1e, 0x67, 0x71, 0xf5, 0x9f, 0xd4, 0x41,
0x5e, 0xc3, 0xe9, 0xf6, 0x98, 0xb5, 0x60, 0xc3, 0x34, 0x6e, 0x46, 0x94, 0xa8, 0x75, 0xba, 0x7f,
0x0a, 0xf0, 0xc0, 0x56, 0xde, 0x30, 0xb9, 0xe0, 0x21, 0xc3, 0x4f, 0xe0, 0xed, 0x8a, 0x1e, 0xcf,
0x73, 0x9e, 0x03, 0x5f, 0x66, 0xb3, 0x75, 0xb8, 0xc0, 0x8e, 0x27, 0x47, 0xf8, 0x1e, 0x8e, 0x57,
0x12, 0x43, 0xff, 0x0e, 0xd5, 0xd9, 0x56, 0x67, 0x07, 0xf5, 0x48, 0x8e, 0x2e, 0x1c, 0xbc, 0x81,
0xc6, 0xf6, 0x31, 0xf0, 0xf9, 0xf6, 0xec, 0x1d, 0x55, 0x34, 0x5f, 0x1c, 0x4a, 0x6f, 0x34, 0xfd,
0x00, 0xf5, 0xcd, 0x9d, 0xe1, 0xd3, 0xf5, 0x9b, 0xbd, 0x83, 0x35, 0x9f, 0xdd, 0x9d, 0xcc, 0xdb,
0xdd, 0x96, 0xcd, 0x8f, 0xec, 0xcd, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x64, 0xef, 0x2c, 0x85,
0xee, 0x04, 0x00, 0x00,
// 807 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6e, 0xda, 0x4a,
0x10, 0xc6, 0xd8, 0xfc, 0x0d, 0x1c, 0x64, 0xf6, 0x24, 0xe7, 0x10, 0x27, 0x39, 0x41, 0xab, 0x73,
0x41, 0x94, 0x8a, 0x46, 0x54, 0x95, 0x7a, 0x57, 0xe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0xd6, 0x62, 0x85, 0xb3, 0x8f, 0x2b, 0x6b, 0x37,
0xd7, 0x17, 0x67, 0xba, 0x2b, 0xcb, 0x87, 0xd9, 0x8b, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdc,
0x23, 0x27, 0xce, 0xbe, 0x09, 0x00, 0x00,
}
......@@ -23,6 +23,14 @@ type CommitDiffRequest struct {
RightCommitId string `protobuf:"bytes,3,opt,name=right_commit_id,json=rightCommitId" json:"right_commit_id,omitempty"`
IgnoreWhitespaceChange bool `protobuf:"varint,4,opt,name=ignore_whitespace_change,json=ignoreWhitespaceChange" json:"ignore_whitespace_change,omitempty"`
Paths [][]byte `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"`
CollapseDiffs bool `protobuf:"varint,6,opt,name=collapse_diffs,json=collapseDiffs" json:"collapse_diffs,omitempty"`
EnforceLimits bool `protobuf:"varint,7,opt,name=enforce_limits,json=enforceLimits" json:"enforce_limits,omitempty"`
MaxFiles int32 `protobuf:"varint,8,opt,name=max_files,json=maxFiles" json:"max_files,omitempty"`
MaxLines int32 `protobuf:"varint,9,opt,name=max_lines,json=maxLines" json:"max_lines,omitempty"`
MaxBytes int32 `protobuf:"varint,10,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"`
SafeMaxFiles int32 `protobuf:"varint,11,opt,name=safe_max_files,json=safeMaxFiles" json:"safe_max_files,omitempty"`
SafeMaxLines int32 `protobuf:"varint,12,opt,name=safe_max_lines,json=safeMaxLines" json:"safe_max_lines,omitempty"`
SafeMaxBytes int32 `protobuf:"varint,13,opt,name=safe_max_bytes,json=safeMaxBytes" json:"safe_max_bytes,omitempty"`
}
func (m *CommitDiffRequest) Reset() { *m = CommitDiffRequest{} }
......@@ -65,6 +73,62 @@ func (m *CommitDiffRequest) GetPaths() [][]byte {
return nil
}
func (m *CommitDiffRequest) GetCollapseDiffs() bool {
if m != nil {
return m.CollapseDiffs
}
return false
}
func (m *CommitDiffRequest) GetEnforceLimits() bool {
if m != nil {
return m.EnforceLimits
}
return false
}
func (m *CommitDiffRequest) GetMaxFiles() int32 {
if m != nil {
return m.MaxFiles
}
return 0
}
func (m *CommitDiffRequest) GetMaxLines() int32 {
if m != nil {
return m.MaxLines
}
return 0
}
func (m *CommitDiffRequest) GetMaxBytes() int32 {
if m != nil {
return m.MaxBytes
}
return 0
}
func (m *CommitDiffRequest) GetSafeMaxFiles() int32 {
if m != nil {
return m.SafeMaxFiles
}
return 0
}
func (m *CommitDiffRequest) GetSafeMaxLines() int32 {
if m != nil {
return m.SafeMaxLines
}
return 0
}
func (m *CommitDiffRequest) GetSafeMaxBytes() int32 {
if m != nil {
return m.SafeMaxBytes
}
return 0
}
// A CommitDiffResponse corresponds to a single changed file in a commit.
type CommitDiffResponse struct {
FromPath []byte `protobuf:"bytes,1,opt,name=from_path,json=fromPath,proto3" json:"from_path,omitempty"`
......@@ -77,6 +141,10 @@ type CommitDiffResponse struct {
Binary bool `protobuf:"varint,7,opt,name=binary" json:"binary,omitempty"`
RawPatchData []byte `protobuf:"bytes,9,opt,name=raw_patch_data,json=rawPatchData,proto3" json:"raw_patch_data,omitempty"`
EndOfPatch bool `protobuf:"varint,10,opt,name=end_of_patch,json=endOfPatch" json:"end_of_patch,omitempty"`
// Indicates the diff file at which we overflow according to the limitations sent,
// in which case only this attribute will be set.
OverflowMarker bool `protobuf:"varint,11,opt,name=overflow_marker,json=overflowMarker" json:"overflow_marker,omitempty"`
Collapsed bool `protobuf:"varint,12,opt,name=collapsed" json:"collapsed,omitempty"`
}
func (m *CommitDiffResponse) Reset() { *m = CommitDiffResponse{} }
......@@ -147,6 +215,20 @@ func (m *CommitDiffResponse) GetEndOfPatch() bool {
return false
}
func (m *CommitDiffResponse) GetOverflowMarker() bool {
if m != nil {
return m.OverflowMarker
}
return false
}
func (m *CommitDiffResponse) GetCollapsed() bool {
if m != nil {
return m.Collapsed
}
return false
}
type CommitDeltaRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
LeftCommitId string `protobuf:"bytes,2,opt,name=left_commit_id,json=leftCommitId" json:"left_commit_id,omitempty"`
......@@ -434,36 +516,45 @@ var _DiffService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("diff.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 481 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0x4f, 0x8e, 0xd3, 0x30,
0x14, 0xc6, 0x71, 0xdb, 0xa4, 0xe9, 0x6b, 0xf8, 0xe7, 0xa2, 0xc1, 0xd3, 0xd9, 0x44, 0x11, 0x42,
0x91, 0x90, 0x2a, 0x54, 0x36, 0xac, 0x99, 0x91, 0x50, 0x47, 0x42, 0x8c, 0xc2, 0x82, 0x65, 0xe4,
0x89, 0x9d, 0xc6, 0x52, 0x1a, 0x07, 0xc7, 0x10, 0xf5, 0x1e, 0x9c, 0x80, 0x0d, 0x1b, 0xae, 0xc5,
0x3d, 0x90, 0xed, 0x4e, 0x9a, 0x41, 0x3d, 0xc0, 0x2c, 0xfd, 0xfd, 0x3e, 0xbf, 0x7e, 0x7e, 0xef,
0x35, 0x00, 0x4c, 0x14, 0xc5, 0xaa, 0x51, 0x52, 0x4b, 0xec, 0x6f, 0x85, 0xa6, 0xd5, 0x7e, 0x19,
0xb6, 0x25, 0x55, 0x9c, 0x39, 0x35, 0xfe, 0x8b, 0xe0, 0xf9, 0xa5, 0xdc, 0xed, 0x84, 0xbe, 0x12,
0x45, 0x91, 0xf2, 0x6f, 0xdf, 0x79, 0xab, 0xf1, 0x1a, 0x40, 0xf1, 0x46, 0xb6, 0x42, 0x4b, 0xb5,
0x27, 0x28, 0x42, 0xc9, 0x7c, 0x8d, 0x57, 0xae, 0xc0, 0x2a, 0xed, 0x49, 0x3a, 0x70, 0xe1, 0x57,
0xf0, 0xa4, 0xe2, 0x85, 0xce, 0x72, 0x5b,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66, 0x36, 0x5b,
0xa8, 0x68, 0x77, 0x63, 0xc4, 0x2b, 0xaa, 0x29, 0x8e, 0x20, 0xe4, 0x35, 0xcb, 0x64, 0xe1, 0x8c,
0x04, 0x6c, 0x0d, 0xe0, 0x35, 0xfb, 0x5c, 0x58, 0xd7, 0xf5, 0x24, 0x08, 0x9e, 0xcd, 0xe2, 0x3f,
0xa8, 0x6f, 0x0b, 0xaf, 0x34, 0x7d, 0x38, 0xf3, 0xef, 0xa7, 0x38, 0x19, 0x4e, 0xf1, 0x37, 0x82,
0xf9, 0x20, 0xee, 0xc3, 0x1d, 0x5f, 0xfc, 0x01, 0x16, 0xf7, 0xfa, 0x7a, 0xd8, 0xb7, 0x37, 0xe0,
0x33, 0x23, 0xb4, 0x04, 0x45, 0xe3, 0x64, 0xbe, 0x5e, 0xdc, 0x35, 0x75, 0x68, 0x3e, 0x58, 0xd6,
0xbf, 0x10, 0xcc, 0xcd, 0xb6, 0x7e, 0xe1, 0xea, 0x87, 0xc8, 0x39, 0xfe, 0x08, 0x70, 0x5c, 0x61,
0x7c, 0xfe, 0xdf, 0xd5, 0xe3, 0xdf, 0x77, 0xb9, 0x3c, 0x85, 0x5c, 0x82, 0xf8, 0xd1, 0x5b, 0x84,
0xaf, 0xef, 0x77, 0x71, 0x79, 0x2a, 0xc4, 0xa1, 0xd4, 0xc5, 0x49, 0x76, 0xac, 0x75, 0xeb, 0xdb,
0xef, 0xc8, 0xbb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xf5, 0xb7, 0x6e, 0x6b, 0x04, 0x00,
0x00,
// 629 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xcf, 0x6e, 0xdb, 0x38,
0x10, 0xc6, 0x57, 0xb1, 0xad, 0xc8, 0x63, 0x25, 0xd9, 0x65, 0x16, 0x59, 0xc5, 0xd9, 0x83, 0x60,
0xf4, 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 0x78, 0xfc, 0x18, 0x72, 0x1d, 0x4c,
0xfe, 0x7a, 0xed, 0x91, 0xab, 0xed, 0x29, 0x8e, 0x1f, 0x6b, 0x62, 0x9d, 0xea, 0xe4, 0x51, 0xb6,
0xc9, 0x75, 0xe7, 0xdb, 0x57, 0xfa, 0xcd, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x75, 0x5b,
0xf9, 0xc9, 0x05, 0x00, 0x00,
}
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
}
}
}
package helper
import (
"io"
)
// NewReceiveReader turns receiver into an io.Reader. Errors from the
// receiver function are passed on unmodified. This means receiver should
// emit io.EOF when done.
func NewReceiveReader(receiver func() ([]byte, error)) io.Reader {
return &receiveReader{receiver: receiver}
}
type receiveReader struct {
receiver func() ([]byte, error)
data []byte
err error
}
func (rr *receiveReader) Read(p []byte) (int, error) {
if len(rr.data) == 0 {
rr.data, rr.err = rr.receiver()
}
n := copy(p, rr.data)
rr.data = rr.data[n:]
if len(rr.data) == 0 {
return n, rr.err
}
return n, nil
}
// NewSendWriter turns sender into an io.Writer. The number of 'bytes
// written' reported back is always len(p).
func NewSendWriter(sender func(p []byte) error) io.Writer {
return &sendWriter{sender: sender}
}
type sendWriter struct {
sender func([]byte) error
}
func (sw *sendWriter) Write(p []byte) (int, error) {
return len(p), sw.sender(p)
}
......@@ -49,9 +49,103 @@ func (m *RepositoryExistsResponse) GetExists() bool {
return false
}
type RepackIncrementalRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
}
func (m *RepackIncrementalRequest) Reset() { *m = RepackIncrementalRequest{} }
func (m *RepackIncrementalRequest) String() string { return proto.CompactTextString(m) }
func (*RepackIncrementalRequest) ProtoMessage() {}
func (*RepackIncrementalRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} }
func (m *RepackIncrementalRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
type RepackIncrementalResponse struct {
}
func (m *RepackIncrementalResponse) Reset() { *m = RepackIncrementalResponse{} }
func (m *RepackIncrementalResponse) String() string { return proto.CompactTextString(m) }
func (*RepackIncrementalResponse) ProtoMessage() {}
func (*RepackIncrementalResponse) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{3} }
type RepackFullRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
CreateBitmap bool `protobuf:"varint,2,opt,name=create_bitmap,json=createBitmap" json:"create_bitmap,omitempty"`
}
func (m *RepackFullRequest) Reset() { *m = RepackFullRequest{} }
func (m *RepackFullRequest) String() string { return proto.CompactTextString(m) }
func (*RepackFullRequest) ProtoMessage() {}
func (*RepackFullRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{4} }
func (m *RepackFullRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *RepackFullRequest) GetCreateBitmap() bool {
if m != nil {
return m.CreateBitmap
}
return false
}
type RepackFullResponse struct {
}
func (m *RepackFullResponse) Reset() { *m = RepackFullResponse{} }
func (m *RepackFullResponse) String() string { return proto.CompactTextString(m) }
func (*RepackFullResponse) ProtoMessage() {}
func (*RepackFullResponse) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{5} }
type GarbageCollectRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
CreateBitmap bool `protobuf:"varint,2,opt,name=create_bitmap,json=createBitmap" json:"create_bitmap,omitempty"`
}
func (m *GarbageCollectRequest) Reset() { *m = GarbageCollectRequest{} }
func (m *GarbageCollectRequest) String() string { return proto.CompactTextString(m) }
func (*GarbageCollectRequest) ProtoMessage() {}
func (*GarbageCollectRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{6} }
func (m *GarbageCollectRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *GarbageCollectRequest) GetCreateBitmap() bool {
if m != nil {
return m.CreateBitmap
}
return false
}
type GarbageCollectResponse struct {
}
func (m *GarbageCollectResponse) Reset() { *m = GarbageCollectResponse{} }
func (m *GarbageCollectResponse) String() string { return proto.CompactTextString(m) }
func (*GarbageCollectResponse) ProtoMessage() {}
func (*GarbageCollectResponse) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{7} }
func init() {
proto.RegisterType((*RepositoryExistsRequest)(nil), "gitaly.RepositoryExistsRequest")
proto.RegisterType((*RepositoryExistsResponse)(nil), "gitaly.RepositoryExistsResponse")
proto.RegisterType((*RepackIncrementalRequest)(nil), "gitaly.RepackIncrementalRequest")
proto.RegisterType((*RepackIncrementalResponse)(nil), "gitaly.RepackIncrementalResponse")
proto.RegisterType((*RepackFullRequest)(nil), "gitaly.RepackFullRequest")
proto.RegisterType((*RepackFullResponse)(nil), "gitaly.RepackFullResponse")
proto.RegisterType((*GarbageCollectRequest)(nil), "gitaly.GarbageCollectRequest")
proto.RegisterType((*GarbageCollectResponse)(nil), "gitaly.GarbageCollectResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
......@@ -66,6 +160,9 @@ const _ = grpc.SupportPackageIsVersion4
type RepositoryServiceClient interface {
Exists(ctx context.Context, in *RepositoryExistsRequest, opts ...grpc.CallOption) (*RepositoryExistsResponse, error)
RepackIncremental(ctx context.Context, in *RepackIncrementalRequest, opts ...grpc.CallOption) (*RepackIncrementalResponse, error)
RepackFull(ctx context.Context, in *RepackFullRequest, opts ...grpc.CallOption) (*RepackFullResponse, error)
GarbageCollect(ctx context.Context, in *GarbageCollectRequest, opts ...grpc.CallOption) (*GarbageCollectResponse, error)
}
type repositoryServiceClient struct {
......@@ -85,10 +182,40 @@ func (c *repositoryServiceClient) Exists(ctx context.Context, in *RepositoryExis
return out, nil
}
func (c *repositoryServiceClient) RepackIncremental(ctx context.Context, in *RepackIncrementalRequest, opts ...grpc.CallOption) (*RepackIncrementalResponse, error) {
out := new(RepackIncrementalResponse)
err := grpc.Invoke(ctx, "/gitaly.RepositoryService/RepackIncremental", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *repositoryServiceClient) RepackFull(ctx context.Context, in *RepackFullRequest, opts ...grpc.CallOption) (*RepackFullResponse, error) {
out := new(RepackFullResponse)
err := grpc.Invoke(ctx, "/gitaly.RepositoryService/RepackFull", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *repositoryServiceClient) GarbageCollect(ctx context.Context, in *GarbageCollectRequest, opts ...grpc.CallOption) (*GarbageCollectResponse, error) {
out := new(GarbageCollectResponse)
err := grpc.Invoke(ctx, "/gitaly.RepositoryService/GarbageCollect", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for RepositoryService service
type RepositoryServiceServer interface {
Exists(context.Context, *RepositoryExistsRequest) (*RepositoryExistsResponse, error)
RepackIncremental(context.Context, *RepackIncrementalRequest) (*RepackIncrementalResponse, error)
RepackFull(context.Context, *RepackFullRequest) (*RepackFullResponse, error)
GarbageCollect(context.Context, *GarbageCollectRequest) (*GarbageCollectResponse, error)
}
func RegisterRepositoryServiceServer(s *grpc.Server, srv RepositoryServiceServer) {
......@@ -113,6 +240,60 @@ func _RepositoryService_Exists_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _RepositoryService_RepackIncremental_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RepackIncrementalRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RepositoryServiceServer).RepackIncremental(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.RepositoryService/RepackIncremental",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RepositoryServiceServer).RepackIncremental(ctx, req.(*RepackIncrementalRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RepositoryService_RepackFull_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RepackFullRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RepositoryServiceServer).RepackFull(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.RepositoryService/RepackFull",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RepositoryServiceServer).RepackFull(ctx, req.(*RepackFullRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RepositoryService_GarbageCollect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GarbageCollectRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RepositoryServiceServer).GarbageCollect(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.RepositoryService/GarbageCollect",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RepositoryServiceServer).GarbageCollect(ctx, req.(*GarbageCollectRequest))
}
return interceptor(ctx, in, info, handler)
}
var _RepositoryService_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.RepositoryService",
HandlerType: (*RepositoryServiceServer)(nil),
......@@ -121,6 +302,18 @@ var _RepositoryService_serviceDesc = grpc.ServiceDesc{
MethodName: "Exists",
Handler: _RepositoryService_Exists_Handler,
},
{
MethodName: "RepackIncremental",
Handler: _RepositoryService_RepackIncremental_Handler,
},
{
MethodName: "RepackFull",
Handler: _RepositoryService_RepackFull_Handler,
},
{
MethodName: "GarbageCollect",
Handler: _RepositoryService_GarbageCollect_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "repository-service.proto",
......@@ -129,16 +322,26 @@ var _RepositoryService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("repository-service.proto", fileDescriptor6) }
var fileDescriptor6 = []byte{
// 172 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x4a, 0x2d, 0xc8,
0x2f, 0xce, 0x2c, 0xc9, 0x2f, 0xaa, 0xd4, 0x2d, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b,
0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0xcf, 0x2c, 0x49, 0xcc, 0xa9, 0x94, 0xe2, 0x29, 0xce,
0x48, 0x2c, 0x4a, 0x4d, 0x81, 0x88, 0x2a, 0xf9, 0x72, 0x89, 0x07, 0xc1, 0x75, 0xb8, 0x56, 0x64,
0x16, 0x97, 0x14, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x19, 0x71, 0x71, 0x21, 0x0c,
0x93, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd2, 0x83, 0x98, 0xa2, 0x87, 0xd0, 0x14, 0x84,
0xa4, 0x4a, 0xc9, 0x88, 0x4b, 0x02, 0xd3, 0xb8, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x31,
0x2e, 0xb6, 0x54, 0xb0, 0x08, 0xd8, 0x2c, 0x8e, 0x20, 0x28, 0xcf, 0x28, 0x89, 0x4b, 0x10, 0xa1,
0x27, 0x18, 0xe2, 0x66, 0x21, 0x5f, 0x2e, 0x36, 0x88, 0x76, 0x21, 0x79, 0x4c, 0x2b, 0x51, 0xdc,
0x29, 0xa5, 0x80, 0x5b, 0x01, 0xc4, 0x66, 0x25, 0x86, 0x24, 0x36, 0xb0, 0x6f, 0x8d, 0x01, 0x01,
0x00, 0x00, 0xff, 0xff, 0x7e, 0xc1, 0x7d, 0x44, 0x1f, 0x01, 0x00, 0x00,
// 323 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0xcd, 0x4e, 0xeb, 0x30,
0x10, 0x85, 0x6f, 0xbb, 0x88, 0xae, 0x86, 0x82, 0xc4, 0x08, 0x4a, 0x6a, 0x04, 0x94, 0xb0, 0x61,
0x43, 0x17, 0xe1, 0x0d, 0x40, 0x05, 0xb1, 0x28, 0x12, 0x61, 0xc7, 0x06, 0xb9, 0x61, 0x54, 0x22,
0xdc, 0x38, 0xd8, 0x2e, 0xa2, 0x6f, 0xca, 0xe3, 0x20, 0xd9, 0xf9, 0xa5, 0x29, 0x9b, 0x8a, 0x65,
0xc6, 0x73, 0xbe, 0x39, 0x9e, 0xe3, 0x80, 0xaf, 0x28, 0x93, 0x3a, 0x31, 0x52, 0x2d, 0x2f, 0x34,
0xa9, 0x8f, 0x24, 0xa6, 0x51, 0xa6, 0xa4, 0x91, 0xe8, 0xcd, 0x12, 0xc3, 0xc5, 0x92, 0xf5, 0xf4,
0x2b, 0x57, 0xf4, 0xe2, 0xaa, 0xc1, 0x04, 0x0e, 0xa2, 0x52, 0x31, 0xfe, 0x4c, 0xb4, 0xd1, 0x11,
0xbd, 0x2f, 0x48, 0x1b, 0x0c, 0x01, 0x2a, 0x98, 0xdf, 0x19, 0x76, 0xce, 0xb7, 0x42, 0x1c, 0x39,
0xca, 0xa8, 0x12, 0x45, 0xb5, 0xae, 0x20, 0x04, 0x7f, 0x15, 0xa7, 0x33, 0x99, 0x6a, 0xc2, 0x3e,
0x78, 0x64, 0x2b, 0x96, 0xf5, 0x3f, 0xca, 0xbf, 0x82, 0x7b, 0xab, 0xe1, 0xf1, 0xdb, 0x5d, 0x1a,
0x2b, 0x9a, 0x53, 0x6a, 0xb8, 0xd8, 0xc4, 0xc3, 0x21, 0x0c, 0x5a, 0x78, 0xce, 0x44, 0x20, 0x60,
0xd7, 0x1d, 0xde, 0x2c, 0xc4, 0x26, 0x53, 0xf0, 0x0c, 0xb6, 0x63, 0x45, 0xdc, 0xd0, 0xf3, 0x34,
0x31, 0x73, 0x9e, 0xf9, 0x5d, 0x7b, 0xa9, 0x9e, 0x2b, 0x5e, 0xd9, 0x5a, 0xb0, 0x07, 0x58, 0x9f,
0x96, 0x7b, 0xc8, 0x60, 0xff, 0x96, 0xab, 0x29, 0x9f, 0xd1, 0xb5, 0x14, 0x82, 0x62, 0xf3, 0xe7,
0x3e, 0x7c, 0xe8, 0xff, 0x9c, 0xe8, 0xbc, 0x84, 0x5f, 0x5d, 0xbb, 0x90, 0x9c, 0xf6, 0xe8, 0x5e,
0x0c, 0x4e, 0xc0, 0x73, 0xe1, 0xe1, 0xc9, 0xea, 0xf8, 0xc6, 0x2b, 0x61, 0xc3, 0xf5, 0x0d, 0xf9,
0x75, 0xff, 0xe1, 0x53, 0xb1, 0xf4, 0x5a, 0x22, 0x58, 0x17, 0xb6, 0x86, 0xcf, 0x4e, 0x7f, 0xe9,
0x28, 0xd9, 0x63, 0x80, 0x6a, 0xc5, 0x38, 0x68, 0x4a, 0x6a, 0x21, 0x33, 0xd6, 0x76, 0x54, 0x62,
0x1e, 0x60, 0xa7, 0xb9, 0x21, 0x3c, 0x2a, 0xfa, 0x5b, 0xb3, 0x62, 0xc7, 0xeb, 0x8e, 0x0b, 0xe4,
0xd4, 0xb3, 0x7f, 0xd8, 0xe5, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0xc6, 0x53, 0xd9, 0x93,
0x03, 0x00, 0x00,
}
......@@ -3,12 +3,12 @@ package client
import (
"io"
"google.golang.org/grpc"
"golang.org/x/net/context"
"gitlab.com/gitlab-org/gitaly/streamio"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
pbhelper "gitlab.com/gitlab-org/gitaly-proto/go/helper"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// ReceivePack proxies an SSH git-receive-pack (git push) session to Gitaly
......@@ -16,7 +16,7 @@ func ReceivePack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, st
ctx2, cancel := context.WithCancel(ctx)
defer cancel()
ssh := pb.NewSSHClient(conn)
ssh := pb.NewSSHServiceClient(conn)
stream, err := ssh.SSHReceivePack(ctx2)
if err != nil {
return 0, err
......@@ -26,7 +26,7 @@ func ReceivePack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, st
return 0, err
}
inWriter := pbhelper.NewSendWriter(func(p []byte) error {
inWriter := streamio.NewWriter(func(p []byte) error {
return stream.Send(&pb.SSHReceivePackRequest{Stdin: p})
})
......
......@@ -3,12 +3,12 @@ package client
import (
"io"
"google.golang.org/grpc"
"golang.org/x/net/context"
"gitlab.com/gitlab-org/gitaly/streamio"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
pbhelper "gitlab.com/gitlab-org/gitaly-proto/go/helper"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// UploadPack proxies an SSH git-upload-pack (git fetch) session to Gitaly
......@@ -16,7 +16,7 @@ func UploadPack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, std
ctx2, cancel := context.WithCancel(ctx)
defer cancel()
ssh := pb.NewSSHClient(conn)
ssh := pb.NewSSHServiceClient(conn)
stream, err := ssh.SSHUploadPack(ctx2)
if err != nil {
return 0, err
......@@ -26,7 +26,7 @@ func UploadPack(ctx context.Context, conn *grpc.ClientConn, stdin io.Reader, std
return 0, err
}
inWriter := pbhelper.NewSendWriter(func(p []byte) error {
inWriter := streamio.NewWriter(func(p []byte) error {
return stream.Send(&pb.SSHUploadPackRequest{Stdin: p})
})
......
// Package streamio contains wrappers intended for turning gRPC streams
// that send/receive messages with a []byte field into io.Writers and
// io.Readers.
//
package streamio
import (
"io"
"os"
"strconv"
)
func init() {
bufSize64, err := strconv.ParseInt(os.Getenv("GITALY_STREAMIO_WRITE_BUFFER_SIZE"), 10, 32)
if err == nil && bufSize64 > 0 {
WriteBufferSize = int(bufSize64)
}
}
// NewReader turns receiver into an io.Reader. Errors from the receiver
// function are passed on unmodified. This means receiver should emit
// io.EOF when done.
func NewReader(receiver func() ([]byte, error)) io.Reader {
return &receiveReader{receiver: receiver}
}
type receiveReader struct {
receiver func() ([]byte, error)
data []byte
err error
}
func (rr *receiveReader) Read(p []byte) (int, error) {
if len(rr.data) == 0 {
rr.data, rr.err = rr.receiver()
}
n := copy(p, rr.data)
rr.data = rr.data[n:]
if len(rr.data) == 0 {
return n, rr.err
}
return n, nil
}
// WriteTo implements io.WriterTo.
func (rr *receiveReader) WriteTo(w io.Writer) (int64, error) {
var written int64
// Deal with left-over state in rr.data and rr.err, if any
if len(rr.data) > 0 {
n, err := w.Write(rr.data)
written += int64(n)
if err != nil {
return written, err
}
}
if rr.err != nil {
return written, rr.err
}
// Consume the response stream
var errRead, errWrite error
var n int
var buf []byte
for errWrite == nil && errRead != io.EOF {
buf, errRead = rr.receiver()
if errRead != nil && errRead != io.EOF {
return written, errRead
}
if len(buf) > 0 {
n, errWrite = w.Write(buf)
written += int64(n)
}
}
return written, errWrite
}
// NewWriter turns sender into an io.Writer. The sender callback will
// receive []byte arguments of length at most WriteBufferSize.
func NewWriter(sender func(p []byte) error) io.Writer {
return &sendWriter{sender: sender}
}
// WriteBufferSize is the largest []byte that Write() will pass to its
// underlying send function. This value can be changed at runtime using
// the GITALY_STREAMIO_WRITE_BUFFER_SIZE environment variable.
var WriteBufferSize = 128 * 1024
type sendWriter struct {
sender func([]byte) error
}
func (sw *sendWriter) Write(p []byte) (int, error) {
var sent int
for len(p) > 0 {
chunkSize := len(p)
if chunkSize > WriteBufferSize {
chunkSize = WriteBufferSize
}
if err := sw.sender(p[:chunkSize]); err != nil {
return sent, err
}
sent += chunkSize
p = p[chunkSize:]
}
return sent, nil
}
// ReadFrom implements io.ReaderFrom.
func (sw *sendWriter) ReadFrom(r io.Reader) (int64, error) {
var nRead int64
buf := make([]byte, WriteBufferSize)
var errRead, errSend error
for errSend == nil && errRead != io.EOF {
var n int
n, errRead = r.Read(buf)
nRead += int64(n)
if errRead != nil && errRead != io.EOF {
return nRead, errRead
}
if n > 0 {
errSend = sw.sender(buf[:n])
}
}
return nRead, errSend
}
......@@ -21,29 +21,37 @@
"revisionTime": "2017-03-31T03:19:02Z"
},
{
"checksumSHA1": "FPNHA80Wu9QTcNcjbuw0kdLOg5Q=",
"checksumSHA1": "dTfc2UncJV8JxRznLbc0itGp8SI=",
"path": "gitlab.com/gitlab-org/gitaly-proto/go",
"revision": "e73c809c669748d0f49e257a249c4c12b59f7968",
"revisionTime": "2017-07-07T12:10:40Z",
"revision": "c7790557c271c6e082c9e7cfa9e63380a7643dcf",
"revisionTime": "2017-07-14T18:05:40Z",
"tree": true,
"version": "v0.14.0",
"versionExact": "v0.14.0"
"version": "v0.17.0",
"versionExact": "v0.17.0"
},
{
"checksumSHA1": "dUHJbKas746n5fLzlwxHb6FOCxs=",
"path": "gitlab.com/gitlab-org/gitaly/auth",
"revision": "e4f8d3d14cc3fe673cb511fb4d0189b68a158ccd",
"revisionTime": "2017-06-30T12:58:40Z",
"version": "v0.14.0",
"versionExact": "v0.14.0"
"revision": "421641a7cd5a5d7edd8008a8089acbe9335b7f3d",
"revisionTime": "2017-07-18T12:50:12Z",
"version": "v0.21.2",
"versionExact": "v0.21.2"
},
{
"checksumSHA1": "Z/BteCm3WErBI8bBmSN9gD+3EbU=",
"checksumSHA1": "qlzYmQ21XX/voiKWHDWUZ3lybGQ=",
"path": "gitlab.com/gitlab-org/gitaly/client",
"revision": "e4f8d3d14cc3fe673cb511fb4d0189b68a158ccd",
"revisionTime": "2017-06-30T12:58:40Z",
"version": "v0.14.0",
"versionExact": "v0.14.0"
"revision": "421641a7cd5a5d7edd8008a8089acbe9335b7f3d",
"revisionTime": "2017-07-18T12:50:12Z",
"version": "v0.21.2",
"versionExact": "v0.21.2"
},
{
"checksumSHA1": "mifcYH0qXpoPkX5KzXoM3mterWQ=",
"path": "gitlab.com/gitlab-org/gitaly/streamio",
"revision": "421641a7cd5a5d7edd8008a8089acbe9335b7f3d",
"revisionTime": "2017-07-18T12:50:12Z",
"version": "v0.21.2",
"versionExact": "v0.21.2"
},
{
"checksumSHA1": "Y+HGqEkYM15ir+J93MEaHdyFy0c=",
......@@ -230,6 +238,11 @@
"path": "gopkg.in/yaml.v2",
"revision": "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b",
"revisionTime": "2017-04-07T17:21:22Z"
},
{
"path": "vendor/gitlab.com/gitlab-org/gitaly/streamio",
"revision": "v0.21.2",
"version": "v0.21.2"
}
],
"rootPath": "gitlab.com/gitlab-org/gitlab-shell/go"
......
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