mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-13 12:10:32 +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_key.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 CreateNSKeyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -988,313 +979,3 @@ func file_service_ns_key_proto_init() {
|
||||
file_service_ns_key_proto_goTypes = nil
|
||||
file_service_ns_key_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
|
||||
|
||||
// NSKeyServiceClient is the client API for NSKeyService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type NSKeyServiceClient interface {
|
||||
// 创建密钥
|
||||
CreateNSKey(ctx context.Context, in *CreateNSKeyRequest, opts ...grpc.CallOption) (*CreateNSKeyResponse, error)
|
||||
// 修改密钥
|
||||
UpdateNSKey(ctx context.Context, in *UpdateNSKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 删除密钥
|
||||
DeleteNSKey(ctx context.Context, in *DeleteNSKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 查找单个密钥
|
||||
FindNSKey(ctx context.Context, in *FindNSKeyRequest, opts ...grpc.CallOption) (*FindNSKeyResponse, error)
|
||||
// 计算密钥数量
|
||||
CountAllNSKeys(ctx context.Context, in *CountAllNSKeysRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
|
||||
// 列出单页密钥
|
||||
ListNSKeys(ctx context.Context, in *ListNSKeysRequest, opts ...grpc.CallOption) (*ListNSKeysResponse, error)
|
||||
// 根据版本列出一组密钥
|
||||
ListNSKeysAfterVersion(ctx context.Context, in *ListNSKeysAfterVersionRequest, opts ...grpc.CallOption) (*ListNSKeysAfterVersionResponse, error)
|
||||
}
|
||||
|
||||
type nSKeyServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewNSKeyServiceClient(cc grpc.ClientConnInterface) NSKeyServiceClient {
|
||||
return &nSKeyServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *nSKeyServiceClient) CreateNSKey(ctx context.Context, in *CreateNSKeyRequest, opts ...grpc.CallOption) (*CreateNSKeyResponse, error) {
|
||||
out := new(CreateNSKeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSKeyService/createNSKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSKeyServiceClient) UpdateNSKey(ctx context.Context, in *UpdateNSKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSKeyService/updateNSKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSKeyServiceClient) DeleteNSKey(ctx context.Context, in *DeleteNSKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSKeyService/deleteNSKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSKeyServiceClient) FindNSKey(ctx context.Context, in *FindNSKeyRequest, opts ...grpc.CallOption) (*FindNSKeyResponse, error) {
|
||||
out := new(FindNSKeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSKeyService/findNSKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSKeyServiceClient) CountAllNSKeys(ctx context.Context, in *CountAllNSKeysRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
|
||||
out := new(RPCCountResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSKeyService/countAllNSKeys", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSKeyServiceClient) ListNSKeys(ctx context.Context, in *ListNSKeysRequest, opts ...grpc.CallOption) (*ListNSKeysResponse, error) {
|
||||
out := new(ListNSKeysResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSKeyService/listNSKeys", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nSKeyServiceClient) ListNSKeysAfterVersion(ctx context.Context, in *ListNSKeysAfterVersionRequest, opts ...grpc.CallOption) (*ListNSKeysAfterVersionResponse, error) {
|
||||
out := new(ListNSKeysAfterVersionResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NSKeyService/listNSKeysAfterVersion", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NSKeyServiceServer is the server API for NSKeyService service.
|
||||
type NSKeyServiceServer interface {
|
||||
// 创建密钥
|
||||
CreateNSKey(context.Context, *CreateNSKeyRequest) (*CreateNSKeyResponse, error)
|
||||
// 修改密钥
|
||||
UpdateNSKey(context.Context, *UpdateNSKeyRequest) (*RPCSuccess, error)
|
||||
// 删除密钥
|
||||
DeleteNSKey(context.Context, *DeleteNSKeyRequest) (*RPCSuccess, error)
|
||||
// 查找单个密钥
|
||||
FindNSKey(context.Context, *FindNSKeyRequest) (*FindNSKeyResponse, error)
|
||||
// 计算密钥数量
|
||||
CountAllNSKeys(context.Context, *CountAllNSKeysRequest) (*RPCCountResponse, error)
|
||||
// 列出单页密钥
|
||||
ListNSKeys(context.Context, *ListNSKeysRequest) (*ListNSKeysResponse, error)
|
||||
// 根据版本列出一组密钥
|
||||
ListNSKeysAfterVersion(context.Context, *ListNSKeysAfterVersionRequest) (*ListNSKeysAfterVersionResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedNSKeyServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedNSKeyServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedNSKeyServiceServer) CreateNSKey(context.Context, *CreateNSKeyRequest) (*CreateNSKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateNSKey not implemented")
|
||||
}
|
||||
func (*UnimplementedNSKeyServiceServer) UpdateNSKey(context.Context, *UpdateNSKeyRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateNSKey not implemented")
|
||||
}
|
||||
func (*UnimplementedNSKeyServiceServer) DeleteNSKey(context.Context, *DeleteNSKeyRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteNSKey not implemented")
|
||||
}
|
||||
func (*UnimplementedNSKeyServiceServer) FindNSKey(context.Context, *FindNSKeyRequest) (*FindNSKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindNSKey not implemented")
|
||||
}
|
||||
func (*UnimplementedNSKeyServiceServer) CountAllNSKeys(context.Context, *CountAllNSKeysRequest) (*RPCCountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CountAllNSKeys not implemented")
|
||||
}
|
||||
func (*UnimplementedNSKeyServiceServer) ListNSKeys(context.Context, *ListNSKeysRequest) (*ListNSKeysResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListNSKeys not implemented")
|
||||
}
|
||||
func (*UnimplementedNSKeyServiceServer) ListNSKeysAfterVersion(context.Context, *ListNSKeysAfterVersionRequest) (*ListNSKeysAfterVersionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListNSKeysAfterVersion not implemented")
|
||||
}
|
||||
|
||||
func RegisterNSKeyServiceServer(s *grpc.Server, srv NSKeyServiceServer) {
|
||||
s.RegisterService(&_NSKeyService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _NSKeyService_CreateNSKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateNSKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSKeyServiceServer).CreateNSKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSKeyService/CreateNSKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSKeyServiceServer).CreateNSKey(ctx, req.(*CreateNSKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSKeyService_UpdateNSKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateNSKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSKeyServiceServer).UpdateNSKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSKeyService/UpdateNSKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSKeyServiceServer).UpdateNSKey(ctx, req.(*UpdateNSKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSKeyService_DeleteNSKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteNSKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSKeyServiceServer).DeleteNSKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSKeyService/DeleteNSKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSKeyServiceServer).DeleteNSKey(ctx, req.(*DeleteNSKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSKeyService_FindNSKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindNSKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSKeyServiceServer).FindNSKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSKeyService/FindNSKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSKeyServiceServer).FindNSKey(ctx, req.(*FindNSKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSKeyService_CountAllNSKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CountAllNSKeysRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSKeyServiceServer).CountAllNSKeys(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSKeyService/CountAllNSKeys",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSKeyServiceServer).CountAllNSKeys(ctx, req.(*CountAllNSKeysRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSKeyService_ListNSKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListNSKeysRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSKeyServiceServer).ListNSKeys(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSKeyService/ListNSKeys",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSKeyServiceServer).ListNSKeys(ctx, req.(*ListNSKeysRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NSKeyService_ListNSKeysAfterVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListNSKeysAfterVersionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NSKeyServiceServer).ListNSKeysAfterVersion(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NSKeyService/ListNSKeysAfterVersion",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NSKeyServiceServer).ListNSKeysAfterVersion(ctx, req.(*ListNSKeysAfterVersionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _NSKeyService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.NSKeyService",
|
||||
HandlerType: (*NSKeyServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "createNSKey",
|
||||
Handler: _NSKeyService_CreateNSKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateNSKey",
|
||||
Handler: _NSKeyService_UpdateNSKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "deleteNSKey",
|
||||
Handler: _NSKeyService_DeleteNSKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findNSKey",
|
||||
Handler: _NSKeyService_FindNSKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "countAllNSKeys",
|
||||
Handler: _NSKeyService_CountAllNSKeys_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "listNSKeys",
|
||||
Handler: _NSKeyService_ListNSKeys_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "listNSKeysAfterVersion",
|
||||
Handler: _NSKeyService_ListNSKeysAfterVersion_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_ns_key.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user