// Copyright (C) 2023 The Licensing Authors // SPDX-License-Identifier: MIT // // This file attempts to follow common styles and design patterns described by // Google Cloud based on their extensive use of protocol buffers. // // - See here for more: https://cloud.google.com/apis/design/design_patterns // // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: contributors/v1/service.proto package contributorsv1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( ContributorService_List_FullMethodName = "/contributors.v1.ContributorService/List" ContributorService_Invite_FullMethodName = "/contributors.v1.ContributorService/Invite" ContributorService_Update_FullMethodName = "/contributors.v1.ContributorService/Update" ContributorService_Revoke_FullMethodName = "/contributors.v1.ContributorService/Revoke" ) // ContributorServiceClient is the client API for ContributorService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ContributorServiceClient interface { List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Invite(ctx context.Context, in *InviteRequest, opts ...grpc.CallOption) (*InviteResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) } type contributorServiceClient struct { cc grpc.ClientConnInterface } func NewContributorServiceClient(cc grpc.ClientConnInterface) ContributorServiceClient { return &contributorServiceClient{cc} } func (c *contributorServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { out := new(ListResponse) err := c.cc.Invoke(ctx, ContributorService_List_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *contributorServiceClient) Invite(ctx context.Context, in *InviteRequest, opts ...grpc.CallOption) (*InviteResponse, error) { out := new(InviteResponse) err := c.cc.Invoke(ctx, ContributorService_Invite_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *contributorServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { out := new(UpdateResponse) err := c.cc.Invoke(ctx, ContributorService_Update_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *contributorServiceClient) Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*RevokeResponse, error) { out := new(RevokeResponse) err := c.cc.Invoke(ctx, ContributorService_Revoke_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ContributorServiceServer is the server API for ContributorService service. // All implementations must embed UnimplementedContributorServiceServer // for forward compatibility type ContributorServiceServer interface { List(context.Context, *ListRequest) (*ListResponse, error) Invite(context.Context, *InviteRequest) (*InviteResponse, error) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) mustEmbedUnimplementedContributorServiceServer() } // UnimplementedContributorServiceServer must be embedded to have forward compatible implementations. type UnimplementedContributorServiceServer struct { } func (UnimplementedContributorServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } func (UnimplementedContributorServiceServer) Invite(context.Context, *InviteRequest) (*InviteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Invite not implemented") } func (UnimplementedContributorServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } func (UnimplementedContributorServiceServer) Revoke(context.Context, *RevokeRequest) (*RevokeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } func (UnimplementedContributorServiceServer) mustEmbedUnimplementedContributorServiceServer() {} // UnsafeContributorServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ContributorServiceServer will // result in compilation errors. type UnsafeContributorServiceServer interface { mustEmbedUnimplementedContributorServiceServer() } func RegisterContributorServiceServer(s grpc.ServiceRegistrar, srv ContributorServiceServer) { s.RegisterService(&ContributorService_ServiceDesc, srv) } func _ContributorService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContributorServiceServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ContributorService_List_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContributorServiceServer).List(ctx, req.(*ListRequest)) } return interceptor(ctx, in, info, handler) } func _ContributorService_Invite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InviteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContributorServiceServer).Invite(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ContributorService_Invite_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContributorServiceServer).Invite(ctx, req.(*InviteRequest)) } return interceptor(ctx, in, info, handler) } func _ContributorService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContributorServiceServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ContributorService_Update_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContributorServiceServer).Update(ctx, req.(*UpdateRequest)) } return interceptor(ctx, in, info, handler) } func _ContributorService_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RevokeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContributorServiceServer).Revoke(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ContributorService_Revoke_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContributorServiceServer).Revoke(ctx, req.(*RevokeRequest)) } return interceptor(ctx, in, info, handler) } // ContributorService_ServiceDesc is the grpc.ServiceDesc for ContributorService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ContributorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contributors.v1.ContributorService", HandlerType: (*ContributorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _ContributorService_List_Handler, }, { MethodName: "Invite", Handler: _ContributorService_Invite_Handler, }, { MethodName: "Update", Handler: _ContributorService_Update_Handler, }, { MethodName: "Revoke", Handler: _ContributorService_Revoke_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "contributors/v1/service.proto", }