Skip to content
Snippets Groups Projects
gosdnCLI_grpc.pb.go 8.39 KiB
Newer Older
  • Learn to ignore specific revisions
  • // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
    
    package gosdn
    
    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.
    const _ = grpc.SupportPackageIsVersion6
    
    
    // GrpcCliClient is the client API for GrpcCli 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 GrpcCliClient interface {
    
    	// Sends a greeting
    	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
    	// Shutdown goSDN
    	Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownReply, error)
    
    	// By now solely TAPI specific calls can be issued from the grpc-cli
    	// TAPIGetEdge
    	TAPIGetEdge(ctx context.Context, in *TAPIRequest, opts ...grpc.CallOption) (*TAPIReply, error)
    	//TAPIGetEdgeNode
    	TAPIGetEdgeNode(ctx context.Context, in *TAPIRequest, opts ...grpc.CallOption) (*TAPIReply, error)
    	// TAPIGetLink
    	TAPIGetLink(ctx context.Context, in *TAPIRequest, opts ...grpc.CallOption) (*TAPIReply, error)
    
    type grpcCliClient struct {
    
    	cc grpc.ClientConnInterface
    }
    
    
    func NewGrpcCliClient(cc grpc.ClientConnInterface) GrpcCliClient {
    	return &grpcCliClient{cc}
    
    func (c *grpcCliClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
    
    	out := new(HelloReply)
    
    	err := c.cc.Invoke(ctx, "/cliInterface.GrpcCli/SayHello", in, out, opts...)
    
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    
    func (c *grpcCliClient) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownReply, error) {
    
    	out := new(ShutdownReply)
    
    	err := c.cc.Invoke(ctx, "/cliInterface.GrpcCli/Shutdown", in, out, opts...)
    
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    
    func (c *grpcCliClient) TAPIGetEdge(ctx context.Context, in *TAPIRequest, opts ...grpc.CallOption) (*TAPIReply, error) {
    	out := new(TAPIReply)
    	err := c.cc.Invoke(ctx, "/cliInterface.GrpcCli/TAPIGetEdge", in, out, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    func (c *grpcCliClient) TAPIGetEdgeNode(ctx context.Context, in *TAPIRequest, opts ...grpc.CallOption) (*TAPIReply, error) {
    	out := new(TAPIReply)
    	err := c.cc.Invoke(ctx, "/cliInterface.GrpcCli/TAPIGetEdgeNode", in, out, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    func (c *grpcCliClient) TAPIGetLink(ctx context.Context, in *TAPIRequest, opts ...grpc.CallOption) (*TAPIReply, error) {
    	out := new(TAPIReply)
    	err := c.cc.Invoke(ctx, "/cliInterface.GrpcCli/TAPIGetLink", in, out, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return out, nil
    }
    
    // GrpcCliServer is the server API for GrpcCli service.
    // All implementations must embed UnimplementedGrpcCliServer
    
    // for forward compatibility
    
    type GrpcCliServer interface {
    
    	// Sends a greeting
    	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
    	// Shutdown goSDN
    	Shutdown(context.Context, *ShutdownRequest) (*ShutdownReply, error)
    
    	// By now solely TAPI specific calls can be issued from the grpc-cli
    	// TAPIGetEdge
    	TAPIGetEdge(context.Context, *TAPIRequest) (*TAPIReply, error)
    	//TAPIGetEdgeNode
    	TAPIGetEdgeNode(context.Context, *TAPIRequest) (*TAPIReply, error)
    	// TAPIGetLink
    	TAPIGetLink(context.Context, *TAPIRequest) (*TAPIReply, error)
    	mustEmbedUnimplementedGrpcCliServer()
    
    // UnimplementedGrpcCliServer must be embedded to have forward compatible implementations.
    type UnimplementedGrpcCliServer struct {
    
    func (*UnimplementedGrpcCliServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error) {
    
    	return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")
    }
    
    func (*UnimplementedGrpcCliServer) Shutdown(context.Context, *ShutdownRequest) (*ShutdownReply, error) {
    
    	return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented")
    }
    
    func (*UnimplementedGrpcCliServer) TAPIGetEdge(context.Context, *TAPIRequest) (*TAPIReply, error) {
    	return nil, status.Errorf(codes.Unimplemented, "method TAPIGetEdge not implemented")
    }
    func (*UnimplementedGrpcCliServer) TAPIGetEdgeNode(context.Context, *TAPIRequest) (*TAPIReply, error) {
    	return nil, status.Errorf(codes.Unimplemented, "method TAPIGetEdgeNode not implemented")
    }
    func (*UnimplementedGrpcCliServer) TAPIGetLink(context.Context, *TAPIRequest) (*TAPIReply, error) {
    	return nil, status.Errorf(codes.Unimplemented, "method TAPIGetLink not implemented")
    }
    func (*UnimplementedGrpcCliServer) mustEmbedUnimplementedGrpcCliServer() {}
    
    func RegisterGrpcCliServer(s *grpc.Server, srv GrpcCliServer) {
    	s.RegisterService(&_GrpcCli_serviceDesc, srv)
    
    func _GrpcCli_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    
    	in := new(HelloRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    
    		return srv.(GrpcCliServer).SayHello(ctx, in)
    
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    
    		FullMethod: "/cliInterface.GrpcCli/SayHello",
    
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    
    		return srv.(GrpcCliServer).SayHello(ctx, req.(*HelloRequest))
    
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    
    func _GrpcCli_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    
    	in := new(ShutdownRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    
    		return srv.(GrpcCliServer).Shutdown(ctx, in)
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    		FullMethod: "/cliInterface.GrpcCli/Shutdown",
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    		return srv.(GrpcCliServer).Shutdown(ctx, req.(*ShutdownRequest))
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    func _GrpcCli_TAPIGetEdge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    	in := new(TAPIRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    		return srv.(GrpcCliServer).TAPIGetEdge(ctx, in)
    
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    
    		FullMethod: "/cliInterface.GrpcCli/TAPIGetEdge",
    
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    
    		return srv.(GrpcCliServer).TAPIGetEdge(ctx, req.(*TAPIRequest))
    
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    
    func _GrpcCli_TAPIGetEdgeNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    	in := new(TAPIRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    		return srv.(GrpcCliServer).TAPIGetEdgeNode(ctx, in)
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    		FullMethod: "/cliInterface.GrpcCli/TAPIGetEdgeNode",
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    		return srv.(GrpcCliServer).TAPIGetEdgeNode(ctx, req.(*TAPIRequest))
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    func _GrpcCli_TAPIGetLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    	in := new(TAPIRequest)
    	if err := dec(in); err != nil {
    		return nil, err
    	}
    	if interceptor == nil {
    		return srv.(GrpcCliServer).TAPIGetLink(ctx, in)
    	}
    	info := &grpc.UnaryServerInfo{
    		Server:     srv,
    		FullMethod: "/cliInterface.GrpcCli/TAPIGetLink",
    	}
    	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    		return srv.(GrpcCliServer).TAPIGetLink(ctx, req.(*TAPIRequest))
    	}
    	return interceptor(ctx, in, info, handler)
    }
    
    var _GrpcCli_serviceDesc = grpc.ServiceDesc{
    	ServiceName: "cliInterface.GrpcCli",
    	HandlerType: (*GrpcCliServer)(nil),
    
    	Methods: []grpc.MethodDesc{
    		{
    			MethodName: "SayHello",
    
    			Handler:    _GrpcCli_SayHello_Handler,
    
    		},
    		{
    			MethodName: "Shutdown",
    
    			Handler:    _GrpcCli_Shutdown_Handler,
    		},
    		{
    			MethodName: "TAPIGetEdge",
    			Handler:    _GrpcCli_TAPIGetEdge_Handler,
    		},
    		{
    			MethodName: "TAPIGetEdgeNode",
    			Handler:    _GrpcCli_TAPIGetEdgeNode_Handler,
    		},
    		{
    			MethodName: "TAPIGetLink",
    			Handler:    _GrpcCli_TAPIGetLink_Handler,
    
    		},
    	},
    	Streams:  []grpc.StreamDesc{},
    	Metadata: "cliInterface/gosdnCLI.proto",
    }