// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.19.4
// source: service_authority_key.proto

package pb

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	AuthorityKeyService_UpdateAuthorityKey_FullMethodName   = "/pb.AuthorityKeyService/updateAuthorityKey"
	AuthorityKeyService_ReadAuthorityKey_FullMethodName     = "/pb.AuthorityKeyService/readAuthorityKey"
	AuthorityKeyService_ResetAuthorityKey_FullMethodName    = "/pb.AuthorityKeyService/resetAuthorityKey"
	AuthorityKeyService_ValidateAuthorityKey_FullMethodName = "/pb.AuthorityKeyService/validateAuthorityKey"
	AuthorityKeyService_CheckAuthority_FullMethodName       = "/pb.AuthorityKeyService/checkAuthority"
	AuthorityKeyService_FindAuthorityQuota_FullMethodName   = "/pb.AuthorityKeyService/findAuthorityQuota"
)

// AuthorityKeyServiceClient is the client API for AuthorityKeyService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#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, AuthorityKeyService_UpdateAuthorityKey_FullMethodName, 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, AuthorityKeyService_ReadAuthorityKey_FullMethodName, 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, AuthorityKeyService_ResetAuthorityKey_FullMethodName, 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, AuthorityKeyService_ValidateAuthorityKey_FullMethodName, 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, AuthorityKeyService_CheckAuthority_FullMethodName, 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, AuthorityKeyService_FindAuthorityQuota_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AuthorityKeyServiceServer is the server API for AuthorityKeyService service.
// All implementations should embed UnimplementedAuthorityKeyServiceServer
// for forward compatibility
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 should 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")
}

// UnsafeAuthorityKeyServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AuthorityKeyServiceServer will
// result in compilation errors.
type UnsafeAuthorityKeyServiceServer interface {
	mustEmbedUnimplementedAuthorityKeyServiceServer()
}

func RegisterAuthorityKeyServiceServer(s grpc.ServiceRegistrar, 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: AuthorityKeyService_UpdateAuthorityKey_FullMethodName,
	}
	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: AuthorityKeyService_ReadAuthorityKey_FullMethodName,
	}
	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: AuthorityKeyService_ResetAuthorityKey_FullMethodName,
	}
	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: AuthorityKeyService_ValidateAuthorityKey_FullMethodName,
	}
	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: AuthorityKeyService_CheckAuthority_FullMethodName,
	}
	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: AuthorityKeyService_FindAuthorityQuota_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthorityKeyServiceServer).FindAuthorityQuota(ctx, req.(*FindAuthorityQuotaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AuthorityKeyService_ServiceDesc is the grpc.ServiceDesc for AuthorityKeyService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
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",
}
