2024-02-20 20:21:41 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2024-07-06 20:08:19 +00:00
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.12.4
2024-02-20 20:21:41 +00:00
// source: plug.proto
package gRPC
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
// PlugConnectorClient is the client API for PlugConnector 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 PlugConnectorClient interface {
TaskStart ( ctx context . Context , in * PlugTaskCreation , opts ... grpc . CallOption ) ( * PlugTaskStatus , error )
TaskStatus ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error )
TaskCancel ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error )
2024-03-05 20:38:46 +00:00
Ping ( ctx context . Context , in * PingRequest , opts ... grpc . CallOption ) ( * PongResponse , error )
2024-07-06 22:43:21 +00:00
SendMessage ( ctx context . Context , in * SendMessageRequest , opts ... grpc . CallOption ) ( * SendMessageResponse , error )
2024-07-09 19:49:23 +00:00
GetUserMessages ( ctx context . Context , in * GetMessagesRequest , opts ... grpc . CallOption ) ( * GetMessagesResponse , error )
2024-02-20 20:21:41 +00:00
}
type plugConnectorClient struct {
cc grpc . ClientConnInterface
}
func NewPlugConnectorClient ( cc grpc . ClientConnInterface ) PlugConnectorClient {
return & plugConnectorClient { cc }
}
func ( c * plugConnectorClient ) TaskStart ( ctx context . Context , in * PlugTaskCreation , opts ... grpc . CallOption ) ( * PlugTaskStatus , error ) {
out := new ( PlugTaskStatus )
2024-07-06 20:08:19 +00:00
err := c . cc . Invoke ( ctx , "/PlugConnector/TaskStart" , in , out , opts ... )
2024-02-20 20:21:41 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * plugConnectorClient ) TaskStatus ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error ) {
out := new ( PlugTaskStatus )
2024-07-06 20:08:19 +00:00
err := c . cc . Invoke ( ctx , "/PlugConnector/TaskStatus" , in , out , opts ... )
2024-02-20 20:21:41 +00:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * plugConnectorClient ) TaskCancel ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error ) {
out := new ( PlugTaskStatus )
2024-07-06 20:08:19 +00:00
err := c . cc . Invoke ( ctx , "/PlugConnector/TaskCancel" , in , out , opts ... )
2024-02-20 20:21:41 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-03-05 20:38:46 +00:00
func ( c * plugConnectorClient ) Ping ( ctx context . Context , in * PingRequest , opts ... grpc . CallOption ) ( * PongResponse , error ) {
out := new ( PongResponse )
2024-07-06 20:08:19 +00:00
err := c . cc . Invoke ( ctx , "/PlugConnector/Ping" , in , out , opts ... )
2024-03-05 20:38:46 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-07-06 22:43:21 +00:00
func ( c * plugConnectorClient ) SendMessage ( ctx context . Context , in * SendMessageRequest , opts ... grpc . CallOption ) ( * SendMessageResponse , error ) {
out := new ( SendMessageResponse )
err := c . cc . Invoke ( ctx , "/PlugConnector/SendMessage" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-07-09 19:49:23 +00:00
func ( c * plugConnectorClient ) GetUserMessages ( ctx context . Context , in * GetMessagesRequest , opts ... grpc . CallOption ) ( * GetMessagesResponse , error ) {
out := new ( GetMessagesResponse )
err := c . cc . Invoke ( ctx , "/PlugConnector/GetUserMessages" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-02-20 20:21:41 +00:00
// PlugConnectorServer is the server API for PlugConnector service.
// All implementations must embed UnimplementedPlugConnectorServer
// for forward compatibility
type PlugConnectorServer interface {
TaskStart ( context . Context , * PlugTaskCreation ) ( * PlugTaskStatus , error )
TaskStatus ( context . Context , * PlugTask ) ( * PlugTaskStatus , error )
TaskCancel ( context . Context , * PlugTask ) ( * PlugTaskStatus , error )
2024-03-05 20:38:46 +00:00
Ping ( context . Context , * PingRequest ) ( * PongResponse , error )
2024-07-06 22:43:21 +00:00
SendMessage ( context . Context , * SendMessageRequest ) ( * SendMessageResponse , error )
2024-07-09 19:49:23 +00:00
GetUserMessages ( context . Context , * GetMessagesRequest ) ( * GetMessagesResponse , error )
2024-02-20 20:21:41 +00:00
mustEmbedUnimplementedPlugConnectorServer ( )
}
// UnimplementedPlugConnectorServer must be embedded to have forward compatible implementations.
type UnimplementedPlugConnectorServer struct {
}
func ( UnimplementedPlugConnectorServer ) TaskStart ( context . Context , * PlugTaskCreation ) ( * PlugTaskStatus , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TaskStart not implemented" )
}
func ( UnimplementedPlugConnectorServer ) TaskStatus ( context . Context , * PlugTask ) ( * PlugTaskStatus , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TaskStatus not implemented" )
}
func ( UnimplementedPlugConnectorServer ) TaskCancel ( context . Context , * PlugTask ) ( * PlugTaskStatus , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TaskCancel not implemented" )
}
2024-03-05 20:38:46 +00:00
func ( UnimplementedPlugConnectorServer ) Ping ( context . Context , * PingRequest ) ( * PongResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Ping not implemented" )
}
2024-07-06 22:43:21 +00:00
func ( UnimplementedPlugConnectorServer ) SendMessage ( context . Context , * SendMessageRequest ) ( * SendMessageResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SendMessage not implemented" )
}
2024-07-09 19:49:23 +00:00
func ( UnimplementedPlugConnectorServer ) GetUserMessages ( context . Context , * GetMessagesRequest ) ( * GetMessagesResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetUserMessages not implemented" )
}
2024-02-20 20:21:41 +00:00
func ( UnimplementedPlugConnectorServer ) mustEmbedUnimplementedPlugConnectorServer ( ) { }
// UnsafePlugConnectorServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PlugConnectorServer will
// result in compilation errors.
type UnsafePlugConnectorServer interface {
mustEmbedUnimplementedPlugConnectorServer ( )
}
func RegisterPlugConnectorServer ( s grpc . ServiceRegistrar , srv PlugConnectorServer ) {
s . RegisterService ( & PlugConnector_ServiceDesc , srv )
}
func _PlugConnector_TaskStart_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PlugTaskCreation )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . TaskStart ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-06 20:08:19 +00:00
FullMethod : "/PlugConnector/TaskStart" ,
2024-02-20 20:21:41 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . TaskStart ( ctx , req . ( * PlugTaskCreation ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PlugConnector_TaskStatus_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PlugTask )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . TaskStatus ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-06 20:08:19 +00:00
FullMethod : "/PlugConnector/TaskStatus" ,
2024-02-20 20:21:41 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . TaskStatus ( ctx , req . ( * PlugTask ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PlugConnector_TaskCancel_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PlugTask )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . TaskCancel ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-06 20:08:19 +00:00
FullMethod : "/PlugConnector/TaskCancel" ,
2024-02-20 20:21:41 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . TaskCancel ( ctx , req . ( * PlugTask ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-03-05 20:38:46 +00:00
func _PlugConnector_Ping_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PingRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . Ping ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-06 20:08:19 +00:00
FullMethod : "/PlugConnector/Ping" ,
2024-03-05 20:38:46 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . Ping ( ctx , req . ( * PingRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-07-06 22:43:21 +00:00
func _PlugConnector_SendMessage_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SendMessageRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . SendMessage ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/PlugConnector/SendMessage" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . SendMessage ( ctx , req . ( * SendMessageRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-07-09 19:49:23 +00:00
func _PlugConnector_GetUserMessages_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetMessagesRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . GetUserMessages ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/PlugConnector/GetUserMessages" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . GetUserMessages ( ctx , req . ( * GetMessagesRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-02-20 20:21:41 +00:00
// PlugConnector_ServiceDesc is the grpc.ServiceDesc for PlugConnector service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PlugConnector_ServiceDesc = grpc . ServiceDesc {
ServiceName : "PlugConnector" ,
HandlerType : ( * PlugConnectorServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "TaskStart" ,
Handler : _PlugConnector_TaskStart_Handler ,
} ,
{
MethodName : "TaskStatus" ,
Handler : _PlugConnector_TaskStatus_Handler ,
} ,
{
MethodName : "TaskCancel" ,
Handler : _PlugConnector_TaskCancel_Handler ,
} ,
2024-03-05 20:38:46 +00:00
{
MethodName : "Ping" ,
Handler : _PlugConnector_Ping_Handler ,
} ,
2024-07-06 22:43:21 +00:00
{
MethodName : "SendMessage" ,
Handler : _PlugConnector_SendMessage_Handler ,
} ,
2024-07-09 19:49:23 +00:00
{
MethodName : "GetUserMessages" ,
Handler : _PlugConnector_GetUserMessages_Handler ,
} ,
2024-02-20 20:21:41 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "plug.proto" ,
}