Skip to content
Snippets Groups Projects
Commit fcd00106 authored by Alejandro Rodríguez's avatar Alejandro Rodríguez
Browse files

Add gRPC messages to get the local branches of a repository

parent 085d747c
No related branches found
No related tags found
1 merge request!12Add gRPC messages to get the local branches of a repository
Pipeline #
Loading
Loading
@@ -29,6 +29,10 @@ It has these top-level messages:
FindAllTagNamesResponse
FindRefNameRequest
FindRefNameResponse
FindLocalBranchesRequest
FindLocalBranchesResponse
FindLocalBranchResponse
FindLocalBranchCommitAuthor
Repository
ExitStatus
InfoRefsRequest
Loading
Loading
Loading
Loading
@@ -7,6 +7,7 @@ package gitaly
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
 
import (
context "golang.org/x/net/context"
Loading
Loading
@@ -18,6 +19,32 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
 
type FindLocalBranchesRequest_SortBy int32
const (
FindLocalBranchesRequest_NAME FindLocalBranchesRequest_SortBy = 0
FindLocalBranchesRequest_UPDATED_ASC FindLocalBranchesRequest_SortBy = 1
FindLocalBranchesRequest_UPDATED_DESC FindLocalBranchesRequest_SortBy = 2
)
var FindLocalBranchesRequest_SortBy_name = map[int32]string{
0: "NAME",
1: "UPDATED_ASC",
2: "UPDATED_DESC",
}
var FindLocalBranchesRequest_SortBy_value = map[string]int32{
"NAME": 0,
"UPDATED_ASC": 1,
"UPDATED_DESC": 2,
}
func (x FindLocalBranchesRequest_SortBy) String() string {
return proto.EnumName(FindLocalBranchesRequest_SortBy_name, int32(x))
}
func (FindLocalBranchesRequest_SortBy) EnumDescriptor() ([]byte, []int) {
return fileDescriptor3, []int{8, 0}
}
type FindDefaultBranchNameRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
}
Loading
Loading
@@ -165,6 +192,126 @@ func (m *FindRefNameResponse) GetName() []byte {
return nil
}
 
type FindLocalBranchesRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
SortBy FindLocalBranchesRequest_SortBy `protobuf:"varint,2,opt,name=sort_by,json=sortBy,enum=gitaly.FindLocalBranchesRequest_SortBy" json:"sort_by,omitempty"`
}
func (m *FindLocalBranchesRequest) Reset() { *m = FindLocalBranchesRequest{} }
func (m *FindLocalBranchesRequest) String() string { return proto.CompactTextString(m) }
func (*FindLocalBranchesRequest) ProtoMessage() {}
func (*FindLocalBranchesRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{8} }
func (m *FindLocalBranchesRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
func (m *FindLocalBranchesRequest) GetSortBy() FindLocalBranchesRequest_SortBy {
if m != nil {
return m.SortBy
}
return FindLocalBranchesRequest_NAME
}
type FindLocalBranchesResponse struct {
Branches []*FindLocalBranchResponse `protobuf:"bytes,1,rep,name=branches" json:"branches,omitempty"`
}
func (m *FindLocalBranchesResponse) Reset() { *m = FindLocalBranchesResponse{} }
func (m *FindLocalBranchesResponse) String() string { return proto.CompactTextString(m) }
func (*FindLocalBranchesResponse) ProtoMessage() {}
func (*FindLocalBranchesResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{9} }
func (m *FindLocalBranchesResponse) GetBranches() []*FindLocalBranchResponse {
if m != nil {
return m.Branches
}
return nil
}
type FindLocalBranchResponse struct {
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
CommitId string `protobuf:"bytes,2,opt,name=commit_id,json=commitId" json:"commit_id,omitempty"`
CommitSubject []byte `protobuf:"bytes,3,opt,name=commit_subject,json=commitSubject,proto3" json:"commit_subject,omitempty"`
CommitAuthor *FindLocalBranchCommitAuthor `protobuf:"bytes,4,opt,name=commit_author,json=commitAuthor" json:"commit_author,omitempty"`
CommitCommitter *FindLocalBranchCommitAuthor `protobuf:"bytes,5,opt,name=commit_committer,json=commitCommitter" json:"commit_committer,omitempty"`
}
func (m *FindLocalBranchResponse) Reset() { *m = FindLocalBranchResponse{} }
func (m *FindLocalBranchResponse) String() string { return proto.CompactTextString(m) }
func (*FindLocalBranchResponse) ProtoMessage() {}
func (*FindLocalBranchResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{10} }
func (m *FindLocalBranchResponse) GetName() []byte {
if m != nil {
return m.Name
}
return nil
}
func (m *FindLocalBranchResponse) GetCommitId() string {
if m != nil {
return m.CommitId
}
return ""
}
func (m *FindLocalBranchResponse) GetCommitSubject() []byte {
if m != nil {
return m.CommitSubject
}
return nil
}
func (m *FindLocalBranchResponse) GetCommitAuthor() *FindLocalBranchCommitAuthor {
if m != nil {
return m.CommitAuthor
}
return nil
}
func (m *FindLocalBranchResponse) GetCommitCommitter() *FindLocalBranchCommitAuthor {
if m != nil {
return m.CommitCommitter
}
return nil
}
type FindLocalBranchCommitAuthor struct {
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Email []byte `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
Date *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=date" json:"date,omitempty"`
}
func (m *FindLocalBranchCommitAuthor) Reset() { *m = FindLocalBranchCommitAuthor{} }
func (m *FindLocalBranchCommitAuthor) String() string { return proto.CompactTextString(m) }
func (*FindLocalBranchCommitAuthor) ProtoMessage() {}
func (*FindLocalBranchCommitAuthor) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{11} }
func (m *FindLocalBranchCommitAuthor) GetName() []byte {
if m != nil {
return m.Name
}
return nil
}
func (m *FindLocalBranchCommitAuthor) GetEmail() []byte {
if m != nil {
return m.Email
}
return nil
}
func (m *FindLocalBranchCommitAuthor) GetDate() *google_protobuf.Timestamp {
if m != nil {
return m.Date
}
return nil
}
func init() {
proto.RegisterType((*FindDefaultBranchNameRequest)(nil), "gitaly.FindDefaultBranchNameRequest")
proto.RegisterType((*FindDefaultBranchNameResponse)(nil), "gitaly.FindDefaultBranchNameResponse")
Loading
Loading
@@ -174,6 +321,11 @@ func init() {
proto.RegisterType((*FindAllTagNamesResponse)(nil), "gitaly.FindAllTagNamesResponse")
proto.RegisterType((*FindRefNameRequest)(nil), "gitaly.FindRefNameRequest")
proto.RegisterType((*FindRefNameResponse)(nil), "gitaly.FindRefNameResponse")
proto.RegisterType((*FindLocalBranchesRequest)(nil), "gitaly.FindLocalBranchesRequest")
proto.RegisterType((*FindLocalBranchesResponse)(nil), "gitaly.FindLocalBranchesResponse")
proto.RegisterType((*FindLocalBranchResponse)(nil), "gitaly.FindLocalBranchResponse")
proto.RegisterType((*FindLocalBranchCommitAuthor)(nil), "gitaly.FindLocalBranchCommitAuthor")
proto.RegisterEnum("gitaly.FindLocalBranchesRequest_SortBy", FindLocalBranchesRequest_SortBy_name, FindLocalBranchesRequest_SortBy_value)
}
 
// Reference imports to suppress errors if they are not otherwise used.
Loading
Loading
@@ -192,6 +344,8 @@ type RefClient interface {
FindAllTagNames(ctx context.Context, in *FindAllTagNamesRequest, opts ...grpc.CallOption) (Ref_FindAllTagNamesClient, error)
// Find a Ref matching the given constraints. Response may be empty.
FindRefName(ctx context.Context, in *FindRefNameRequest, opts ...grpc.CallOption) (*FindRefNameResponse, error)
// Return a stream so we can divide the response in chunks of branches
FindLocalBranches(ctx context.Context, in *FindLocalBranchesRequest, opts ...grpc.CallOption) (Ref_FindLocalBranchesClient, error)
}
 
type refClient struct {
Loading
Loading
@@ -284,6 +438,38 @@ func (c *refClient) FindRefName(ctx context.Context, in *FindRefNameRequest, opt
return out, nil
}
 
func (c *refClient) FindLocalBranches(ctx context.Context, in *FindLocalBranchesRequest, opts ...grpc.CallOption) (Ref_FindLocalBranchesClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Ref_serviceDesc.Streams[2], c.cc, "/gitaly.Ref/FindLocalBranches", opts...)
if err != nil {
return nil, err
}
x := &refFindLocalBranchesClient{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 Ref_FindLocalBranchesClient interface {
Recv() (*FindLocalBranchesResponse, error)
grpc.ClientStream
}
type refFindLocalBranchesClient struct {
grpc.ClientStream
}
func (x *refFindLocalBranchesClient) Recv() (*FindLocalBranchesResponse, error) {
m := new(FindLocalBranchesResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for Ref service
 
type RefServer interface {
Loading
Loading
@@ -292,6 +478,8 @@ type RefServer interface {
FindAllTagNames(*FindAllTagNamesRequest, Ref_FindAllTagNamesServer) error
// Find a Ref matching the given constraints. Response may be empty.
FindRefName(context.Context, *FindRefNameRequest) (*FindRefNameResponse, error)
// Return a stream so we can divide the response in chunks of branches
FindLocalBranches(*FindLocalBranchesRequest, Ref_FindLocalBranchesServer) error
}
 
func RegisterRefServer(s *grpc.Server, srv RefServer) {
Loading
Loading
@@ -376,6 +564,27 @@ func _Ref_FindRefName_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
 
func _Ref_FindLocalBranches_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(FindLocalBranchesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(RefServer).FindLocalBranches(m, &refFindLocalBranchesServer{stream})
}
type Ref_FindLocalBranchesServer interface {
Send(*FindLocalBranchesResponse) error
grpc.ServerStream
}
type refFindLocalBranchesServer struct {
grpc.ServerStream
}
func (x *refFindLocalBranchesServer) Send(m *FindLocalBranchesResponse) error {
return x.ServerStream.SendMsg(m)
}
var _Ref_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.Ref",
HandlerType: (*RefServer)(nil),
Loading
Loading
@@ -400,6 +609,11 @@ var _Ref_serviceDesc = grpc.ServiceDesc{
Handler: _Ref_FindAllTagNames_Handler,
ServerStreams: true,
},
{
StreamName: "FindLocalBranches",
Handler: _Ref_FindLocalBranches_Handler,
ServerStreams: true,
},
},
Metadata: "ref.proto",
}
Loading
Loading
@@ -407,27 +621,44 @@ var _Ref_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("ref.proto", fileDescriptor3) }
 
var fileDescriptor3 = []byte{
// 348 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x5d, 0x4b, 0x3a, 0x41,
0x14, 0xc6, 0xff, 0xab, 0xff, 0x24, 0x8f, 0x42, 0x70, 0x2a, 0xdb, 0xc6, 0x5e, 0x6c, 0x28, 0xb0,
0x1b, 0x8b, 0xf5, 0x13, 0x14, 0x11, 0x05, 0x51, 0x30, 0x44, 0xb7, 0x32, 0xb9, 0x67, 0x75, 0x61,
0xdf, 0x9a, 0x59, 0x21, 0x2f, 0xfa, 0xce, 0x7d, 0x84, 0x70, 0x47, 0x6b, 0xb5, 0xd5, 0x2e, 0xbc,
0xdb, 0x99, 0x73, 0x9e, 0xdf, 0x79, 0x98, 0xe7, 0x2c, 0x54, 0x15, 0x79, 0x9d, 0x44, 0xc5, 0x69,
0x8c, 0x95, 0x81, 0x9f, 0xca, 0x60, 0xcc, 0xea, 0x7a, 0x28, 0x15, 0xb9, 0xe6, 0x96, 0x0b, 0x38,
0xb8, 0xf5, 0x23, 0xf7, 0x86, 0x3c, 0x39, 0x0a, 0xd2, 0x6b, 0x25, 0xa3, 0xfe, 0xf0, 0x51, 0x86,
0x24, 0xe8, 0x6d, 0x44, 0x3a, 0x45, 0x07, 0x40, 0x51, 0x12, 0x6b, 0x3f, 0x8d, 0xd5, 0xd8, 0xb6,
0x5a, 0x56, 0xbb, 0xe6, 0x60, 0xc7, 0xa0, 0x3a, 0xe2, 0xbb, 0x22, 0x72, 0x5d, 0xbc, 0x0b, 0x87,
0x4b, 0x98, 0x3a, 0x89, 0x23, 0x4d, 0x88, 0xf0, 0x3f, 0x92, 0x21, 0x65, 0xb8, 0xba, 0xc8, 0xbe,
0xf9, 0x13, 0xec, 0x4f, 0x44, 0x57, 0x41, 0xf0, 0x23, 0xd0, 0xeb, 0xb8, 0x70, 0x80, 0x15, 0x01,
0xa7, 0x16, 0x76, 0x60, 0x63, 0x32, 0x56, 0xdb, 0x56, 0xab, 0xdc, 0xae, 0x0b, 0x73, 0xe0, 0x0f,
0xd0, 0x98, 0x6a, 0x9e, 0xe5, 0x60, 0x6d, 0x07, 0x17, 0xb0, 0xf7, 0x8b, 0xb6, 0x72, 0xfc, 0x07,
0xe0, 0x44, 0x20, 0xc8, 0x5b, 0x33, 0x02, 0x6c, 0x42, 0xb5, 0x1f, 0x87, 0xa1, 0x9f, 0xf6, 0x7c,
0xd7, 0x2e, 0xb5, 0xac, 0x76, 0x55, 0x6c, 0x9a, 0x8b, 0x7b, 0x17, 0x1b, 0x50, 0x49, 0x14, 0x79,
0xfe, 0xbb, 0x5d, 0xce, 0x02, 0x98, 0x9e, 0xf8, 0x39, 0x6c, 0xcf, 0x8d, 0x5f, 0x9e, 0x96, 0xf3,
0x59, 0x82, 0xb2, 0x20, 0x0f, 0x3d, 0xd8, 0x2d, 0x8c, 0x1a, 0x4f, 0x67, 0x06, 0x57, 0x6d, 0x17,
0x3b, 0xfb, 0xa3, 0xcb, 0x38, 0xe0, 0xff, 0xb0, 0x67, 0x5e, 0x66, 0x3e, 0x4c, 0x3c, 0xc9, 0xcb,
0x0b, 0x37, 0x87, 0xf1, 0x55, 0x2d, 0x33, 0xfc, 0xa5, 0x85, 0x2f, 0xb0, 0xb5, 0x90, 0x15, 0x1e,
0x2d, 0x48, 0x17, 0x56, 0x82, 0x1d, 0x2f, 0xad, 0xe7, 0xb8, 0x77, 0x50, 0xcb, 0xbd, 0x29, 0xb2,
0xbc, 0x66, 0x3e, 0x67, 0xd6, 0x2c, 0xac, 0xcd, 0x58, 0xaf, 0x95, 0xec, 0x87, 0xed, 0x7e, 0x05,
0x00, 0x00, 0xff, 0xff, 0x37, 0x37, 0x01, 0xf5, 0xd3, 0x03, 0x00, 0x00,
// 615 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00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f, 0xbd,
0x92, 0x7a, 0x1e, 0xab, 0x7b, 0x09, 0xc5, 0xd8, 0xf3, 0x47, 0x7a, 0x9c, 0xb3, 0x6e, 0x49, 0x7a,
0x39, 0xf1, 0x6c, 0xb5, 0x82, 0x2f, 0x70, 0xe7, 0xc6, 0x9b, 0x42, 0xd5, 0xdb, 0x1e, 0xb4, 0x7e,
0x9a, 0x81, 0xb8, 0x9e, 0x73, 0x50, 0x10, 0x52, 0x9f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x2c,
0xc7, 0x33, 0x9b, 0xfd, 0x06, 0x00, 0x00,
}
Loading
Loading
@@ -3,6 +3,7 @@ syntax = "proto3";
package gitaly;
 
import "shared.proto";
import "google/protobuf/timestamp.proto";
 
service Ref {
rpc FindDefaultBranchName(FindDefaultBranchNameRequest) returns (FindDefaultBranchNameResponse) {}
Loading
Loading
@@ -10,6 +11,8 @@ service Ref {
rpc FindAllTagNames(FindAllTagNamesRequest) returns (stream FindAllTagNamesResponse) {}
// Find a Ref matching the given constraints. Response may be empty.
rpc FindRefName(FindRefNameRequest) returns (FindRefNameResponse) {}
// Return a stream so we can divide the response in chunks of branches
rpc FindLocalBranches(FindLocalBranchesRequest) returns (stream FindLocalBranchesResponse) {}
}
 
message FindDefaultBranchNameRequest {
Loading
Loading
@@ -48,3 +51,31 @@ message FindRefNameResponse {
// Example name: "refs/heads/master". Cannot assume UTF8, so the type is bytes.
bytes name = 1;
}
message FindLocalBranchesRequest {
Repository repository = 1;
enum SortBy {
NAME = 0;
UPDATED_ASC = 1;
UPDATED_DESC = 2;
}
SortBy sort_by = 2;
}
message FindLocalBranchesResponse {
repeated FindLocalBranchResponse branches = 1;
}
message FindLocalBranchResponse {
bytes name = 1;
string commit_id = 2;
bytes commit_subject = 3;
FindLocalBranchCommitAuthor commit_author = 4;
FindLocalBranchCommitAuthor commit_committer = 5;
}
message FindLocalBranchCommitAuthor {
bytes name = 1;
bytes email = 2;
google.protobuf.Timestamp date = 3;
}
Loading
Loading
@@ -4,6 +4,7 @@
require 'google/protobuf'
 
require 'shared_pb'
require 'google/protobuf/timestamp_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "gitaly.FindDefaultBranchNameRequest" do
optional :repository, :message, 1, "gitaly.Repository"
Loading
Loading
@@ -31,6 +32,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "gitaly.FindRefNameResponse" do
optional :name, :bytes, 1
end
add_message "gitaly.FindLocalBranchesRequest" do
optional :repository, :message, 1, "gitaly.Repository"
optional :sort_by, :enum, 2, "gitaly.FindLocalBranchesRequest.SortBy"
end
add_enum "gitaly.FindLocalBranchesRequest.SortBy" do
value :NAME, 0
value :UPDATED_ASC, 1
value :UPDATED_DESC, 2
end
add_message "gitaly.FindLocalBranchesResponse" do
repeated :branches, :message, 1, "gitaly.FindLocalBranchResponse"
end
add_message "gitaly.FindLocalBranchResponse" do
optional :name, :bytes, 1
optional :commit_id, :string, 2
optional :commit_subject, :bytes, 3
optional :commit_author, :message, 4, "gitaly.FindLocalBranchCommitAuthor"
optional :commit_committer, :message, 5, "gitaly.FindLocalBranchCommitAuthor"
end
add_message "gitaly.FindLocalBranchCommitAuthor" do
optional :name, :bytes, 1
optional :email, :bytes, 2
optional :date, :message, 3, "google.protobuf.Timestamp"
end
end
 
module Gitaly
Loading
Loading
@@ -42,4 +67,9 @@ module Gitaly
FindAllTagNamesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagNamesResponse").msgclass
FindRefNameRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindRefNameRequest").msgclass
FindRefNameResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindRefNameResponse").msgclass
FindLocalBranchesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindLocalBranchesRequest").msgclass
FindLocalBranchesRequest::SortBy = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindLocalBranchesRequest.SortBy").enummodule
FindLocalBranchesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindLocalBranchesResponse").msgclass
FindLocalBranchResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindLocalBranchResponse").msgclass
FindLocalBranchCommitAuthor = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindLocalBranchCommitAuthor").msgclass
end
Loading
Loading
@@ -19,6 +19,8 @@ module Gitaly
rpc :FindAllTagNames, FindAllTagNamesRequest, stream(FindAllTagNamesResponse)
# Find a Ref matching the given constraints. Response may be empty.
rpc :FindRefName, FindRefNameRequest, FindRefNameResponse
# Return a stream so we can divide the response in chunks of branches
rpc :FindLocalBranches, FindLocalBranchesRequest, stream(FindLocalBranchesResponse)
end
 
Stub = Service.rpc_stub_class
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment