From 778cd6dbe47720ef4dc38d2a7488ea578fa884bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Tue, 14 Feb 2017 17:07:48 -0300 Subject: [PATCH] Create service and message definitions used on TreeController#show --- gitaly.proto | 30 +++ go/gitaly.pb.go | 337 ++++++++++++++++++++++++-- ruby/lib/gitaly/gitaly_pb.rb | 24 ++ ruby/lib/gitaly/gitaly_services_pb.rb | 16 ++ 4 files changed, 390 insertions(+), 17 deletions(-) diff --git a/gitaly.proto b/gitaly.proto index 34159704..a269f86f 100644 --- a/gitaly.proto +++ b/gitaly.proto @@ -15,6 +15,12 @@ service Notifications { rpc PostReceive(PostReceiveRequest) returns (PostReceiveResponse) {} } +service Ref { + rpc FindDefaultBranchName(FindDefaultBranchNameRequest) returns (FindDefaultBranchNameResponse) {} + rpc FindAllBranchNames(FindAllBranchNamesRequest) returns (stream FindAllBranchNamesResponse) {} + rpc FindAllTagNames(FindAllTagNamesRequest) returns (stream FindAllTagNamesResponse) {} +} + message InfoRefsRequest { Repository repository = 1; } @@ -32,3 +38,27 @@ message PostReceiveRequest { } message PostReceiveResponse {} + +message FindDefaultBranchNameRequest { + Repository repository = 1; +} + +message FindAllBranchNamesRequest { + Repository repository = 1; +} + +message FindAllTagNamesRequest { + Repository repository = 1; +} + +message FindDefaultBranchNameResponse { + bytes name = 1; +} + +message FindAllBranchNamesResponse { + repeated bytes names = 1; +} + +message FindAllTagNamesResponse { + repeated bytes names = 1; +} diff --git a/go/gitaly.pb.go b/go/gitaly.pb.go index 1ccf60c6..be49c262 100644 --- a/go/gitaly.pb.go +++ b/go/gitaly.pb.go @@ -14,6 +14,12 @@ It has these top-level messages: Repository PostReceiveRequest PostReceiveResponse + FindDefaultBranchNameRequest + FindAllBranchNamesRequest + FindAllTagNamesRequest + FindDefaultBranchNameResponse + FindAllBranchNamesResponse + FindAllTagNamesResponse */ package gitaly @@ -109,12 +115,114 @@ func (m *PostReceiveResponse) String() string { return proto.CompactT func (*PostReceiveResponse) ProtoMessage() {} func (*PostReceiveResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +type FindDefaultBranchNameRequest struct { + Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"` +} + +func (m *FindDefaultBranchNameRequest) Reset() { *m = FindDefaultBranchNameRequest{} } +func (m *FindDefaultBranchNameRequest) String() string { return proto.CompactTextString(m) } +func (*FindDefaultBranchNameRequest) ProtoMessage() {} +func (*FindDefaultBranchNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *FindDefaultBranchNameRequest) GetRepository() *Repository { + if m != nil { + return m.Repository + } + return nil +} + +type FindAllBranchNamesRequest struct { + Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"` +} + +func (m *FindAllBranchNamesRequest) Reset() { *m = FindAllBranchNamesRequest{} } +func (m *FindAllBranchNamesRequest) String() string { return proto.CompactTextString(m) } +func (*FindAllBranchNamesRequest) ProtoMessage() {} +func (*FindAllBranchNamesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *FindAllBranchNamesRequest) GetRepository() *Repository { + if m != nil { + return m.Repository + } + return nil +} + +type FindAllTagNamesRequest struct { + Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"` +} + +func (m *FindAllTagNamesRequest) Reset() { *m = FindAllTagNamesRequest{} } +func (m *FindAllTagNamesRequest) String() string { return proto.CompactTextString(m) } +func (*FindAllTagNamesRequest) ProtoMessage() {} +func (*FindAllTagNamesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *FindAllTagNamesRequest) GetRepository() *Repository { + if m != nil { + return m.Repository + } + return nil +} + +type FindDefaultBranchNameResponse struct { + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *FindDefaultBranchNameResponse) Reset() { *m = FindDefaultBranchNameResponse{} } +func (m *FindDefaultBranchNameResponse) String() string { return proto.CompactTextString(m) } +func (*FindDefaultBranchNameResponse) ProtoMessage() {} +func (*FindDefaultBranchNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *FindDefaultBranchNameResponse) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +type FindAllBranchNamesResponse struct { + Names [][]byte `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` +} + +func (m *FindAllBranchNamesResponse) Reset() { *m = FindAllBranchNamesResponse{} } +func (m *FindAllBranchNamesResponse) String() string { return proto.CompactTextString(m) } +func (*FindAllBranchNamesResponse) ProtoMessage() {} +func (*FindAllBranchNamesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *FindAllBranchNamesResponse) GetNames() [][]byte { + if m != nil { + return m.Names + } + return nil +} + +type FindAllTagNamesResponse struct { + Names [][]byte `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` +} + +func (m *FindAllTagNamesResponse) Reset() { *m = FindAllTagNamesResponse{} } +func (m *FindAllTagNamesResponse) String() string { return proto.CompactTextString(m) } +func (*FindAllTagNamesResponse) ProtoMessage() {} +func (*FindAllTagNamesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +func (m *FindAllTagNamesResponse) GetNames() [][]byte { + if m != nil { + return m.Names + } + return nil +} + func init() { proto.RegisterType((*InfoRefsRequest)(nil), "gitaly.InfoRefsRequest") proto.RegisterType((*InfoRefsResponse)(nil), "gitaly.InfoRefsResponse") proto.RegisterType((*Repository)(nil), "gitaly.Repository") proto.RegisterType((*PostReceiveRequest)(nil), "gitaly.PostReceiveRequest") proto.RegisterType((*PostReceiveResponse)(nil), "gitaly.PostReceiveResponse") + proto.RegisterType((*FindDefaultBranchNameRequest)(nil), "gitaly.FindDefaultBranchNameRequest") + proto.RegisterType((*FindAllBranchNamesRequest)(nil), "gitaly.FindAllBranchNamesRequest") + proto.RegisterType((*FindAllTagNamesRequest)(nil), "gitaly.FindAllTagNamesRequest") + proto.RegisterType((*FindDefaultBranchNameResponse)(nil), "gitaly.FindDefaultBranchNameResponse") + proto.RegisterType((*FindAllBranchNamesResponse)(nil), "gitaly.FindAllBranchNamesResponse") + proto.RegisterType((*FindAllTagNamesResponse)(nil), "gitaly.FindAllTagNamesResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -344,24 +452,219 @@ var _Notifications_serviceDesc = grpc.ServiceDesc{ Metadata: "gitaly.proto", } +// Client API for Ref service + +type RefClient interface { + FindDefaultBranchName(ctx context.Context, in *FindDefaultBranchNameRequest, opts ...grpc.CallOption) (*FindDefaultBranchNameResponse, error) + FindAllBranchNames(ctx context.Context, in *FindAllBranchNamesRequest, opts ...grpc.CallOption) (Ref_FindAllBranchNamesClient, error) + FindAllTagNames(ctx context.Context, in *FindAllTagNamesRequest, opts ...grpc.CallOption) (Ref_FindAllTagNamesClient, error) +} + +type refClient struct { + cc *grpc.ClientConn +} + +func NewRefClient(cc *grpc.ClientConn) RefClient { + return &refClient{cc} +} + +func (c *refClient) FindDefaultBranchName(ctx context.Context, in *FindDefaultBranchNameRequest, opts ...grpc.CallOption) (*FindDefaultBranchNameResponse, error) { + out := new(FindDefaultBranchNameResponse) + err := grpc.Invoke(ctx, "/gitaly.Ref/FindDefaultBranchName", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *refClient) FindAllBranchNames(ctx context.Context, in *FindAllBranchNamesRequest, opts ...grpc.CallOption) (Ref_FindAllBranchNamesClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Ref_serviceDesc.Streams[0], c.cc, "/gitaly.Ref/FindAllBranchNames", opts...) + if err != nil { + return nil, err + } + x := &refFindAllBranchNamesClient{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_FindAllBranchNamesClient interface { + Recv() (*FindAllBranchNamesResponse, error) + grpc.ClientStream +} + +type refFindAllBranchNamesClient struct { + grpc.ClientStream +} + +func (x *refFindAllBranchNamesClient) Recv() (*FindAllBranchNamesResponse, error) { + m := new(FindAllBranchNamesResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *refClient) FindAllTagNames(ctx context.Context, in *FindAllTagNamesRequest, opts ...grpc.CallOption) (Ref_FindAllTagNamesClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Ref_serviceDesc.Streams[1], c.cc, "/gitaly.Ref/FindAllTagNames", opts...) + if err != nil { + return nil, err + } + x := &refFindAllTagNamesClient{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_FindAllTagNamesClient interface { + Recv() (*FindAllTagNamesResponse, error) + grpc.ClientStream +} + +type refFindAllTagNamesClient struct { + grpc.ClientStream +} + +func (x *refFindAllTagNamesClient) Recv() (*FindAllTagNamesResponse, error) { + m := new(FindAllTagNamesResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// Server API for Ref service + +type RefServer interface { + FindDefaultBranchName(context.Context, *FindDefaultBranchNameRequest) (*FindDefaultBranchNameResponse, error) + FindAllBranchNames(*FindAllBranchNamesRequest, Ref_FindAllBranchNamesServer) error + FindAllTagNames(*FindAllTagNamesRequest, Ref_FindAllTagNamesServer) error +} + +func RegisterRefServer(s *grpc.Server, srv RefServer) { + s.RegisterService(&_Ref_serviceDesc, srv) +} + +func _Ref_FindDefaultBranchName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindDefaultBranchNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RefServer).FindDefaultBranchName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitaly.Ref/FindDefaultBranchName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RefServer).FindDefaultBranchName(ctx, req.(*FindDefaultBranchNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Ref_FindAllBranchNames_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FindAllBranchNamesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RefServer).FindAllBranchNames(m, &refFindAllBranchNamesServer{stream}) +} + +type Ref_FindAllBranchNamesServer interface { + Send(*FindAllBranchNamesResponse) error + grpc.ServerStream +} + +type refFindAllBranchNamesServer struct { + grpc.ServerStream +} + +func (x *refFindAllBranchNamesServer) Send(m *FindAllBranchNamesResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Ref_FindAllTagNames_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FindAllTagNamesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RefServer).FindAllTagNames(m, &refFindAllTagNamesServer{stream}) +} + +type Ref_FindAllTagNamesServer interface { + Send(*FindAllTagNamesResponse) error + grpc.ServerStream +} + +type refFindAllTagNamesServer struct { + grpc.ServerStream +} + +func (x *refFindAllTagNamesServer) Send(m *FindAllTagNamesResponse) error { + return x.ServerStream.SendMsg(m) +} + +var _Ref_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gitaly.Ref", + HandlerType: (*RefServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FindDefaultBranchName", + Handler: _Ref_FindDefaultBranchName_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "FindAllBranchNames", + Handler: _Ref_FindAllBranchNames_Handler, + ServerStreams: true, + }, + { + StreamName: "FindAllTagNames", + Handler: _Ref_FindAllTagNames_Handler, + ServerStreams: true, + }, + }, + Metadata: "gitaly.proto", +} + func init() { proto.RegisterFile("gitaly.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 256 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa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, 0xe9, 0x74, 0x5b, 0x68, 0xb1, 0x6a, 0xe7, 0x2c, 0xc1, 0x6b, 0x98, 0x74, 0xf7, 0xe1, 0xd5, - 0x1e, 0xb4, 0xec, 0x1e, 0xf6, 0x6e, 0x58, 0x6c, 0x65, 0x4b, 0x23, 0x96, 0x6b, 0x8f, 0x39, 0x8c, - 0x36, 0x3e, 0x84, 0x69, 0xec, 0xde, 0x9e, 0x57, 0x7a, 0xfc, 0xaf, 0x16, 0xe1, 0x0f, 0x83, 0xb0, - 0x04, 0xe7, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0x0b, 0x65, 0xc1, 0x14, 0x02, 0x00, 0x00, + // 406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x94, 0xdf, 0x6e, 0xda, 0x30, + 0x14, 0xc6, 0x97, 0xb1, 0x21, 0x71, 0x60, 0x62, 0x3a, 0x8c, 0xc1, 0xb2, 0x7f, 0xcc, 0xda, 0x26, + 0xae, 0xd8, 0x14, 0x9e, 0x60, 0x53, 0x5b, 0x51, 0x15, 0x51, 0xe4, 0xd2, 0x4a, 0xbd, 0xaa, 0xdc, + 0xe0, 0x40, 0xd4, 0x10, 0xa7, 0xb1, 0xa9, 0xc4, 0x0b, 0xf1, 0x9c, 0x55, 0x42, 0xd2, 0xa4, 0x49, + 0xa0, 0x17, 0xb9, 0xb3, 0x73, 0xbe, 0xef, 0x67, 0x1f, 0x9f, 0x4f, 0x81, 0xc6, 0xc2, 0x56, 0xcc, + 0xd9, 0x0c, 0x3c, 0x5f, 0x28, 0x81, 0xd5, 0xdd, 0x8e, 0x1c, 0x43, 0xf3, 0xd4, 0xb5, 0x04, 0xe5, + 0x96, 0xa4, 0xfc, 0x7e, 0xcd, 0xa5, 0x42, 0x03, 0xc0, 0xe7, 0x9e, 0x90, 0xb6, 0x12, 0xfe, 0xa6, + 0xab, 0xf5, 0x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x68, 0x25, 0xdf, 0xc3, 0x08, 0x94, 0xa0, + 0x19, 0xd7, 0xf0, 0x6e, 0x22, 0x94, 0x6d, 0xd9, 0x26, 0x53, 0xb6, 0x70, 0x25, 0x8e, 0xa0, 0x9e, + 0x4a, 0x17, 0xea, 0xb1, 0x3b, 0x1f, 0x5e, 0xfd, 0x73, 0x61, 0x2d, 0x86, 0x1b, 0xdb, 0xd7, 0x50, + 0xa1, 0xdc, 0x42, 0x0b, 0xda, 0x85, 0x53, 0xc2, 0x9f, 0xb1, 0xff, 0x50, 0x6e, 0xf5, 0x5f, 0x2f, + 0xa8, 0xe2, 0xf3, 0xf0, 0x06, 0x30, 0x3f, 0x58, 0xfc, 0x91, 0xb6, 0x17, 0x06, 0x59, 0x27, 0x87, + 0x24, 0xa9, 0x97, 0xbf, 0x82, 0x66, 0x26, 0x05, 0xf8, 0x2d, 0x63, 0xcd, 0xa4, 0x5a, 0xff, 0xbe, + 0xb7, 0x9e, 0x70, 0x6f, 0xab, 0xe1, 0xaf, 0x6b, 0xf8, 0x18, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x19, + 0xd9, 0x40, 0xca, 0x04, 0x00, 0x00, } diff --git a/ruby/lib/gitaly/gitaly_pb.rb b/ruby/lib/gitaly/gitaly_pb.rb index 9a040343..5bbbc39f 100644 --- a/ruby/lib/gitaly/gitaly_pb.rb +++ b/ruby/lib/gitaly/gitaly_pb.rb @@ -18,6 +18,24 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "gitaly.PostReceiveResponse" do end + add_message "gitaly.FindDefaultBranchNameRequest" do + optional :repository, :message, 1, "gitaly.Repository" + end + add_message "gitaly.FindAllBranchNamesRequest" do + optional :repository, :message, 1, "gitaly.Repository" + end + add_message "gitaly.FindAllTagNamesRequest" do + optional :repository, :message, 1, "gitaly.Repository" + end + add_message "gitaly.FindDefaultBranchNameResponse" do + optional :name, :bytes, 1 + end + add_message "gitaly.FindAllBranchNamesResponse" do + repeated :names, :bytes, 1 + end + add_message "gitaly.FindAllTagNamesResponse" do + repeated :names, :bytes, 1 + end end module Gitaly @@ -26,4 +44,10 @@ module Gitaly Repository = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.Repository").msgclass PostReceiveRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PostReceiveRequest").msgclass PostReceiveResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PostReceiveResponse").msgclass + FindDefaultBranchNameRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindDefaultBranchNameRequest").msgclass + FindAllBranchNamesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllBranchNamesRequest").msgclass + FindAllTagNamesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagNamesRequest").msgclass + FindDefaultBranchNameResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindDefaultBranchNameResponse").msgclass + FindAllBranchNamesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllBranchNamesResponse").msgclass + FindAllTagNamesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagNamesResponse").msgclass end diff --git a/ruby/lib/gitaly/gitaly_services_pb.rb b/ruby/lib/gitaly/gitaly_services_pb.rb index 52872cd3..6ae783ed 100644 --- a/ruby/lib/gitaly/gitaly_services_pb.rb +++ b/ruby/lib/gitaly/gitaly_services_pb.rb @@ -35,6 +35,22 @@ module Gitaly rpc :PostReceive, PostReceiveRequest, PostReceiveResponse end + Stub = Service.rpc_stub_class + end + module Ref + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'gitaly.Ref' + + rpc :FindDefaultBranchName, FindDefaultBranchNameRequest, FindDefaultBranchNameResponse + rpc :FindAllBranchNames, FindAllBranchNamesRequest, stream(FindAllBranchNamesResponse) + rpc :FindAllTagNames, FindAllTagNamesRequest, stream(FindAllTagNamesResponse) + end + Stub = Service.rpc_stub_class end end -- GitLab