2021-01-13 08:11:44 +03:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2021-10-28 00:36:45 +03:00
package servicepb
2021-01-13 08:11:44 +03:00
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.
2021-03-22 09:48:12 +03:00
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2021-01-13 08:11:44 +03:00
2021-10-28 00:36:45 +03:00
// LoggerServiceClient is the client API for LoggerService service.
2021-01-13 08:11:44 +03:00
//
// 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.
2021-10-28 00:36:45 +03:00
type LoggerServiceClient interface {
2021-01-13 08:11:44 +03:00
Log ( ctx context . Context , in * Message , opts ... grpc . CallOption ) ( * Empty , error )
}
2021-10-28 00:36:45 +03:00
type loggerServiceClient struct {
2021-01-13 08:11:44 +03:00
cc grpc . ClientConnInterface
}
2021-10-28 00:36:45 +03:00
func NewLoggerServiceClient ( cc grpc . ClientConnInterface ) LoggerServiceClient {
return & loggerServiceClient { cc }
2021-01-13 08:11:44 +03:00
}
2021-10-28 00:36:45 +03:00
func ( c * loggerServiceClient ) Log ( ctx context . Context , in * Message , opts ... grpc . CallOption ) ( * Empty , error ) {
2021-01-13 08:11:44 +03:00
out := new ( Empty )
2021-10-28 00:36:45 +03:00
err := c . cc . Invoke ( ctx , "/servicepb.LoggerService/Log" , in , out , opts ... )
2021-01-13 08:11:44 +03:00
if err != nil {
return nil , err
}
return out , nil
}
2021-10-28 00:36:45 +03:00
// LoggerServiceServer is the server API for LoggerService service.
// All implementations must embed UnimplementedLoggerServiceServer
2021-01-13 08:11:44 +03:00
// for forward compatibility
2021-10-28 00:36:45 +03:00
type LoggerServiceServer interface {
2021-01-13 08:11:44 +03:00
Log ( context . Context , * Message ) ( * Empty , error )
2021-10-28 00:36:45 +03:00
mustEmbedUnimplementedLoggerServiceServer ( )
2021-01-13 08:11:44 +03:00
}
2021-10-28 00:36:45 +03:00
// UnimplementedLoggerServiceServer must be embedded to have forward compatible implementations.
type UnimplementedLoggerServiceServer struct {
2021-01-13 08:11:44 +03:00
}
2021-10-28 00:36:45 +03:00
func ( UnimplementedLoggerServiceServer ) Log ( context . Context , * Message ) ( * Empty , error ) {
2021-01-13 08:11:44 +03:00
return nil , status . Errorf ( codes . Unimplemented , "method Log not implemented" )
}
2021-10-28 00:36:45 +03:00
func ( UnimplementedLoggerServiceServer ) mustEmbedUnimplementedLoggerServiceServer ( ) { }
2021-01-13 08:11:44 +03:00
2021-10-28 00:36:45 +03:00
// UnsafeLoggerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LoggerServiceServer will
2021-03-22 09:48:12 +03:00
// result in compilation errors.
2021-10-28 00:36:45 +03:00
type UnsafeLoggerServiceServer interface {
mustEmbedUnimplementedLoggerServiceServer ( )
2021-03-22 09:48:12 +03:00
}
2021-10-28 00:36:45 +03:00
func RegisterLoggerServiceServer ( s grpc . ServiceRegistrar , srv LoggerServiceServer ) {
s . RegisterService ( & LoggerService_ServiceDesc , srv )
2021-01-13 08:11:44 +03:00
}
2021-10-28 00:36:45 +03:00
func _LoggerService_Log_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-01-13 08:11:44 +03:00
in := new ( Message )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2021-10-28 00:36:45 +03:00
return srv . ( LoggerServiceServer ) . Log ( ctx , in )
2021-01-13 08:11:44 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2021-10-28 00:36:45 +03:00
FullMethod : "/servicepb.LoggerService/Log" ,
2021-01-13 08:11:44 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-10-28 00:36:45 +03:00
return srv . ( LoggerServiceServer ) . Log ( ctx , req . ( * Message ) )
2021-01-13 08:11:44 +03:00
}
return interceptor ( ctx , in , info , handler )
}
2021-10-28 00:36:45 +03:00
// LoggerService_ServiceDesc is the grpc.ServiceDesc for LoggerService service.
2021-03-22 09:48:12 +03:00
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
2021-10-28 00:36:45 +03:00
var LoggerService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "servicepb.LoggerService" ,
HandlerType : ( * LoggerServiceServer ) ( nil ) ,
2021-01-13 08:11:44 +03:00
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Log" ,
2021-10-28 00:36:45 +03:00
Handler : _LoggerService_Log_Handler ,
2021-01-13 08:11:44 +03:00
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "service.proto" ,
}