2023-12-30 19:17:19 +00:00
// 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"
2023-12-31 19:44:12 +00:00
ContributorService_Invite_FullMethodName = "/contributors.v1.ContributorService/Invite"
2023-12-30 19:17:19 +00:00
ContributorService_Update_FullMethodName = "/contributors.v1.ContributorService/Update"
2023-12-31 19:44:12 +00:00
ContributorService_Revoke_FullMethodName = "/contributors.v1.ContributorService/Revoke"
2023-12-30 19:17:19 +00:00
)
// 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 )
2023-12-31 19:44:12 +00:00
Invite ( ctx context . Context , in * InviteRequest , opts ... grpc . CallOption ) ( * InviteResponse , error )
2023-12-30 19:17:19 +00:00
Update ( ctx context . Context , in * UpdateRequest , opts ... grpc . CallOption ) ( * UpdateResponse , error )
2023-12-31 19:44:12 +00:00
Revoke ( ctx context . Context , in * RevokeRequest , opts ... grpc . CallOption ) ( * RevokeResponse , error )
2023-12-30 19:17:19 +00:00
}
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
}
2023-12-31 19:44:12 +00:00
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 ... )
2023-12-30 19:17:19 +00:00
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
}
2023-12-31 19:44:12 +00:00
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 ... )
2023-12-30 19:17:19 +00:00
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 )
2023-12-31 19:44:12 +00:00
Invite ( context . Context , * InviteRequest ) ( * InviteResponse , error )
2023-12-30 19:17:19 +00:00
Update ( context . Context , * UpdateRequest ) ( * UpdateResponse , error )
2023-12-31 19:44:12 +00:00
Revoke ( context . Context , * RevokeRequest ) ( * RevokeResponse , error )
2023-12-30 19:17:19 +00:00
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" )
}
2023-12-31 19:44:12 +00:00
func ( UnimplementedContributorServiceServer ) Invite ( context . Context , * InviteRequest ) ( * InviteResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Invite not implemented" )
2023-12-30 19:17:19 +00:00
}
func ( UnimplementedContributorServiceServer ) Update ( context . Context , * UpdateRequest ) ( * UpdateResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Update not implemented" )
}
2023-12-31 19:44:12 +00:00
func ( UnimplementedContributorServiceServer ) Revoke ( context . Context , * RevokeRequest ) ( * RevokeResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Revoke not implemented" )
2023-12-30 19:17:19 +00:00
}
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 )
}
2023-12-31 19:44:12 +00:00
func _ContributorService_Invite_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( InviteRequest )
2023-12-30 19:17:19 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2023-12-31 19:44:12 +00:00
return srv . ( ContributorServiceServer ) . Invite ( ctx , in )
2023-12-30 19:17:19 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-12-31 19:44:12 +00:00
FullMethod : ContributorService_Invite_FullMethodName ,
2023-12-30 19:17:19 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2023-12-31 19:44:12 +00:00
return srv . ( ContributorServiceServer ) . Invite ( ctx , req . ( * InviteRequest ) )
2023-12-30 19:17:19 +00:00
}
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 )
}
2023-12-31 19:44:12 +00:00
func _ContributorService_Revoke_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( RevokeRequest )
2023-12-30 19:17:19 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2023-12-31 19:44:12 +00:00
return srv . ( ContributorServiceServer ) . Revoke ( ctx , in )
2023-12-30 19:17:19 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-12-31 19:44:12 +00:00
FullMethod : ContributorService_Revoke_FullMethodName ,
2023-12-30 19:17:19 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2023-12-31 19:44:12 +00:00
return srv . ( ContributorServiceServer ) . Revoke ( ctx , req . ( * RevokeRequest ) )
2023-12-30 19:17:19 +00:00
}
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 ,
} ,
{
2023-12-31 19:44:12 +00:00
MethodName : "Invite" ,
Handler : _ContributorService_Invite_Handler ,
2023-12-30 19:17:19 +00:00
} ,
{
MethodName : "Update" ,
Handler : _ContributorService_Update_Handler ,
} ,
{
2023-12-31 19:44:12 +00:00
MethodName : "Revoke" ,
Handler : _ContributorService_Revoke_Handler ,
2023-12-30 19:17:19 +00:00
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "contributors/v1/service.proto" ,
}