使用最新的protoc-gen-go和protoc-gen-go-grpc插件

This commit is contained in:
刘祥超
2023-08-06 23:36:50 +08:00
parent 65be70d015
commit e6af6b6575
315 changed files with 55373 additions and 51574 deletions

View File

@@ -1,17 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc-gen-go v1.31.0
// protoc v3.19.4
// source: service_node_ip_address_threshold.proto
package pb
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -25,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// 创建阈值
type CreateNodeIPAddressThresholdRequest struct {
state protoimpl.MessageState
@@ -740,275 +731,3 @@ func file_service_node_ip_address_threshold_proto_init() {
file_service_node_ip_address_threshold_proto_goTypes = nil
file_service_node_ip_address_threshold_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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
// NodeIPAddressThresholdServiceClient is the client API for NodeIPAddressThresholdService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NodeIPAddressThresholdServiceClient interface {
// 创建阈值
CreateNodeIPAddressThreshold(ctx context.Context, in *CreateNodeIPAddressThresholdRequest, opts ...grpc.CallOption) (*CreateNodeIPAddressThresholdResponse, error)
// 修改阈值
UpdateNodeIPAddressThreshold(ctx context.Context, in *UpdateNodeIPAddressThresholdRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 删除阈值
DeleteNodeIPAddressThreshold(ctx context.Context, in *DeleteNodeIPAddressThresholdRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找IP的所有阈值
FindAllEnabledNodeIPAddressThresholds(ctx context.Context, in *FindAllEnabledNodeIPAddressThresholdsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodeIPAddressThresholdsResponse, error)
// 计算IP阈值的数量
CountAllEnabledNodeIPAddressThresholds(ctx context.Context, in *CountAllEnabledNodeIPAddressThresholdsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 批量更新阈值
UpdateAllNodeIPAddressThresholds(ctx context.Context, in *UpdateAllNodeIPAddressThresholdsRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type nodeIPAddressThresholdServiceClient struct {
cc grpc.ClientConnInterface
}
func NewNodeIPAddressThresholdServiceClient(cc grpc.ClientConnInterface) NodeIPAddressThresholdServiceClient {
return &nodeIPAddressThresholdServiceClient{cc}
}
func (c *nodeIPAddressThresholdServiceClient) CreateNodeIPAddressThreshold(ctx context.Context, in *CreateNodeIPAddressThresholdRequest, opts ...grpc.CallOption) (*CreateNodeIPAddressThresholdResponse, error) {
out := new(CreateNodeIPAddressThresholdResponse)
err := c.cc.Invoke(ctx, "/pb.NodeIPAddressThresholdService/createNodeIPAddressThreshold", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeIPAddressThresholdServiceClient) UpdateNodeIPAddressThreshold(ctx context.Context, in *UpdateNodeIPAddressThresholdRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.NodeIPAddressThresholdService/updateNodeIPAddressThreshold", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeIPAddressThresholdServiceClient) DeleteNodeIPAddressThreshold(ctx context.Context, in *DeleteNodeIPAddressThresholdRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.NodeIPAddressThresholdService/deleteNodeIPAddressThreshold", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeIPAddressThresholdServiceClient) FindAllEnabledNodeIPAddressThresholds(ctx context.Context, in *FindAllEnabledNodeIPAddressThresholdsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodeIPAddressThresholdsResponse, error) {
out := new(FindAllEnabledNodeIPAddressThresholdsResponse)
err := c.cc.Invoke(ctx, "/pb.NodeIPAddressThresholdService/findAllEnabledNodeIPAddressThresholds", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeIPAddressThresholdServiceClient) CountAllEnabledNodeIPAddressThresholds(ctx context.Context, in *CountAllEnabledNodeIPAddressThresholdsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, "/pb.NodeIPAddressThresholdService/countAllEnabledNodeIPAddressThresholds", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeIPAddressThresholdServiceClient) UpdateAllNodeIPAddressThresholds(ctx context.Context, in *UpdateAllNodeIPAddressThresholdsRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.NodeIPAddressThresholdService/updateAllNodeIPAddressThresholds", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NodeIPAddressThresholdServiceServer is the server API for NodeIPAddressThresholdService service.
type NodeIPAddressThresholdServiceServer interface {
// 创建阈值
CreateNodeIPAddressThreshold(context.Context, *CreateNodeIPAddressThresholdRequest) (*CreateNodeIPAddressThresholdResponse, error)
// 修改阈值
UpdateNodeIPAddressThreshold(context.Context, *UpdateNodeIPAddressThresholdRequest) (*RPCSuccess, error)
// 删除阈值
DeleteNodeIPAddressThreshold(context.Context, *DeleteNodeIPAddressThresholdRequest) (*RPCSuccess, error)
// 查找IP的所有阈值
FindAllEnabledNodeIPAddressThresholds(context.Context, *FindAllEnabledNodeIPAddressThresholdsRequest) (*FindAllEnabledNodeIPAddressThresholdsResponse, error)
// 计算IP阈值的数量
CountAllEnabledNodeIPAddressThresholds(context.Context, *CountAllEnabledNodeIPAddressThresholdsRequest) (*RPCCountResponse, error)
// 批量更新阈值
UpdateAllNodeIPAddressThresholds(context.Context, *UpdateAllNodeIPAddressThresholdsRequest) (*RPCSuccess, error)
}
// UnimplementedNodeIPAddressThresholdServiceServer can be embedded to have forward compatible implementations.
type UnimplementedNodeIPAddressThresholdServiceServer struct {
}
func (*UnimplementedNodeIPAddressThresholdServiceServer) CreateNodeIPAddressThreshold(context.Context, *CreateNodeIPAddressThresholdRequest) (*CreateNodeIPAddressThresholdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateNodeIPAddressThreshold not implemented")
}
func (*UnimplementedNodeIPAddressThresholdServiceServer) UpdateNodeIPAddressThreshold(context.Context, *UpdateNodeIPAddressThresholdRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateNodeIPAddressThreshold not implemented")
}
func (*UnimplementedNodeIPAddressThresholdServiceServer) DeleteNodeIPAddressThreshold(context.Context, *DeleteNodeIPAddressThresholdRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteNodeIPAddressThreshold not implemented")
}
func (*UnimplementedNodeIPAddressThresholdServiceServer) FindAllEnabledNodeIPAddressThresholds(context.Context, *FindAllEnabledNodeIPAddressThresholdsRequest) (*FindAllEnabledNodeIPAddressThresholdsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledNodeIPAddressThresholds not implemented")
}
func (*UnimplementedNodeIPAddressThresholdServiceServer) CountAllEnabledNodeIPAddressThresholds(context.Context, *CountAllEnabledNodeIPAddressThresholdsRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledNodeIPAddressThresholds not implemented")
}
func (*UnimplementedNodeIPAddressThresholdServiceServer) UpdateAllNodeIPAddressThresholds(context.Context, *UpdateAllNodeIPAddressThresholdsRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAllNodeIPAddressThresholds not implemented")
}
func RegisterNodeIPAddressThresholdServiceServer(s *grpc.Server, srv NodeIPAddressThresholdServiceServer) {
s.RegisterService(&_NodeIPAddressThresholdService_serviceDesc, srv)
}
func _NodeIPAddressThresholdService_CreateNodeIPAddressThreshold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateNodeIPAddressThresholdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeIPAddressThresholdServiceServer).CreateNodeIPAddressThreshold(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeIPAddressThresholdService/CreateNodeIPAddressThreshold",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeIPAddressThresholdServiceServer).CreateNodeIPAddressThreshold(ctx, req.(*CreateNodeIPAddressThresholdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeIPAddressThresholdService_UpdateNodeIPAddressThreshold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateNodeIPAddressThresholdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeIPAddressThresholdServiceServer).UpdateNodeIPAddressThreshold(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeIPAddressThresholdService/UpdateNodeIPAddressThreshold",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeIPAddressThresholdServiceServer).UpdateNodeIPAddressThreshold(ctx, req.(*UpdateNodeIPAddressThresholdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeIPAddressThresholdService_DeleteNodeIPAddressThreshold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteNodeIPAddressThresholdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeIPAddressThresholdServiceServer).DeleteNodeIPAddressThreshold(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeIPAddressThresholdService/DeleteNodeIPAddressThreshold",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeIPAddressThresholdServiceServer).DeleteNodeIPAddressThreshold(ctx, req.(*DeleteNodeIPAddressThresholdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeIPAddressThresholdService_FindAllEnabledNodeIPAddressThresholds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllEnabledNodeIPAddressThresholdsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeIPAddressThresholdServiceServer).FindAllEnabledNodeIPAddressThresholds(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeIPAddressThresholdService/FindAllEnabledNodeIPAddressThresholds",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeIPAddressThresholdServiceServer).FindAllEnabledNodeIPAddressThresholds(ctx, req.(*FindAllEnabledNodeIPAddressThresholdsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeIPAddressThresholdService_CountAllEnabledNodeIPAddressThresholds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountAllEnabledNodeIPAddressThresholdsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeIPAddressThresholdServiceServer).CountAllEnabledNodeIPAddressThresholds(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeIPAddressThresholdService/CountAllEnabledNodeIPAddressThresholds",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeIPAddressThresholdServiceServer).CountAllEnabledNodeIPAddressThresholds(ctx, req.(*CountAllEnabledNodeIPAddressThresholdsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeIPAddressThresholdService_UpdateAllNodeIPAddressThresholds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateAllNodeIPAddressThresholdsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeIPAddressThresholdServiceServer).UpdateAllNodeIPAddressThresholds(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeIPAddressThresholdService/UpdateAllNodeIPAddressThresholds",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeIPAddressThresholdServiceServer).UpdateAllNodeIPAddressThresholds(ctx, req.(*UpdateAllNodeIPAddressThresholdsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NodeIPAddressThresholdService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.NodeIPAddressThresholdService",
HandlerType: (*NodeIPAddressThresholdServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createNodeIPAddressThreshold",
Handler: _NodeIPAddressThresholdService_CreateNodeIPAddressThreshold_Handler,
},
{
MethodName: "updateNodeIPAddressThreshold",
Handler: _NodeIPAddressThresholdService_UpdateNodeIPAddressThreshold_Handler,
},
{
MethodName: "deleteNodeIPAddressThreshold",
Handler: _NodeIPAddressThresholdService_DeleteNodeIPAddressThreshold_Handler,
},
{
MethodName: "findAllEnabledNodeIPAddressThresholds",
Handler: _NodeIPAddressThresholdService_FindAllEnabledNodeIPAddressThresholds_Handler,
},
{
MethodName: "countAllEnabledNodeIPAddressThresholds",
Handler: _NodeIPAddressThresholdService_CountAllEnabledNodeIPAddressThresholds_Handler,
},
{
MethodName: "updateAllNodeIPAddressThresholds",
Handler: _NodeIPAddressThresholdService_UpdateAllNodeIPAddressThresholds_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_node_ip_address_threshold.proto",
}