mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-11 02:40:25 +08:00
使用最新的protoc-gen-go和protoc-gen-go-grpc插件
This commit is contained in:
@@ -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_ns_plan.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
|
||||
|
||||
// 创建DNS套餐
|
||||
type CreateNSPlanRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -904,313 +895,3 @@ func file_service_ns_plan_proto_init() {
|
||||
file_service_ns_plan_proto_goTypes = nil
|
||||
file_service_ns_plan_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
|
||||
|
||||
// NSPlanServiceClient is the client API for NSPlanService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type NSPlanServiceClient interface {
|
||||
// 创建DNS套餐
|
||||
CreateNSPlan(ctx context.Context, in *CreateNSPlanRequest, opts ...grpc.CallOption) (*CreateNSPlanResponse, error)
|
||||
// 修改DNS套餐
|
||||
UpdateNSPlan(ctx context.Context, in *UpdateNSPlanRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 修改DNS套餐顺序
|
||||
SortNSPlanOrders(ctx context.Context, in *SortNSPlansRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 查找所有DNS套餐
|
||||
FindAllNSPlans(ctx context.Context, in *FindAllNSPlansRequest, opts ...grpc.CallOption) (*FindAllNSPlansResponse, error)
|
||||
// 查找所有可用DNS套餐
|
||||
FindAllEnabledNSPlans(ctx context.Context, in *FindAllEnabledNSPlansRequest, opts ...grpc.CallOption) (*FindAllEnabledNSPlansResponse, error)
|
||||
// 查找DNS套餐
|
||||
FindNSPlan(ctx context.Context, in *FindNSPlanRequest, opts ...grpc.CallOption) (*FindNSPlanResponse, error)
|
||||
// 删除DNS套餐
|
||||
DeleteNSPlan(ctx context.Context, in *DeleteNSPlanRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
type nSPlanServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewNSPlanServiceClient(cc grpc.ClientConnInterface) NSPlanServiceClient {
|
||||
return &nSPlanServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *nSPlanServiceClient) CreateNSPlan(ctx context.Context, in *CreateNSPlanRequest, opts ...grpc.CallOption) (*CreateNSPlanResponse, error) {
|
||||
out := new(CreateNSPlanResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSPlanService/createNSPlan", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSPlanServiceClient) UpdateNSPlan(ctx context.Context, in *UpdateNSPlanRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSPlanService/updateNSPlan", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSPlanServiceClient) SortNSPlanOrders(ctx context.Context, in *SortNSPlansRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSPlanService/sortNSPlanOrders", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSPlanServiceClient) FindAllNSPlans(ctx context.Context, in *FindAllNSPlansRequest, opts ...grpc.CallOption) (*FindAllNSPlansResponse, error) {
|
||||
out := new(FindAllNSPlansResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSPlanService/findAllNSPlans", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSPlanServiceClient) FindAllEnabledNSPlans(ctx context.Context, in *FindAllEnabledNSPlansRequest, opts ...grpc.CallOption) (*FindAllEnabledNSPlansResponse, error) {
|
||||
out := new(FindAllEnabledNSPlansResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSPlanService/findAllEnabledNSPlans", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSPlanServiceClient) FindNSPlan(ctx context.Context, in *FindNSPlanRequest, opts ...grpc.CallOption) (*FindNSPlanResponse, error) {
|
||||
out := new(FindNSPlanResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSPlanService/findNSPlan", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSPlanServiceClient) DeleteNSPlan(ctx context.Context, in *DeleteNSPlanRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSPlanService/deleteNSPlan", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NSPlanServiceServer is the server API for NSPlanService service.
|
||||
type NSPlanServiceServer interface {
|
||||
// 创建DNS套餐
|
||||
CreateNSPlan(context.Context, *CreateNSPlanRequest) (*CreateNSPlanResponse, error)
|
||||
// 修改DNS套餐
|
||||
UpdateNSPlan(context.Context, *UpdateNSPlanRequest) (*RPCSuccess, error)
|
||||
// 修改DNS套餐顺序
|
||||
SortNSPlanOrders(context.Context, *SortNSPlansRequest) (*RPCSuccess, error)
|
||||
// 查找所有DNS套餐
|
||||
FindAllNSPlans(context.Context, *FindAllNSPlansRequest) (*FindAllNSPlansResponse, error)
|
||||
// 查找所有可用DNS套餐
|
||||
FindAllEnabledNSPlans(context.Context, *FindAllEnabledNSPlansRequest) (*FindAllEnabledNSPlansResponse, error)
|
||||
// 查找DNS套餐
|
||||
FindNSPlan(context.Context, *FindNSPlanRequest) (*FindNSPlanResponse, error)
|
||||
// 删除DNS套餐
|
||||
DeleteNSPlan(context.Context, *DeleteNSPlanRequest) (*RPCSuccess, error)
|
||||
}
|
||||
|
||||
// UnimplementedNSPlanServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedNSPlanServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedNSPlanServiceServer) CreateNSPlan(context.Context, *CreateNSPlanRequest) (*CreateNSPlanResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateNSPlan not implemented")
|
||||
}
|
||||
func (*UnimplementedNSPlanServiceServer) UpdateNSPlan(context.Context, *UpdateNSPlanRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateNSPlan not implemented")
|
||||
}
|
||||
func (*UnimplementedNSPlanServiceServer) SortNSPlanOrders(context.Context, *SortNSPlansRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SortNSPlanOrders not implemented")
|
||||
}
|
||||
func (*UnimplementedNSPlanServiceServer) FindAllNSPlans(context.Context, *FindAllNSPlansRequest) (*FindAllNSPlansResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllNSPlans not implemented")
|
||||
}
|
||||
func (*UnimplementedNSPlanServiceServer) FindAllEnabledNSPlans(context.Context, *FindAllEnabledNSPlansRequest) (*FindAllEnabledNSPlansResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledNSPlans not implemented")
|
||||
}
|
||||
func (*UnimplementedNSPlanServiceServer) FindNSPlan(context.Context, *FindNSPlanRequest) (*FindNSPlanResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindNSPlan not implemented")
|
||||
}
|
||||
func (*UnimplementedNSPlanServiceServer) DeleteNSPlan(context.Context, *DeleteNSPlanRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteNSPlan not implemented")
|
||||
}
|
||||
|
||||
func RegisterNSPlanServiceServer(s *grpc.Server, srv NSPlanServiceServer) {
|
||||
s.RegisterService(&_NSPlanService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _NSPlanService_CreateNSPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateNSPlanRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSPlanServiceServer).CreateNSPlan(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSPlanService/CreateNSPlan",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSPlanServiceServer).CreateNSPlan(ctx, req.(*CreateNSPlanRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSPlanService_UpdateNSPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateNSPlanRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSPlanServiceServer).UpdateNSPlan(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSPlanService/UpdateNSPlan",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSPlanServiceServer).UpdateNSPlan(ctx, req.(*UpdateNSPlanRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSPlanService_SortNSPlanOrders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SortNSPlansRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSPlanServiceServer).SortNSPlanOrders(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSPlanService/SortNSPlanOrders",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSPlanServiceServer).SortNSPlanOrders(ctx, req.(*SortNSPlansRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSPlanService_FindAllNSPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAllNSPlansRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSPlanServiceServer).FindAllNSPlans(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSPlanService/FindAllNSPlans",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSPlanServiceServer).FindAllNSPlans(ctx, req.(*FindAllNSPlansRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSPlanService_FindAllEnabledNSPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAllEnabledNSPlansRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSPlanServiceServer).FindAllEnabledNSPlans(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSPlanService/FindAllEnabledNSPlans",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSPlanServiceServer).FindAllEnabledNSPlans(ctx, req.(*FindAllEnabledNSPlansRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSPlanService_FindNSPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindNSPlanRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSPlanServiceServer).FindNSPlan(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSPlanService/FindNSPlan",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSPlanServiceServer).FindNSPlan(ctx, req.(*FindNSPlanRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSPlanService_DeleteNSPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteNSPlanRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSPlanServiceServer).DeleteNSPlan(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSPlanService/DeleteNSPlan",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSPlanServiceServer).DeleteNSPlan(ctx, req.(*DeleteNSPlanRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _NSPlanService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.NSPlanService",
|
||||
HandlerType: (*NSPlanServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "createNSPlan",
|
||||
Handler: _NSPlanService_CreateNSPlan_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateNSPlan",
|
||||
Handler: _NSPlanService_UpdateNSPlan_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "sortNSPlanOrders",
|
||||
Handler: _NSPlanService_SortNSPlanOrders_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findAllNSPlans",
|
||||
Handler: _NSPlanService_FindAllNSPlans_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findAllEnabledNSPlans",
|
||||
Handler: _NSPlanService_FindAllEnabledNSPlans_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findNSPlan",
|
||||
Handler: _NSPlanService_FindNSPlan_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "deleteNSPlan",
|
||||
Handler: _NSPlanService_DeleteNSPlan_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_ns_plan.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user