2024-10-20 07:22:19 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2024-11-02 17:40:36 +00:00
// - protoc-gen-go-grpc v1.2.0
2024-10-20 07:22:19 +00:00
// - protoc v5.28.2
// source: command.proto
package proto
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.
2024-11-02 17:40:36 +00:00
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2024-10-20 07:22:19 +00:00
2024-10-21 14:07:36 +00:00
// CommandProviderClient is the client API for CommandProvider service.
2024-10-20 07:22:19 +00: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.
2024-10-21 14:07:36 +00:00
type CommandProviderClient interface {
2024-10-20 07:22:19 +00:00
AddCommand ( ctx context . Context , in * CommandInfo , opts ... grpc . CallOption ) ( * AddCommandResponse , error )
RemoveCommand ( ctx context . Context , in * CommandLookupRequest , opts ... grpc . CallOption ) ( * RemoveCommandResponse , error )
SendCommand ( ctx context . Context , in * CommandArgument , opts ... grpc . CallOption ) ( * CommandReturn , error )
2024-11-02 17:40:36 +00:00
SendStreamCommand ( ctx context . Context , opts ... grpc . CallOption ) ( CommandProvider_SendStreamCommandClient , error )
2024-10-20 07:22:19 +00:00
}
2024-10-21 14:07:36 +00:00
type commandProviderClient struct {
2024-10-20 07:22:19 +00:00
cc grpc . ClientConnInterface
}
2024-10-21 14:07:36 +00:00
func NewCommandProviderClient ( cc grpc . ClientConnInterface ) CommandProviderClient {
return & commandProviderClient { cc }
2024-10-20 07:22:19 +00:00
}
2024-10-21 14:07:36 +00:00
func ( c * commandProviderClient ) AddCommand ( ctx context . Context , in * CommandInfo , opts ... grpc . CallOption ) ( * AddCommandResponse , error ) {
2024-10-20 07:22:19 +00:00
out := new ( AddCommandResponse )
2024-11-02 17:40:36 +00:00
err := c . cc . Invoke ( ctx , "/proto.CommandProvider/AddCommand" , in , out , opts ... )
2024-10-20 07:22:19 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-10-21 14:07:36 +00:00
func ( c * commandProviderClient ) RemoveCommand ( ctx context . Context , in * CommandLookupRequest , opts ... grpc . CallOption ) ( * RemoveCommandResponse , error ) {
2024-10-20 07:22:19 +00:00
out := new ( RemoveCommandResponse )
2024-11-02 17:40:36 +00:00
err := c . cc . Invoke ( ctx , "/proto.CommandProvider/RemoveCommand" , in , out , opts ... )
2024-10-20 07:22:19 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-10-21 14:07:36 +00:00
func ( c * commandProviderClient ) SendCommand ( ctx context . Context , in * CommandArgument , opts ... grpc . CallOption ) ( * CommandReturn , error ) {
2024-10-20 07:22:19 +00:00
out := new ( CommandReturn )
2024-11-02 17:40:36 +00:00
err := c . cc . Invoke ( ctx , "/proto.CommandProvider/SendCommand" , in , out , opts ... )
2024-10-20 07:22:19 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-11-02 17:40:36 +00:00
func ( c * commandProviderClient ) SendStreamCommand ( ctx context . Context , opts ... grpc . CallOption ) ( CommandProvider_SendStreamCommandClient , error ) {
stream , err := c . cc . NewStream ( ctx , & CommandProvider_ServiceDesc . Streams [ 0 ] , "/proto.CommandProvider/SendStreamCommand" , opts ... )
2024-10-20 07:22:19 +00:00
if err != nil {
return nil , err
}
2024-11-02 17:40:36 +00:00
x := & commandProviderSendStreamCommandClient { stream }
2024-10-20 07:22:19 +00:00
return x , nil
}
2024-11-02 17:40:36 +00:00
type CommandProvider_SendStreamCommandClient interface {
Send ( * CommandArgument ) error
Recv ( ) ( * CommandReturn , error )
grpc . ClientStream
}
type commandProviderSendStreamCommandClient struct {
grpc . ClientStream
}
func ( x * commandProviderSendStreamCommandClient ) Send ( m * CommandArgument ) error {
return x . ClientStream . SendMsg ( m )
}
func ( x * commandProviderSendStreamCommandClient ) Recv ( ) ( * CommandReturn , error ) {
m := new ( CommandReturn )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2024-10-20 07:22:19 +00:00
2024-10-21 14:07:36 +00:00
// CommandProviderServer is the server API for CommandProvider service.
// All implementations must embed UnimplementedCommandProviderServer
2024-11-02 17:40:36 +00:00
// for forward compatibility
2024-10-21 14:07:36 +00:00
type CommandProviderServer interface {
2024-10-20 07:22:19 +00:00
AddCommand ( context . Context , * CommandInfo ) ( * AddCommandResponse , error )
RemoveCommand ( context . Context , * CommandLookupRequest ) ( * RemoveCommandResponse , error )
SendCommand ( context . Context , * CommandArgument ) ( * CommandReturn , error )
2024-11-02 17:40:36 +00:00
SendStreamCommand ( CommandProvider_SendStreamCommandServer ) error
2024-10-21 14:07:36 +00:00
mustEmbedUnimplementedCommandProviderServer ( )
2024-10-20 07:22:19 +00:00
}
2024-11-02 17:40:36 +00:00
// UnimplementedCommandProviderServer must be embedded to have forward compatible implementations.
type UnimplementedCommandProviderServer struct {
}
2024-10-20 07:22:19 +00:00
2024-10-21 14:07:36 +00:00
func ( UnimplementedCommandProviderServer ) AddCommand ( context . Context , * CommandInfo ) ( * AddCommandResponse , error ) {
2024-10-20 07:22:19 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method AddCommand not implemented" )
}
2024-10-21 14:07:36 +00:00
func ( UnimplementedCommandProviderServer ) RemoveCommand ( context . Context , * CommandLookupRequest ) ( * RemoveCommandResponse , error ) {
2024-10-20 07:22:19 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method RemoveCommand not implemented" )
}
2024-10-21 14:07:36 +00:00
func ( UnimplementedCommandProviderServer ) SendCommand ( context . Context , * CommandArgument ) ( * CommandReturn , error ) {
2024-10-20 07:22:19 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method SendCommand not implemented" )
}
2024-11-02 17:40:36 +00:00
func ( UnimplementedCommandProviderServer ) SendStreamCommand ( CommandProvider_SendStreamCommandServer ) error {
2024-10-20 07:22:19 +00:00
return status . Errorf ( codes . Unimplemented , "method SendStreamCommand not implemented" )
}
2024-10-21 14:07:36 +00:00
func ( UnimplementedCommandProviderServer ) mustEmbedUnimplementedCommandProviderServer ( ) { }
2024-10-20 07:22:19 +00:00
2024-10-21 14:07:36 +00:00
// UnsafeCommandProviderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CommandProviderServer will
2024-10-20 07:22:19 +00:00
// result in compilation errors.
2024-10-21 14:07:36 +00:00
type UnsafeCommandProviderServer interface {
mustEmbedUnimplementedCommandProviderServer ( )
2024-10-20 07:22:19 +00:00
}
2024-10-21 14:07:36 +00:00
func RegisterCommandProviderServer ( s grpc . ServiceRegistrar , srv CommandProviderServer ) {
s . RegisterService ( & CommandProvider_ServiceDesc , srv )
2024-10-20 07:22:19 +00:00
}
2024-10-21 14:07:36 +00:00
func _CommandProvider_AddCommand_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-10-20 07:22:19 +00:00
in := new ( CommandInfo )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv . ( CommandProviderServer ) . AddCommand ( ctx , in )
2024-10-20 07:22:19 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-11-02 17:40:36 +00:00
FullMethod : "/proto.CommandProvider/AddCommand" ,
2024-10-20 07:22:19 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-10-21 14:07:36 +00:00
return srv . ( CommandProviderServer ) . AddCommand ( ctx , req . ( * CommandInfo ) )
2024-10-20 07:22:19 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-10-21 14:07:36 +00:00
func _CommandProvider_RemoveCommand_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-10-20 07:22:19 +00:00
in := new ( CommandLookupRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv . ( CommandProviderServer ) . RemoveCommand ( ctx , in )
2024-10-20 07:22:19 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-11-02 17:40:36 +00:00
FullMethod : "/proto.CommandProvider/RemoveCommand" ,
2024-10-20 07:22:19 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-10-21 14:07:36 +00:00
return srv . ( CommandProviderServer ) . RemoveCommand ( ctx , req . ( * CommandLookupRequest ) )
2024-10-20 07:22:19 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-10-21 14:07:36 +00:00
func _CommandProvider_SendCommand_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-10-20 07:22:19 +00:00
in := new ( CommandArgument )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv . ( CommandProviderServer ) . SendCommand ( ctx , in )
2024-10-20 07:22:19 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-11-02 17:40:36 +00:00
FullMethod : "/proto.CommandProvider/SendCommand" ,
2024-10-20 07:22:19 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-10-21 14:07:36 +00:00
return srv . ( CommandProviderServer ) . SendCommand ( ctx , req . ( * CommandArgument ) )
2024-10-20 07:22:19 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-10-21 14:07:36 +00:00
func _CommandProvider_SendStreamCommand_Handler ( srv interface { } , stream grpc . ServerStream ) error {
2024-11-02 17:40:36 +00:00
return srv . ( CommandProviderServer ) . SendStreamCommand ( & commandProviderSendStreamCommandServer { stream } )
}
type CommandProvider_SendStreamCommandServer interface {
Send ( * CommandReturn ) error
Recv ( ) ( * CommandArgument , error )
grpc . ServerStream
}
type commandProviderSendStreamCommandServer struct {
grpc . ServerStream
2024-10-20 07:22:19 +00:00
}
2024-11-02 17:40:36 +00:00
func ( x * commandProviderSendStreamCommandServer ) Send ( m * CommandReturn ) error {
return x . ServerStream . SendMsg ( m )
}
func ( x * commandProviderSendStreamCommandServer ) Recv ( ) ( * CommandArgument , error ) {
m := new ( CommandArgument )
if err := x . ServerStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2024-10-20 07:22:19 +00:00
2024-10-21 14:07:36 +00:00
// CommandProvider_ServiceDesc is the grpc.ServiceDesc for CommandProvider service.
2024-10-20 07:22:19 +00:00
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
2024-10-21 14:07:36 +00:00
var CommandProvider_ServiceDesc = grpc . ServiceDesc {
ServiceName : "proto.CommandProvider" ,
HandlerType : ( * CommandProviderServer ) ( nil ) ,
2024-10-20 07:22:19 +00:00
Methods : [ ] grpc . MethodDesc {
{
MethodName : "AddCommand" ,
2024-10-21 14:07:36 +00:00
Handler : _CommandProvider_AddCommand_Handler ,
2024-10-20 07:22:19 +00:00
} ,
{
MethodName : "RemoveCommand" ,
2024-10-21 14:07:36 +00:00
Handler : _CommandProvider_RemoveCommand_Handler ,
2024-10-20 07:22:19 +00:00
} ,
{
MethodName : "SendCommand" ,
2024-10-21 14:07:36 +00:00
Handler : _CommandProvider_SendCommand_Handler ,
2024-10-20 07:22:19 +00:00
} ,
} ,
Streams : [ ] grpc . StreamDesc {
{
StreamName : "SendStreamCommand" ,
2024-10-21 14:07:36 +00:00
Handler : _CommandProvider_SendStreamCommand_Handler ,
2024-10-20 07:22:19 +00:00
ServerStreams : true ,
ClientStreams : true ,
} ,
} ,
Metadata : "command.proto" ,
}