mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-12 04:25:08 +08:00
353 lines
12 KiB
Go
353 lines
12 KiB
Go
// 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 {
|
|
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)
|
|
}
|
|
|
|
type nodeServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient {
|
|
return &nodeServiceClient{cc}
|
|
}
|
|
|
|
func (c *nodeServiceClient) Login(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) {
|
|
out := new(Object)
|
|
err := c.cc.Invoke(ctx, "/node.NodeService/Login", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *nodeServiceClient) CreateNode(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) {
|
|
out := new(Object)
|
|
err := c.cc.Invoke(ctx, "/node.NodeService/CreateNode", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *nodeServiceClient) ReadNode(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) {
|
|
out := new(Object)
|
|
err := c.cc.Invoke(ctx, "/node.NodeService/ReadNode", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *nodeServiceClient) UpdateNode(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) {
|
|
out := new(Object)
|
|
err := c.cc.Invoke(ctx, "/node.NodeService/UpdateNode", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *nodeServiceClient) DeleteNode(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) {
|
|
out := new(Object)
|
|
err := c.cc.Invoke(ctx, "/node.NodeService/DeleteNode", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
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...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
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...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *nodeServiceClient) CheckIn(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) {
|
|
out := new(Object)
|
|
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 {
|
|
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)
|
|
mustEmbedUnimplementedNodeServiceServer()
|
|
}
|
|
|
|
// UnimplementedNodeServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedNodeServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedNodeServiceServer) Login(context.Context, *Object) (*Object, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
|
}
|
|
func (UnimplementedNodeServiceServer) CreateNode(context.Context, *Object) (*Object, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateNode not implemented")
|
|
}
|
|
func (UnimplementedNodeServiceServer) ReadNode(context.Context, *Object) (*Object, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ReadNode not implemented")
|
|
}
|
|
func (UnimplementedNodeServiceServer) UpdateNode(context.Context, *Object) (*Object, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateNode not implemented")
|
|
}
|
|
func (UnimplementedNodeServiceServer) DeleteNode(context.Context, *Object) (*Object, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteNode not implemented")
|
|
}
|
|
func (UnimplementedNodeServiceServer) GetPeers(context.Context, *Object) (*Object, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetPeers not implemented")
|
|
}
|
|
func (UnimplementedNodeServiceServer) GetExtPeers(context.Context, *Object) (*Object, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetExtPeers not implemented")
|
|
}
|
|
func (UnimplementedNodeServiceServer) CheckIn(context.Context, *Object) (*Object, error) {
|
|
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) {
|
|
in := new(Object)
|
|
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) {
|
|
return srv.(NodeServiceServer).Login(ctx, req.(*Object))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _NodeService_CreateNode_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).CreateNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/node.NodeService/CreateNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NodeServiceServer).CreateNode(ctx, req.(*Object))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _NodeService_ReadNode_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).ReadNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/node.NodeService/ReadNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NodeServiceServer).ReadNode(ctx, req.(*Object))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _NodeService_UpdateNode_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).UpdateNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/node.NodeService/UpdateNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NodeServiceServer).UpdateNode(ctx, req.(*Object))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _NodeService_DeleteNode_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).DeleteNode(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/node.NodeService/DeleteNode",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NodeServiceServer).DeleteNode(ctx, req.(*Object))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
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
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(NodeServiceServer).GetPeers(ctx, in)
|
|
}
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
func _NodeService_CheckIn_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).CheckIn(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/node.NodeService/CheckIn",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NodeServiceServer).CheckIn(ctx, req.(*Object))
|
|
}
|
|
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,
|
|
},
|
|
{
|
|
MethodName: "GetPeers",
|
|
Handler: _NodeService_GetPeers_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetExtPeers",
|
|
Handler: _NodeService_GetExtPeers_Handler,
|
|
},
|
|
{
|
|
MethodName: "CheckIn",
|
|
Handler: _NodeService_CheckIn_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "grpc/node.proto",
|
|
}
|