mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-10 18:30: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_authority_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
|
||||
|
||||
// 设置Key
|
||||
type UpdateAuthorityKeyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -814,275 +805,3 @@ func file_service_authority_key_proto_init() {
|
||||
file_service_authority_key_proto_goTypes = nil
|
||||
file_service_authority_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
|
||||
|
||||
// AuthorityKeyServiceClient is the client API for AuthorityKeyService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type AuthorityKeyServiceClient interface {
|
||||
// 设置Key
|
||||
UpdateAuthorityKey(ctx context.Context, in *UpdateAuthorityKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 读取Key
|
||||
ReadAuthorityKey(ctx context.Context, in *ReadAuthorityKeyRequest, opts ...grpc.CallOption) (*ReadAuthorityKeyResponse, error)
|
||||
// 重置Key
|
||||
ResetAuthorityKey(ctx context.Context, in *ResetAuthorityKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 校验Key
|
||||
ValidateAuthorityKey(ctx context.Context, in *ValidateAuthorityKeyRequest, opts ...grpc.CallOption) (*ValidateAuthorityKeyResponse, error)
|
||||
// 检查版本信息
|
||||
CheckAuthority(ctx context.Context, in *CheckAuthorityRequest, opts ...grpc.CallOption) (*CheckAuthorityResponse, error)
|
||||
// 查询授权容量
|
||||
FindAuthorityQuota(ctx context.Context, in *FindAuthorityQuotaRequest, opts ...grpc.CallOption) (*FindAuthorityQuotaResponse, error)
|
||||
}
|
||||
|
||||
type authorityKeyServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthorityKeyServiceClient(cc grpc.ClientConnInterface) AuthorityKeyServiceClient {
|
||||
return &authorityKeyServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *authorityKeyServiceClient) UpdateAuthorityKey(ctx context.Context, in *UpdateAuthorityKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/updateAuthorityKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authorityKeyServiceClient) ReadAuthorityKey(ctx context.Context, in *ReadAuthorityKeyRequest, opts ...grpc.CallOption) (*ReadAuthorityKeyResponse, error) {
|
||||
out := new(ReadAuthorityKeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/readAuthorityKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authorityKeyServiceClient) ResetAuthorityKey(ctx context.Context, in *ResetAuthorityKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/resetAuthorityKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authorityKeyServiceClient) ValidateAuthorityKey(ctx context.Context, in *ValidateAuthorityKeyRequest, opts ...grpc.CallOption) (*ValidateAuthorityKeyResponse, error) {
|
||||
out := new(ValidateAuthorityKeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/validateAuthorityKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authorityKeyServiceClient) CheckAuthority(ctx context.Context, in *CheckAuthorityRequest, opts ...grpc.CallOption) (*CheckAuthorityResponse, error) {
|
||||
out := new(CheckAuthorityResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/checkAuthority", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authorityKeyServiceClient) FindAuthorityQuota(ctx context.Context, in *FindAuthorityQuotaRequest, opts ...grpc.CallOption) (*FindAuthorityQuotaResponse, error) {
|
||||
out := new(FindAuthorityQuotaResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/findAuthorityQuota", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthorityKeyServiceServer is the server API for AuthorityKeyService service.
|
||||
type AuthorityKeyServiceServer interface {
|
||||
// 设置Key
|
||||
UpdateAuthorityKey(context.Context, *UpdateAuthorityKeyRequest) (*RPCSuccess, error)
|
||||
// 读取Key
|
||||
ReadAuthorityKey(context.Context, *ReadAuthorityKeyRequest) (*ReadAuthorityKeyResponse, error)
|
||||
// 重置Key
|
||||
ResetAuthorityKey(context.Context, *ResetAuthorityKeyRequest) (*RPCSuccess, error)
|
||||
// 校验Key
|
||||
ValidateAuthorityKey(context.Context, *ValidateAuthorityKeyRequest) (*ValidateAuthorityKeyResponse, error)
|
||||
// 检查版本信息
|
||||
CheckAuthority(context.Context, *CheckAuthorityRequest) (*CheckAuthorityResponse, error)
|
||||
// 查询授权容量
|
||||
FindAuthorityQuota(context.Context, *FindAuthorityQuotaRequest) (*FindAuthorityQuotaResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAuthorityKeyServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuthorityKeyServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAuthorityKeyServiceServer) UpdateAuthorityKey(context.Context, *UpdateAuthorityKeyRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAuthorityKey not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthorityKeyServiceServer) ReadAuthorityKey(context.Context, *ReadAuthorityKeyRequest) (*ReadAuthorityKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReadAuthorityKey not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthorityKeyServiceServer) ResetAuthorityKey(context.Context, *ResetAuthorityKeyRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResetAuthorityKey not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthorityKeyServiceServer) ValidateAuthorityKey(context.Context, *ValidateAuthorityKeyRequest) (*ValidateAuthorityKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ValidateAuthorityKey not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthorityKeyServiceServer) CheckAuthority(context.Context, *CheckAuthorityRequest) (*CheckAuthorityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CheckAuthority not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthorityKeyServiceServer) FindAuthorityQuota(context.Context, *FindAuthorityQuotaRequest) (*FindAuthorityQuotaResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAuthorityQuota not implemented")
|
||||
}
|
||||
|
||||
func RegisterAuthorityKeyServiceServer(s *grpc.Server, srv AuthorityKeyServiceServer) {
|
||||
s.RegisterService(&_AuthorityKeyService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _AuthorityKeyService_UpdateAuthorityKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateAuthorityKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthorityKeyServiceServer).UpdateAuthorityKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.AuthorityKeyService/UpdateAuthorityKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthorityKeyServiceServer).UpdateAuthorityKey(ctx, req.(*UpdateAuthorityKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthorityKeyService_ReadAuthorityKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReadAuthorityKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthorityKeyServiceServer).ReadAuthorityKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.AuthorityKeyService/ReadAuthorityKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthorityKeyServiceServer).ReadAuthorityKey(ctx, req.(*ReadAuthorityKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthorityKeyService_ResetAuthorityKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ResetAuthorityKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthorityKeyServiceServer).ResetAuthorityKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.AuthorityKeyService/ResetAuthorityKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthorityKeyServiceServer).ResetAuthorityKey(ctx, req.(*ResetAuthorityKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthorityKeyService_ValidateAuthorityKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ValidateAuthorityKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthorityKeyServiceServer).ValidateAuthorityKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.AuthorityKeyService/ValidateAuthorityKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthorityKeyServiceServer).ValidateAuthorityKey(ctx, req.(*ValidateAuthorityKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthorityKeyService_CheckAuthority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CheckAuthorityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthorityKeyServiceServer).CheckAuthority(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.AuthorityKeyService/CheckAuthority",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthorityKeyServiceServer).CheckAuthority(ctx, req.(*CheckAuthorityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthorityKeyService_FindAuthorityQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAuthorityQuotaRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthorityKeyServiceServer).FindAuthorityQuota(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.AuthorityKeyService/FindAuthorityQuota",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthorityKeyServiceServer).FindAuthorityQuota(ctx, req.(*FindAuthorityQuotaRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _AuthorityKeyService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.AuthorityKeyService",
|
||||
HandlerType: (*AuthorityKeyServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "updateAuthorityKey",
|
||||
Handler: _AuthorityKeyService_UpdateAuthorityKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "readAuthorityKey",
|
||||
Handler: _AuthorityKeyService_ReadAuthorityKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "resetAuthorityKey",
|
||||
Handler: _AuthorityKeyService_ResetAuthorityKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "validateAuthorityKey",
|
||||
Handler: _AuthorityKeyService_ValidateAuthorityKey_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "checkAuthority",
|
||||
Handler: _AuthorityKeyService_CheckAuthority_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findAuthorityQuota",
|
||||
Handler: _AuthorityKeyService_FindAuthorityQuota_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_authority_key.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user