2021-03-26 00:17:52 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package nodepb
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
// NodeServiceClient is the client API for NodeService 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 NodeServiceClient interface {
2021-08-03 06:06:26 +08:00
Login ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
CreateNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
ReadNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
UpdateNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
DeleteNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
GetPeers ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
GetExtPeers ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
CheckIn ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error )
2021-03-26 00:17:52 +08:00
}
type nodeServiceClient struct {
cc grpc . ClientConnInterface
}
func NewNodeServiceClient ( cc grpc . ClientConnInterface ) NodeServiceClient {
return & nodeServiceClient { cc }
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) Login ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
2021-03-26 00:17:52 +08:00
err := c . cc . Invoke ( ctx , "/node.NodeService/Login" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) CreateNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
2021-03-26 00:17:52 +08:00
err := c . cc . Invoke ( ctx , "/node.NodeService/CreateNode" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) ReadNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
2021-03-26 00:17:52 +08:00
err := c . cc . Invoke ( ctx , "/node.NodeService/ReadNode" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) UpdateNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
2021-03-26 00:17:52 +08:00
err := c . cc . Invoke ( ctx , "/node.NodeService/UpdateNode" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) DeleteNode ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
2021-03-26 00:17:52 +08:00
err := c . cc . Invoke ( ctx , "/node.NodeService/DeleteNode" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) GetPeers ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
err := c . cc . Invoke ( ctx , "/node.NodeService/GetPeers" , in , out , opts ... )
2021-03-26 00:17:52 +08:00
if err != nil {
return nil , err
}
2021-08-03 06:06:26 +08:00
return out , nil
2021-03-26 00:17:52 +08:00
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) GetExtPeers ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
err := c . cc . Invoke ( ctx , "/node.NodeService/GetExtPeers" , in , out , opts ... )
2021-05-20 01:59:10 +08:00
if err != nil {
return nil , err
}
2021-08-03 06:06:26 +08:00
return out , nil
2021-05-20 01:59:10 +08:00
}
2021-08-03 06:06:26 +08:00
func ( c * nodeServiceClient ) CheckIn ( ctx context . Context , in * Object , opts ... grpc . CallOption ) ( * Object , error ) {
out := new ( Object )
2021-03-26 00:17:52 +08:00
err := c . cc . Invoke ( ctx , "/node.NodeService/CheckIn" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// NodeServiceServer is the server API for NodeService service.
// All implementations must embed UnimplementedNodeServiceServer
// for forward compatibility
type NodeServiceServer interface {
2021-08-03 06:06:26 +08:00
Login ( context . Context , * Object ) ( * Object , error )
CreateNode ( context . Context , * Object ) ( * Object , error )
ReadNode ( context . Context , * Object ) ( * Object , error )
UpdateNode ( context . Context , * Object ) ( * Object , error )
DeleteNode ( context . Context , * Object ) ( * Object , error )
GetPeers ( context . Context , * Object ) ( * Object , error )
GetExtPeers ( context . Context , * Object ) ( * Object , error )
CheckIn ( context . Context , * Object ) ( * Object , error )
2021-03-26 00:17:52 +08:00
mustEmbedUnimplementedNodeServiceServer ( )
}
// UnimplementedNodeServiceServer must be embedded to have forward compatible implementations.
type UnimplementedNodeServiceServer struct {
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) Login ( context . Context , * Object ) ( * Object , error ) {
2021-03-26 00:17:52 +08:00
return nil , status . Errorf ( codes . Unimplemented , "method Login not implemented" )
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) CreateNode ( context . Context , * Object ) ( * Object , error ) {
2021-03-26 00:17:52 +08:00
return nil , status . Errorf ( codes . Unimplemented , "method CreateNode not implemented" )
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) ReadNode ( context . Context , * Object ) ( * Object , error ) {
2021-03-26 00:17:52 +08:00
return nil , status . Errorf ( codes . Unimplemented , "method ReadNode not implemented" )
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) UpdateNode ( context . Context , * Object ) ( * Object , error ) {
2021-03-26 00:17:52 +08:00
return nil , status . Errorf ( codes . Unimplemented , "method UpdateNode not implemented" )
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) DeleteNode ( context . Context , * Object ) ( * Object , error ) {
2021-03-26 00:17:52 +08:00
return nil , status . Errorf ( codes . Unimplemented , "method DeleteNode not implemented" )
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) GetPeers ( context . Context , * Object ) ( * Object , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetPeers not implemented" )
2021-03-26 00:17:52 +08:00
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) GetExtPeers ( context . Context , * Object ) ( * Object , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetExtPeers not implemented" )
2021-05-20 01:59:10 +08:00
}
2021-08-03 06:06:26 +08:00
func ( UnimplementedNodeServiceServer ) CheckIn ( context . Context , * Object ) ( * Object , error ) {
2021-03-26 00:17:52 +08:00
return nil , status . Errorf ( codes . Unimplemented , "method CheckIn not implemented" )
}
func ( UnimplementedNodeServiceServer ) mustEmbedUnimplementedNodeServiceServer ( ) { }
// UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NodeServiceServer will
// result in compilation errors.
type UnsafeNodeServiceServer interface {
mustEmbedUnimplementedNodeServiceServer ( )
}
func RegisterNodeServiceServer ( s grpc . ServiceRegistrar , srv NodeServiceServer ) {
s . RegisterService ( & NodeService_ServiceDesc , srv )
}
func _NodeService_Login_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
in := new ( Object )
2021-03-26 00:17:52 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NodeServiceServer ) . Login ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/Login" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
return srv . ( NodeServiceServer ) . Login ( ctx , req . ( * Object ) )
2021-03-26 00:17:52 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _NodeService_CreateNode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
in := new ( Object )
2021-03-26 00:17:52 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NodeServiceServer ) . CreateNode ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/CreateNode" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
return srv . ( NodeServiceServer ) . CreateNode ( ctx , req . ( * Object ) )
2021-03-26 00:17:52 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _NodeService_ReadNode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
in := new ( Object )
2021-03-26 00:17:52 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NodeServiceServer ) . ReadNode ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/ReadNode" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
return srv . ( NodeServiceServer ) . ReadNode ( ctx , req . ( * Object ) )
2021-03-26 00:17:52 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _NodeService_UpdateNode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
in := new ( Object )
2021-03-26 00:17:52 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NodeServiceServer ) . UpdateNode ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/UpdateNode" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
return srv . ( NodeServiceServer ) . UpdateNode ( ctx , req . ( * Object ) )
2021-03-26 00:17:52 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _NodeService_DeleteNode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
in := new ( Object )
2021-03-26 00:17:52 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NodeServiceServer ) . DeleteNode ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/DeleteNode" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
return srv . ( NodeServiceServer ) . DeleteNode ( ctx , req . ( * Object ) )
2021-03-26 00:17:52 +08:00
}
return interceptor ( ctx , in , info , handler )
}
2021-08-03 06:06:26 +08:00
func _NodeService_GetPeers_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( Object )
if err := dec ( in ) ; err != nil {
return nil , err
2021-03-26 00:17:52 +08:00
}
2021-08-03 06:06:26 +08:00
if interceptor == nil {
return srv . ( NodeServiceServer ) . GetPeers ( ctx , in )
2021-05-20 01:59:10 +08:00
}
2021-08-03 06:06:26 +08:00
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/GetPeers" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( NodeServiceServer ) . GetPeers ( ctx , req . ( * Object ) )
}
return interceptor ( ctx , in , info , handler )
2021-05-20 01:59:10 +08:00
}
2021-08-03 06:06:26 +08:00
func _NodeService_GetExtPeers_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( Object )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NodeServiceServer ) . GetExtPeers ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/GetExtPeers" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( NodeServiceServer ) . GetExtPeers ( ctx , req . ( * Object ) )
}
return interceptor ( ctx , in , info , handler )
2021-05-20 01:59:10 +08:00
}
2021-03-26 00:17:52 +08:00
func _NodeService_CheckIn_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
in := new ( Object )
2021-03-26 00:17:52 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( NodeServiceServer ) . CheckIn ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/node.NodeService/CheckIn" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-08-03 06:06:26 +08:00
return srv . ( NodeServiceServer ) . CheckIn ( ctx , req . ( * Object ) )
2021-03-26 00:17:52 +08:00
}
return interceptor ( ctx , in , info , handler )
}
// NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NodeService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "node.NodeService" ,
HandlerType : ( * NodeServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Login" ,
Handler : _NodeService_Login_Handler ,
} ,
{
MethodName : "CreateNode" ,
Handler : _NodeService_CreateNode_Handler ,
} ,
{
MethodName : "ReadNode" ,
Handler : _NodeService_ReadNode_Handler ,
} ,
{
MethodName : "UpdateNode" ,
Handler : _NodeService_UpdateNode_Handler ,
} ,
{
MethodName : "DeleteNode" ,
Handler : _NodeService_DeleteNode_Handler ,
} ,
{
2021-08-03 06:06:26 +08:00
MethodName : "GetPeers" ,
Handler : _NodeService_GetPeers_Handler ,
2021-03-26 00:17:52 +08:00
} ,
{
2021-08-03 06:06:26 +08:00
MethodName : "GetExtPeers" ,
Handler : _NodeService_GetExtPeers_Handler ,
2021-03-26 00:17:52 +08:00
} ,
2021-05-20 01:59:10 +08:00
{
2021-08-03 06:06:26 +08:00
MethodName : "CheckIn" ,
Handler : _NodeService_CheckIn_Handler ,
2021-05-20 01:59:10 +08:00
} ,
2021-03-26 00:17:52 +08:00
} ,
2021-08-03 06:06:26 +08:00
Streams : [ ] grpc . StreamDesc { } ,
2021-03-26 00:17:52 +08:00
Metadata : "grpc/node.proto" ,
}