2022-07-17 05:56:09 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
2022-10-29 04:45:02 +00:00
// - protoc v3.12.4
2022-07-17 05:56:09 +00:00
// source: bots.proto
package bots
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
// BotsServiceClient is the client API for BotsService 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 BotsServiceClient interface {
Get ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * BotResponse , error )
GetList ( ctx context . Context , in * IdList , opts ... grpc . CallOption ) ( * BotList , error )
Update ( ctx context . Context , in * BotRequest , opts ... grpc . CallOption ) ( * NullResponse , error )
Create ( ctx context . Context , in * BotRequest , opts ... grpc . CallOption ) ( * IdMessage , error )
Delete ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * NullResponse , error )
List ( ctx context . Context , in * ListRequest , opts ... grpc . CallOption ) ( * BotList , error )
}
type botsServiceClient struct {
cc grpc . ClientConnInterface
}
func NewBotsServiceClient ( cc grpc . ClientConnInterface ) BotsServiceClient {
return & botsServiceClient { cc }
}
func ( c * botsServiceClient ) Get ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * BotResponse , error ) {
out := new ( BotResponse )
err := c . cc . Invoke ( ctx , "/bots.BotsService/Get" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * botsServiceClient ) GetList ( ctx context . Context , in * IdList , opts ... grpc . CallOption ) ( * BotList , error ) {
out := new ( BotList )
err := c . cc . Invoke ( ctx , "/bots.BotsService/GetList" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * botsServiceClient ) Update ( ctx context . Context , in * BotRequest , opts ... grpc . CallOption ) ( * NullResponse , error ) {
out := new ( NullResponse )
err := c . cc . Invoke ( ctx , "/bots.BotsService/Update" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * botsServiceClient ) Create ( ctx context . Context , in * BotRequest , opts ... grpc . CallOption ) ( * IdMessage , error ) {
out := new ( IdMessage )
err := c . cc . Invoke ( ctx , "/bots.BotsService/Create" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * botsServiceClient ) Delete ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * NullResponse , error ) {
out := new ( NullResponse )
err := c . cc . Invoke ( ctx , "/bots.BotsService/Delete" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * botsServiceClient ) List ( ctx context . Context , in * ListRequest , opts ... grpc . CallOption ) ( * BotList , error ) {
out := new ( BotList )
err := c . cc . Invoke ( ctx , "/bots.BotsService/List" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// BotsServiceServer is the server API for BotsService service.
// All implementations must embed UnimplementedBotsServiceServer
// for forward compatibility
type BotsServiceServer interface {
Get ( context . Context , * IdMessage ) ( * BotResponse , error )
GetList ( context . Context , * IdList ) ( * BotList , error )
Update ( context . Context , * BotRequest ) ( * NullResponse , error )
Create ( context . Context , * BotRequest ) ( * IdMessage , error )
Delete ( context . Context , * IdMessage ) ( * NullResponse , error )
List ( context . Context , * ListRequest ) ( * BotList , error )
mustEmbedUnimplementedBotsServiceServer ( )
}
// UnimplementedBotsServiceServer must be embedded to have forward compatible implementations.
type UnimplementedBotsServiceServer struct {
}
func ( UnimplementedBotsServiceServer ) Get ( context . Context , * IdMessage ) ( * BotResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Get not implemented" )
}
func ( UnimplementedBotsServiceServer ) GetList ( context . Context , * IdList ) ( * BotList , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetList not implemented" )
}
func ( UnimplementedBotsServiceServer ) Update ( context . Context , * BotRequest ) ( * NullResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Update not implemented" )
}
func ( UnimplementedBotsServiceServer ) Create ( context . Context , * BotRequest ) ( * IdMessage , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Create not implemented" )
}
func ( UnimplementedBotsServiceServer ) Delete ( context . Context , * IdMessage ) ( * NullResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Delete not implemented" )
}
func ( UnimplementedBotsServiceServer ) List ( context . Context , * ListRequest ) ( * BotList , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method List not implemented" )
}
func ( UnimplementedBotsServiceServer ) mustEmbedUnimplementedBotsServiceServer ( ) { }
// UnsafeBotsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BotsServiceServer will
// result in compilation errors.
type UnsafeBotsServiceServer interface {
mustEmbedUnimplementedBotsServiceServer ( )
}
func RegisterBotsServiceServer ( s grpc . ServiceRegistrar , srv BotsServiceServer ) {
s . RegisterService ( & BotsService_ServiceDesc , srv )
}
func _BotsService_Get_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BotsServiceServer ) . Get ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/bots.BotsService/Get" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BotsServiceServer ) . Get ( ctx , req . ( * IdMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _BotsService_GetList_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdList )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BotsServiceServer ) . GetList ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/bots.BotsService/GetList" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BotsServiceServer ) . GetList ( ctx , req . ( * IdList ) )
}
return interceptor ( ctx , in , info , handler )
}
func _BotsService_Update_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( BotRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BotsServiceServer ) . Update ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/bots.BotsService/Update" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BotsServiceServer ) . Update ( ctx , req . ( * BotRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _BotsService_Create_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( BotRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BotsServiceServer ) . Create ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/bots.BotsService/Create" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BotsServiceServer ) . Create ( ctx , req . ( * BotRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _BotsService_Delete_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BotsServiceServer ) . Delete ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/bots.BotsService/Delete" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BotsServiceServer ) . Delete ( ctx , req . ( * IdMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _BotsService_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 . ( BotsServiceServer ) . List ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/bots.BotsService/List" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BotsServiceServer ) . List ( ctx , req . ( * ListRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// BotsService_ServiceDesc is the grpc.ServiceDesc for BotsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BotsService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "bots.BotsService" ,
HandlerType : ( * BotsServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Get" ,
Handler : _BotsService_Get_Handler ,
} ,
{
MethodName : "GetList" ,
Handler : _BotsService_GetList_Handler ,
} ,
{
MethodName : "Update" ,
Handler : _BotsService_Update_Handler ,
} ,
{
MethodName : "Create" ,
Handler : _BotsService_Create_Handler ,
} ,
{
MethodName : "Delete" ,
Handler : _BotsService_Delete_Handler ,
} ,
{
MethodName : "List" ,
Handler : _BotsService_List_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "bots.proto" ,
}