Commit d93acd4a authored by Andrew Newdigate's avatar Andrew Newdigate Committed by Jacob Vosmaer

Removes legacy methods

parent 38222414
syntax = "proto3";
package gitaly;
import "commit.proto";
import "diff.proto";
import "notifications.proto";
import "ref.proto";
import "smarthttp.proto";
import "ssh.proto";
// TODO: remove all these legacy RPC interfaces when client references to them are removed.
// Deprecated
service Commit {
rpc CommitIsAncestor(CommitIsAncestorRequest) returns (CommitIsAncestorResponse) { }
rpc TreeEntry(TreeEntryRequest) returns (stream TreeEntryResponse) { };
}
// Deprecated
service Diff {
// Returns stream of CommitDiffResponse with patches chunked over messages
rpc CommitDiff(CommitDiffRequest) returns (stream CommitDiffResponse) { };
// Return a stream so we can divide the response in chunks of deltas
rpc CommitDelta(CommitDeltaRequest) returns (stream CommitDeltaResponse) { };
}
// Deprecated
service Notifications {
rpc PostReceive(PostReceiveRequest) returns (PostReceiveResponse) { }
}
// Deprecated
service Ref {
rpc FindDefaultBranchName(FindDefaultBranchNameRequest) returns (FindDefaultBranchNameResponse) { }
rpc FindAllBranchNames(FindAllBranchNamesRequest) returns (stream FindAllBranchNamesResponse) { }
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) { }
}
// DEPRECATED
service SmartHTTP {
// The response body for GET /info/refs?service=git-upload-pack
rpc InfoRefsUploadPack(InfoRefsRequest) returns (stream InfoRefsResponse) { }
// The response body for GET /info/refs?service=git-receive-pack
rpc InfoRefsReceivePack(InfoRefsRequest) returns (stream InfoRefsResponse) { }
// Request and response body for POST /upload-pack
rpc PostUploadPack(stream PostUploadPackRequest) returns (stream PostUploadPackResponse) { }
// Request and response body for POST /receive-pack
rpc PostReceivePack(stream PostReceivePackRequest) returns (stream PostReceivePackResponse) { }
}
// DEPRECATED
service SSH {
// To forward 'git upload-pack' to Gitaly for SSH sessions
rpc SSHUploadPack(stream SSHUploadPackRequest) returns (stream SSHUploadPackResponse) { }
// To forward 'git receive-pack' to Gitaly for SSH sessions
rpc SSHReceivePack(stream SSHReceivePackRequest) returns (stream SSHReceivePackResponse) { }
}
......@@ -8,7 +8,6 @@ It is generated from these files:
blob.proto
commit.proto
conflicts.proto
deprecated-services.proto
diff.proto
namespace.proto
notifications.proto
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: deprecated-services.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
// 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 Commit service
type CommitClient interface {
CommitIsAncestor(ctx context.Context, in *CommitIsAncestorRequest, opts ...grpc.CallOption) (*CommitIsAncestorResponse, error)
TreeEntry(ctx context.Context, in *TreeEntryRequest, opts ...grpc.CallOption) (Commit_TreeEntryClient, error)
}
type commitClient struct {
cc *grpc.ClientConn
}
func NewCommitClient(cc *grpc.ClientConn) CommitClient {
return &commitClient{cc}
}
func (c *commitClient) CommitIsAncestor(ctx context.Context, in *CommitIsAncestorRequest, opts ...grpc.CallOption) (*CommitIsAncestorResponse, error) {
out := new(CommitIsAncestorResponse)
err := grpc.Invoke(ctx, "/gitaly.Commit/CommitIsAncestor", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commitClient) TreeEntry(ctx context.Context, in *TreeEntryRequest, opts ...grpc.CallOption) (Commit_TreeEntryClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Commit_serviceDesc.Streams[0], c.cc, "/gitaly.Commit/TreeEntry", opts...)
if err != nil {
return nil, err
}
x := &commitTreeEntryClient{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 Commit_TreeEntryClient interface {
Recv() (*TreeEntryResponse, error)
grpc.ClientStream
}
type commitTreeEntryClient struct {
grpc.ClientStream
}
func (x *commitTreeEntryClient) Recv() (*TreeEntryResponse, error) {
m := new(TreeEntryResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for Commit service
type CommitServer interface {
CommitIsAncestor(context.Context, *CommitIsAncestorRequest) (*CommitIsAncestorResponse, error)
TreeEntry(*TreeEntryRequest, Commit_TreeEntryServer) error
}
func RegisterCommitServer(s *grpc.Server, srv CommitServer) {
s.RegisterService(&_Commit_serviceDesc, srv)
}
func _Commit_CommitIsAncestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CommitIsAncestorRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommitServer).CommitIsAncestor(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.Commit/CommitIsAncestor",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommitServer).CommitIsAncestor(ctx, req.(*CommitIsAncestorRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Commit_TreeEntry_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(TreeEntryRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(CommitServer).TreeEntry(m, &commitTreeEntryServer{stream})
}
type Commit_TreeEntryServer interface {
Send(*TreeEntryResponse) error
grpc.ServerStream
}
type commitTreeEntryServer struct {
grpc.ServerStream
}
func (x *commitTreeEntryServer) Send(m *TreeEntryResponse) error {
return x.ServerStream.SendMsg(m)
}
var _Commit_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.Commit",
HandlerType: (*CommitServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CommitIsAncestor",
Handler: _Commit_CommitIsAncestor_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "TreeEntry",
Handler: _Commit_TreeEntry_Handler,
ServerStreams: true,
},
},
Metadata: "deprecated-services.proto",
}
// Client API for Diff service
type DiffClient interface {
// Returns stream of CommitDiffResponse with patches chunked over messages
CommitDiff(ctx context.Context, in *CommitDiffRequest, opts ...grpc.CallOption) (Diff_CommitDiffClient, error)
// Return a stream so we can divide the response in chunks of deltas
CommitDelta(ctx context.Context, in *CommitDeltaRequest, opts ...grpc.CallOption) (Diff_CommitDeltaClient, error)
}
type diffClient struct {
cc *grpc.ClientConn
}
func NewDiffClient(cc *grpc.ClientConn) DiffClient {
return &diffClient{cc}
}
func (c *diffClient) CommitDiff(ctx context.Context, in *CommitDiffRequest, opts ...grpc.CallOption) (Diff_CommitDiffClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Diff_serviceDesc.Streams[0], c.cc, "/gitaly.Diff/CommitDiff", opts...)
if err != nil {
return nil, err
}
x := &diffCommitDiffClient{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 Diff_CommitDiffClient interface {
Recv() (*CommitDiffResponse, error)
grpc.ClientStream
}
type diffCommitDiffClient struct {
grpc.ClientStream
}
func (x *diffCommitDiffClient) Recv() (*CommitDiffResponse, error) {
m := new(CommitDiffResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *diffClient) CommitDelta(ctx context.Context, in *CommitDeltaRequest, opts ...grpc.CallOption) (Diff_CommitDeltaClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Diff_serviceDesc.Streams[1], c.cc, "/gitaly.Diff/CommitDelta", opts...)
if err != nil {
return nil, err
}
x := &diffCommitDeltaClient{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 Diff_CommitDeltaClient interface {
Recv() (*CommitDeltaResponse, error)
grpc.ClientStream
}
type diffCommitDeltaClient struct {
grpc.ClientStream
}
func (x *diffCommitDeltaClient) Recv() (*CommitDeltaResponse, error) {
m := new(CommitDeltaResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for Diff service
type DiffServer interface {
// Returns stream of CommitDiffResponse with patches chunked over messages
CommitDiff(*CommitDiffRequest, Diff_CommitDiffServer) error
// Return a stream so we can divide the response in chunks of deltas
CommitDelta(*CommitDeltaRequest, Diff_CommitDeltaServer) error
}
func RegisterDiffServer(s *grpc.Server, srv DiffServer) {
s.RegisterService(&_Diff_serviceDesc, srv)
}
func _Diff_CommitDiff_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(CommitDiffRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DiffServer).CommitDiff(m, &diffCommitDiffServer{stream})
}
type Diff_CommitDiffServer interface {
Send(*CommitDiffResponse) error
grpc.ServerStream
}
type diffCommitDiffServer struct {
grpc.ServerStream
}
func (x *diffCommitDiffServer) Send(m *CommitDiffResponse) error {
return x.ServerStream.SendMsg(m)
}
func _Diff_CommitDelta_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(CommitDeltaRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DiffServer).CommitDelta(m, &diffCommitDeltaServer{stream})
}
type Diff_CommitDeltaServer interface {
Send(*CommitDeltaResponse) error
grpc.ServerStream
}
type diffCommitDeltaServer struct {
grpc.ServerStream
}
func (x *diffCommitDeltaServer) Send(m *CommitDeltaResponse) error {
return x.ServerStream.SendMsg(m)
}
var _Diff_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.Diff",
HandlerType: (*DiffServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "CommitDiff",
Handler: _Diff_CommitDiff_Handler,
ServerStreams: true,
},
{
StreamName: "CommitDelta",
Handler: _Diff_CommitDelta_Handler,
ServerStreams: true,
},
},
Metadata: "deprecated-services.proto",
}
// Client API for Notifications service
type NotificationsClient interface {
PostReceive(ctx context.Context, in *PostReceiveRequest, opts ...grpc.CallOption) (*PostReceiveResponse, error)
}
type notificationsClient struct {
cc *grpc.ClientConn
}
func NewNotificationsClient(cc *grpc.ClientConn) NotificationsClient {
return &notificationsClient{cc}
}
func (c *notificationsClient) PostReceive(ctx context.Context, in *PostReceiveRequest, opts ...grpc.CallOption) (*PostReceiveResponse, error) {
out := new(PostReceiveResponse)
err := grpc.Invoke(ctx, "/gitaly.Notifications/PostReceive", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Notifications service
type NotificationsServer interface {
PostReceive(context.Context, *PostReceiveRequest) (*PostReceiveResponse, error)
}
func RegisterNotificationsServer(s *grpc.Server, srv NotificationsServer) {
s.RegisterService(&_Notifications_serviceDesc, srv)
}
func _Notifications_PostReceive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PostReceiveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationsServer).PostReceive(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.Notifications/PostReceive",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationsServer).PostReceive(ctx, req.(*PostReceiveRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Notifications_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.Notifications",
HandlerType: (*NotificationsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PostReceive",
Handler: _Notifications_PostReceive_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "deprecated-services.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)
// 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 {
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
}
func (c *refClient) FindRefName(ctx context.Context, in *FindRefNameRequest, opts ...grpc.CallOption) (*FindRefNameResponse, error) {
out := new(FindRefNameResponse)
err := grpc.Invoke(ctx, "/gitaly.Ref/FindRefName", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
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 {
FindDefaultBranchName(context.Context, *FindDefaultBranchNameRequest) (*FindDefaultBranchNameResponse, error)
FindAllBranchNames(*FindAllBranchNamesRequest, Ref_FindAllBranchNamesServer) error
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) {
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)
}
func _Ref_FindRefName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindRefNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RefServer).FindRefName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gitaly.Ref/FindRefName",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RefServer).FindRefName(ctx, req.(*FindRefNameRequest))
}
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),
Methods: []grpc.MethodDesc{
{