使用最新的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_ns_domain_group.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 CreateNSDomainGroupRequest struct {
state protoimpl.MessageState
@@ -889,313 +880,3 @@ func file_service_ns_domain_group_proto_init() {
file_service_ns_domain_group_proto_goTypes = nil
file_service_ns_domain_group_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
// NSDomainGroupServiceClient is the client API for NSDomainGroupService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NSDomainGroupServiceClient interface {
// 创建分组
CreateNSDomainGroup(ctx context.Context, in *CreateNSDomainGroupRequest, opts ...grpc.CallOption) (*CreateNSDomainGroupResponse, error)
// 修改分组
UpdateNSDomainGroup(ctx context.Context, in *UpdateNSDomainGroupRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 删除分组
DeleteNSDomainGroup(ctx context.Context, in *DeleteNSDomainGroupRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查询所有分组
FindAllNSDomainGroups(ctx context.Context, in *FindAllNSDomainGroupsRequest, opts ...grpc.CallOption) (*FindAllNSDomainGroupsResponse, error)
// 查询可用分组数量
CountAllAvailableNSDomainGroups(ctx context.Context, in *CountAllAvailableNSDomainGroupsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 查询所有启用分组
FindAllAvailableNSDomainGroups(ctx context.Context, in *FindAllAvailableNSDomainGroupsRequest, opts ...grpc.CallOption) (*FindAllAvailableNSDomainGroupsResponse, error)
// 查找单个分组
FindNSDomainGroup(ctx context.Context, in *FindNSDomainGroupRequest, opts ...grpc.CallOption) (*FindNSDomainGroupResponse, error)
}
type nSDomainGroupServiceClient struct {
cc grpc.ClientConnInterface
}
func NewNSDomainGroupServiceClient(cc grpc.ClientConnInterface) NSDomainGroupServiceClient {
return &nSDomainGroupServiceClient{cc}
}
func (c *nSDomainGroupServiceClient) CreateNSDomainGroup(ctx context.Context, in *CreateNSDomainGroupRequest, opts ...grpc.CallOption) (*CreateNSDomainGroupResponse, error) {
out := new(CreateNSDomainGroupResponse)
err := c.cc.Invoke(ctx, "/pb.NSDomainGroupService/createNSDomainGroup", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSDomainGroupServiceClient) UpdateNSDomainGroup(ctx context.Context, in *UpdateNSDomainGroupRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.NSDomainGroupService/updateNSDomainGroup", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSDomainGroupServiceClient) DeleteNSDomainGroup(ctx context.Context, in *DeleteNSDomainGroupRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.NSDomainGroupService/deleteNSDomainGroup", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSDomainGroupServiceClient) FindAllNSDomainGroups(ctx context.Context, in *FindAllNSDomainGroupsRequest, opts ...grpc.CallOption) (*FindAllNSDomainGroupsResponse, error) {
out := new(FindAllNSDomainGroupsResponse)
err := c.cc.Invoke(ctx, "/pb.NSDomainGroupService/findAllNSDomainGroups", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSDomainGroupServiceClient) CountAllAvailableNSDomainGroups(ctx context.Context, in *CountAllAvailableNSDomainGroupsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, "/pb.NSDomainGroupService/countAllAvailableNSDomainGroups", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSDomainGroupServiceClient) FindAllAvailableNSDomainGroups(ctx context.Context, in *FindAllAvailableNSDomainGroupsRequest, opts ...grpc.CallOption) (*FindAllAvailableNSDomainGroupsResponse, error) {
out := new(FindAllAvailableNSDomainGroupsResponse)
err := c.cc.Invoke(ctx, "/pb.NSDomainGroupService/findAllAvailableNSDomainGroups", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSDomainGroupServiceClient) FindNSDomainGroup(ctx context.Context, in *FindNSDomainGroupRequest, opts ...grpc.CallOption) (*FindNSDomainGroupResponse, error) {
out := new(FindNSDomainGroupResponse)
err := c.cc.Invoke(ctx, "/pb.NSDomainGroupService/findNSDomainGroup", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NSDomainGroupServiceServer is the server API for NSDomainGroupService service.
type NSDomainGroupServiceServer interface {
// 创建分组
CreateNSDomainGroup(context.Context, *CreateNSDomainGroupRequest) (*CreateNSDomainGroupResponse, error)
// 修改分组
UpdateNSDomainGroup(context.Context, *UpdateNSDomainGroupRequest) (*RPCSuccess, error)
// 删除分组
DeleteNSDomainGroup(context.Context, *DeleteNSDomainGroupRequest) (*RPCSuccess, error)
// 查询所有分组
FindAllNSDomainGroups(context.Context, *FindAllNSDomainGroupsRequest) (*FindAllNSDomainGroupsResponse, error)
// 查询可用分组数量
CountAllAvailableNSDomainGroups(context.Context, *CountAllAvailableNSDomainGroupsRequest) (*RPCCountResponse, error)
// 查询所有启用分组
FindAllAvailableNSDomainGroups(context.Context, *FindAllAvailableNSDomainGroupsRequest) (*FindAllAvailableNSDomainGroupsResponse, error)
// 查找单个分组
FindNSDomainGroup(context.Context, *FindNSDomainGroupRequest) (*FindNSDomainGroupResponse, error)
}
// UnimplementedNSDomainGroupServiceServer can be embedded to have forward compatible implementations.
type UnimplementedNSDomainGroupServiceServer struct {
}
func (*UnimplementedNSDomainGroupServiceServer) CreateNSDomainGroup(context.Context, *CreateNSDomainGroupRequest) (*CreateNSDomainGroupResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateNSDomainGroup not implemented")
}
func (*UnimplementedNSDomainGroupServiceServer) UpdateNSDomainGroup(context.Context, *UpdateNSDomainGroupRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateNSDomainGroup not implemented")
}
func (*UnimplementedNSDomainGroupServiceServer) DeleteNSDomainGroup(context.Context, *DeleteNSDomainGroupRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteNSDomainGroup not implemented")
}
func (*UnimplementedNSDomainGroupServiceServer) FindAllNSDomainGroups(context.Context, *FindAllNSDomainGroupsRequest) (*FindAllNSDomainGroupsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllNSDomainGroups not implemented")
}
func (*UnimplementedNSDomainGroupServiceServer) CountAllAvailableNSDomainGroups(context.Context, *CountAllAvailableNSDomainGroupsRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountAllAvailableNSDomainGroups not implemented")
}
func (*UnimplementedNSDomainGroupServiceServer) FindAllAvailableNSDomainGroups(context.Context, *FindAllAvailableNSDomainGroupsRequest) (*FindAllAvailableNSDomainGroupsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllAvailableNSDomainGroups not implemented")
}
func (*UnimplementedNSDomainGroupServiceServer) FindNSDomainGroup(context.Context, *FindNSDomainGroupRequest) (*FindNSDomainGroupResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindNSDomainGroup not implemented")
}
func RegisterNSDomainGroupServiceServer(s *grpc.Server, srv NSDomainGroupServiceServer) {
s.RegisterService(&_NSDomainGroupService_serviceDesc, srv)
}
func _NSDomainGroupService_CreateNSDomainGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateNSDomainGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainGroupServiceServer).CreateNSDomainGroup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainGroupService/CreateNSDomainGroup",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainGroupServiceServer).CreateNSDomainGroup(ctx, req.(*CreateNSDomainGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSDomainGroupService_UpdateNSDomainGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateNSDomainGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainGroupServiceServer).UpdateNSDomainGroup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainGroupService/UpdateNSDomainGroup",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainGroupServiceServer).UpdateNSDomainGroup(ctx, req.(*UpdateNSDomainGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSDomainGroupService_DeleteNSDomainGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteNSDomainGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainGroupServiceServer).DeleteNSDomainGroup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainGroupService/DeleteNSDomainGroup",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainGroupServiceServer).DeleteNSDomainGroup(ctx, req.(*DeleteNSDomainGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSDomainGroupService_FindAllNSDomainGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllNSDomainGroupsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainGroupServiceServer).FindAllNSDomainGroups(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainGroupService/FindAllNSDomainGroups",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainGroupServiceServer).FindAllNSDomainGroups(ctx, req.(*FindAllNSDomainGroupsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSDomainGroupService_CountAllAvailableNSDomainGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountAllAvailableNSDomainGroupsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainGroupServiceServer).CountAllAvailableNSDomainGroups(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainGroupService/CountAllAvailableNSDomainGroups",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainGroupServiceServer).CountAllAvailableNSDomainGroups(ctx, req.(*CountAllAvailableNSDomainGroupsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSDomainGroupService_FindAllAvailableNSDomainGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllAvailableNSDomainGroupsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainGroupServiceServer).FindAllAvailableNSDomainGroups(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainGroupService/FindAllAvailableNSDomainGroups",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainGroupServiceServer).FindAllAvailableNSDomainGroups(ctx, req.(*FindAllAvailableNSDomainGroupsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSDomainGroupService_FindNSDomainGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindNSDomainGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainGroupServiceServer).FindNSDomainGroup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainGroupService/FindNSDomainGroup",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainGroupServiceServer).FindNSDomainGroup(ctx, req.(*FindNSDomainGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NSDomainGroupService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.NSDomainGroupService",
HandlerType: (*NSDomainGroupServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createNSDomainGroup",
Handler: _NSDomainGroupService_CreateNSDomainGroup_Handler,
},
{
MethodName: "updateNSDomainGroup",
Handler: _NSDomainGroupService_UpdateNSDomainGroup_Handler,
},
{
MethodName: "deleteNSDomainGroup",
Handler: _NSDomainGroupService_DeleteNSDomainGroup_Handler,
},
{
MethodName: "findAllNSDomainGroups",
Handler: _NSDomainGroupService_FindAllNSDomainGroups_Handler,
},
{
MethodName: "countAllAvailableNSDomainGroups",
Handler: _NSDomainGroupService_CountAllAvailableNSDomainGroups_Handler,
},
{
MethodName: "findAllAvailableNSDomainGroups",
Handler: _NSDomainGroupService_FindAllAvailableNSDomainGroups_Handler,
},
{
MethodName: "findNSDomainGroup",
Handler: _NSDomainGroupService_FindNSDomainGroup_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_ns_domain_group.proto",
}