Skip to content
Snippets Groups Projects
keys.pb.go 31.4 KiB
Newer Older
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: keys.proto

/*
Package pbkeys is a generated protocol buffer package.

It is generated from these files:
	keys.proto

It has these top-level messages:
	Name
	Empty
	GenRequest
	GenResponse
	PubRequest
	PubResponse
	ImportJSONRequest
	ImportResponse
	ImportRequest
	ExportRequest
	ExportResponse
	SignRequest
	SignResponse
	VerifyRequest
	HashRequest
	HashResponse
	Key
	ListResponse
	AddNameRequest
*/
package pbkeys

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

type Name struct {
	Keyname string `protobuf:"bytes,1,opt,name=keyname" json:"keyname,omitempty"`
}

func (m *Name) Reset()                    { *m = Name{} }
func (m *Name) String() string            { return proto.CompactTextString(m) }
func (*Name) ProtoMessage()               {}
func (*Name) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *Name) GetKeyname() string {
	if m != nil {
		return m.Keyname
	}
	return ""
}

type Empty struct {
}

func (m *Empty) Reset()                    { *m = Empty{} }
func (m *Empty) String() string            { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage()               {}
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

type GenRequest struct {
	Passphrase string `protobuf:"bytes,1,opt,name=passphrase" json:"passphrase,omitempty"`
	Curvetype  string `protobuf:"bytes,2,opt,name=curvetype" json:"curvetype,omitempty"`
	Keyname    string `protobuf:"bytes,3,opt,name=keyname" json:"keyname,omitempty"`
}

func (m *GenRequest) Reset()                    { *m = GenRequest{} }
func (m *GenRequest) String() string            { return proto.CompactTextString(m) }
func (*GenRequest) ProtoMessage()               {}
func (*GenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *GenRequest) GetPassphrase() string {
	if m != nil {
		return m.Passphrase
	}
	return ""
}

func (m *GenRequest) GetCurvetype() string {
	if m != nil {
		return m.Curvetype
	}
	return ""
}

func (m *GenRequest) GetKeyname() string {
	if m != nil {
		return m.Keyname
	}
	return ""
}

type GenResponse struct {
	Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
}

func (m *GenResponse) Reset()                    { *m = GenResponse{} }
func (m *GenResponse) String() string            { return proto.CompactTextString(m) }
func (*GenResponse) ProtoMessage()               {}
func (*GenResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *GenResponse) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

type PubRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
}

func (m *PubRequest) Reset()                    { *m = PubRequest{} }
func (m *PubRequest) String() string            { return proto.CompactTextString(m) }
func (*PubRequest) ProtoMessage()               {}
func (*PubRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }

func (m *PubRequest) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

func (m *PubRequest) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

type PubResponse struct {
	Pub       []byte `protobuf:"bytes,1,opt,name=pub,proto3" json:"pub,omitempty"`
	Curvetype string `protobuf:"bytes,2,opt,name=curvetype" json:"curvetype,omitempty"`
}

func (m *PubResponse) Reset()                    { *m = PubResponse{} }
func (m *PubResponse) String() string            { return proto.CompactTextString(m) }
func (*PubResponse) ProtoMessage()               {}
func (*PubResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }

func (m *PubResponse) GetPub() []byte {
	if m != nil {
		return m.Pub
	}
	return nil
}

func (m *PubResponse) GetCurvetype() string {
	if m != nil {
		return m.Curvetype
	}
	return ""
}

type ImportJSONRequest struct {
	Passphrase string `protobuf:"bytes,1,opt,name=passphrase" json:"passphrase,omitempty"`
	JSON       string `protobuf:"bytes,2,opt,name=JSON" json:"JSON,omitempty"`
}

func (m *ImportJSONRequest) Reset()                    { *m = ImportJSONRequest{} }
func (m *ImportJSONRequest) String() string            { return proto.CompactTextString(m) }
func (*ImportJSONRequest) ProtoMessage()               {}
func (*ImportJSONRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }

func (m *ImportJSONRequest) GetPassphrase() string {
	if m != nil {
		return m.Passphrase
	}
	return ""
}

func (m *ImportJSONRequest) GetJSON() string {
	if m != nil {
		return m.JSON
	}
	return ""
}

type ImportResponse struct {
	Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
}

func (m *ImportResponse) Reset()                    { *m = ImportResponse{} }
func (m *ImportResponse) String() string            { return proto.CompactTextString(m) }
func (*ImportResponse) ProtoMessage()               {}
func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }

func (m *ImportResponse) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

type ImportRequest struct {
	Passphrase string `protobuf:"bytes,1,opt,name=passphrase" json:"passphrase,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Curvetype  string `protobuf:"bytes,3,opt,name=curvetype" json:"curvetype,omitempty"`
	Keybytes   []byte `protobuf:"bytes,4,opt,name=keybytes,proto3" json:"keybytes,omitempty"`
}

func (m *ImportRequest) Reset()                    { *m = ImportRequest{} }
func (m *ImportRequest) String() string            { return proto.CompactTextString(m) }
func (*ImportRequest) ProtoMessage()               {}
func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }

func (m *ImportRequest) GetPassphrase() string {
	if m != nil {
		return m.Passphrase
	}
	return ""
}

func (m *ImportRequest) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *ImportRequest) GetCurvetype() string {
	if m != nil {
		return m.Curvetype
	}
	return ""
}

func (m *ImportRequest) GetKeybytes() []byte {
	if m != nil {
		return m.Keybytes
	}
	return nil
}

type ExportRequest struct {
	Passphrase string `protobuf:"bytes,1,opt,name=passphrase" json:"passphrase,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Address    string `protobuf:"bytes,3,opt,name=address" json:"address,omitempty"`
}

func (m *ExportRequest) Reset()                    { *m = ExportRequest{} }
func (m *ExportRequest) String() string            { return proto.CompactTextString(m) }
func (*ExportRequest) ProtoMessage()               {}
func (*ExportRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }

func (m *ExportRequest) GetPassphrase() string {
	if m != nil {
		return m.Passphrase
	}
	return ""
}

func (m *ExportRequest) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *ExportRequest) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

type ExportResponse struct {
	Export string `protobuf:"bytes,1,opt,name=export" json:"export,omitempty"`
}

func (m *ExportResponse) Reset()                    { *m = ExportResponse{} }
func (m *ExportResponse) String() string            { return proto.CompactTextString(m) }
func (*ExportResponse) ProtoMessage()               {}
func (*ExportResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }

func (m *ExportResponse) GetExport() string {
	if m != nil {
		return m.Export
	}
	return ""
}

type SignRequest struct {
	Passphrase string `protobuf:"bytes,1,opt,name=passphrase" json:"passphrase,omitempty"`
	Address    string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
	Name       string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
	Message    []byte `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
}

func (m *SignRequest) Reset()                    { *m = SignRequest{} }
func (m *SignRequest) String() string            { return proto.CompactTextString(m) }
func (*SignRequest) ProtoMessage()               {}
func (*SignRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }

func (m *SignRequest) GetPassphrase() string {
	if m != nil {
		return m.Passphrase
	}
	return ""
}

func (m *SignRequest) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

func (m *SignRequest) GetName() string {
		return m.Name
	}
	return ""
}

func (m *SignRequest) GetMessage() []byte {
	if m != nil {
		return m.Message
	}
	return nil
}

type SignResponse struct {
	Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	Curvetype string `protobuf:"bytes,2,opt,name=curvetype" json:"curvetype,omitempty"`
}

func (m *SignResponse) Reset()                    { *m = SignResponse{} }
func (m *SignResponse) String() string            { return proto.CompactTextString(m) }
func (*SignResponse) ProtoMessage()               {}
func (*SignResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }

func (m *SignResponse) GetSignature() []byte {
	if m != nil {
		return m.Signature
	}
	return nil
}

func (m *SignResponse) GetCurvetype() string {
	if m != nil {
		return m.Curvetype
	}
	return ""
}

type VerifyRequest struct {
	Curvetype string `protobuf:"bytes,1,opt,name=curvetype" json:"curvetype,omitempty"`
	Pub       []byte `protobuf:"bytes,2,opt,name=pub,proto3" json:"pub,omitempty"`
	Message   []byte `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (m *VerifyRequest) Reset()                    { *m = VerifyRequest{} }
func (m *VerifyRequest) String() string            { return proto.CompactTextString(m) }
func (*VerifyRequest) ProtoMessage()               {}
func (*VerifyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }

func (m *VerifyRequest) GetCurvetype() string {
	if m != nil {
		return m.Curvetype
	}
	return ""
}

func (m *VerifyRequest) GetPub() []byte {
	if m != nil {
		return m.Pub
	}
	return nil
}

func (m *VerifyRequest) GetMessage() []byte {
		return m.Message
	}
	return nil
}

func (m *VerifyRequest) GetSignature() []byte {
	if m != nil {
		return m.Signature
	}
	return nil
}

type HashRequest struct {
	Hashtype string `protobuf:"bytes,1,opt,name=hashtype" json:"hashtype,omitempty"`
	Message  []byte `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

func (m *HashRequest) Reset()                    { *m = HashRequest{} }
func (m *HashRequest) String() string            { return proto.CompactTextString(m) }
func (*HashRequest) ProtoMessage()               {}
func (*HashRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }

func (m *HashRequest) GetHashtype() string {
	if m != nil {
		return m.Hashtype
	}
	return ""
}

func (m *HashRequest) GetMessage() []byte {
	if m != nil {
		return m.Message
	}
	return nil
}

type HashResponse struct {
	Hash string `protobuf:"bytes,1,opt,name=hash" json:"hash,omitempty"`
}

func (m *HashResponse) Reset()                    { *m = HashResponse{} }
func (m *HashResponse) String() string            { return proto.CompactTextString(m) }
func (*HashResponse) ProtoMessage()               {}
func (*HashResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }

func (m *HashResponse) GetHash() string {
	if m != nil {
		return m.Hash
	}
	return ""
}

type Key struct {
	Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
	Keyname string `protobuf:"bytes,2,opt,name=keyname" json:"keyname,omitempty"`
}

func (m *Key) Reset()                    { *m = Key{} }
func (m *Key) String() string            { return proto.CompactTextString(m) }
func (*Key) ProtoMessage()               {}
func (*Key) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }

func (m *Key) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

func (m *Key) GetKeyname() string {
	if m != nil {
		return m.Keyname
	}
	return ""
}

type ListResponse struct {
	Key []*Key `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"`
}

func (m *ListResponse) Reset()                    { *m = ListResponse{} }
func (m *ListResponse) String() string            { return proto.CompactTextString(m) }
func (*ListResponse) ProtoMessage()               {}
func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }

func (m *ListResponse) GetKey() []*Key {
	if m != nil {
		return m.Key
	}
	return nil
}

type AddNameRequest struct {
	Keyname string `protobuf:"bytes,1,opt,name=keyname" json:"keyname,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
}

func (m *AddNameRequest) Reset()                    { *m = AddNameRequest{} }
func (m *AddNameRequest) String() string            { return proto.CompactTextString(m) }
func (*AddNameRequest) ProtoMessage()               {}
func (*AddNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
func (m *AddNameRequest) GetKeyname() string {
func (m *AddNameRequest) GetAddress() string {
	if m != nil {
		return m.Address
	}
	return ""
}

func init() {
	proto.RegisterType((*Name)(nil), "pbkeys.Name")
	proto.RegisterType((*Empty)(nil), "pbkeys.Empty")
	proto.RegisterType((*GenRequest)(nil), "pbkeys.GenRequest")
	proto.RegisterType((*GenResponse)(nil), "pbkeys.GenResponse")
	proto.RegisterType((*PubRequest)(nil), "pbkeys.PubRequest")
	proto.RegisterType((*PubResponse)(nil), "pbkeys.PubResponse")
	proto.RegisterType((*ImportJSONRequest)(nil), "pbkeys.ImportJSONRequest")
	proto.RegisterType((*ImportResponse)(nil), "pbkeys.ImportResponse")
	proto.RegisterType((*ImportRequest)(nil), "pbkeys.ImportRequest")
	proto.RegisterType((*ExportRequest)(nil), "pbkeys.ExportRequest")
	proto.RegisterType((*ExportResponse)(nil), "pbkeys.ExportResponse")
	proto.RegisterType((*SignRequest)(nil), "pbkeys.SignRequest")
	proto.RegisterType((*SignResponse)(nil), "pbkeys.SignResponse")
	proto.RegisterType((*VerifyRequest)(nil), "pbkeys.VerifyRequest")
	proto.RegisterType((*HashRequest)(nil), "pbkeys.HashRequest")
	proto.RegisterType((*HashResponse)(nil), "pbkeys.HashResponse")
	proto.RegisterType((*Key)(nil), "pbkeys.Key")
	proto.RegisterType((*ListResponse)(nil), "pbkeys.ListResponse")
	proto.RegisterType((*AddNameRequest)(nil), "pbkeys.AddNameRequest")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// 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.SupportPackageIsVersion4

// Client API for Keys service

type KeysClient interface {
	GenerateKey(ctx context.Context, in *GenRequest, opts ...grpc.CallOption) (*GenResponse, error)
	PublicKey(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error)
	Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error)
	Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*Empty, error)
	Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error)
	ImportJSON(ctx context.Context, in *ImportJSONRequest, opts ...grpc.CallOption) (*ImportResponse, error)
	Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error)
	Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error)
	RemoveName(ctx context.Context, in *Name, opts ...grpc.CallOption) (*Empty, error)
	List(ctx context.Context, in *Name, opts ...grpc.CallOption) (*ListResponse, error)
	AddName(ctx context.Context, in *AddNameRequest, opts ...grpc.CallOption) (*Empty, error)
}

type keysClient struct {
	cc *grpc.ClientConn
}

func NewKeysClient(cc *grpc.ClientConn) KeysClient {
	return &keysClient{cc}
}

func (c *keysClient) GenerateKey(ctx context.Context, in *GenRequest, opts ...grpc.CallOption) (*GenResponse, error) {
	out := new(GenResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/GenerateKey", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) PublicKey(ctx context.Context, in *PubRequest, opts ...grpc.CallOption) (*PubResponse, error) {
	out := new(PubResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/PublicKey", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) {
	out := new(SignResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/Sign", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/Verify", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) Import(ctx context.Context, in *ImportRequest, opts ...grpc.CallOption) (*ImportResponse, error) {
	out := new(ImportResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/Import", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) ImportJSON(ctx context.Context, in *ImportJSONRequest, opts ...grpc.CallOption) (*ImportResponse, error) {
	out := new(ImportResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/ImportJSON", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error) {
	out := new(ExportResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/Export", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) {
	out := new(HashResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/Hash", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) RemoveName(ctx context.Context, in *Name, opts ...grpc.CallOption) (*Empty, error) {
	err := grpc.Invoke(ctx, "/pbkeys.Keys/RemoveName", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) List(ctx context.Context, in *Name, opts ...grpc.CallOption) (*ListResponse, error) {
	out := new(ListResponse)
	err := grpc.Invoke(ctx, "/pbkeys.Keys/List", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keysClient) AddName(ctx context.Context, in *AddNameRequest, opts ...grpc.CallOption) (*Empty, error) {
	err := grpc.Invoke(ctx, "/pbkeys.Keys/AddName", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Keys service

type KeysServer interface {
	GenerateKey(context.Context, *GenRequest) (*GenResponse, error)
	PublicKey(context.Context, *PubRequest) (*PubResponse, error)
	Sign(context.Context, *SignRequest) (*SignResponse, error)
	Verify(context.Context, *VerifyRequest) (*Empty, error)
	Import(context.Context, *ImportRequest) (*ImportResponse, error)
	ImportJSON(context.Context, *ImportJSONRequest) (*ImportResponse, error)
	Export(context.Context, *ExportRequest) (*ExportResponse, error)
	Hash(context.Context, *HashRequest) (*HashResponse, error)
	RemoveName(context.Context, *Name) (*Empty, error)
	List(context.Context, *Name) (*ListResponse, error)
	AddName(context.Context, *AddNameRequest) (*Empty, error)
}

func RegisterKeysServer(s *grpc.Server, srv KeysServer) {
	s.RegisterService(&_Keys_serviceDesc, srv)
}

func _Keys_GenerateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GenRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).GenerateKey(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/GenerateKey",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).GenerateKey(ctx, req.(*GenRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_PublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PubRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).PublicKey(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/PublicKey",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).PublicKey(ctx, req.(*PubRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_Sign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SignRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).Sign(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/Sign",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).Sign(ctx, req.(*SignRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VerifyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).Verify(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/Verify",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).Verify(ctx, req.(*VerifyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_Import_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ImportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).Import(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/Import",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).Import(ctx, req.(*ImportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_ImportJSON_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ImportJSONRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).ImportJSON(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/ImportJSON",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).ImportJSON(ctx, req.(*ImportJSONRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ExportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).Export(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/Export",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).Export(ctx, req.(*ExportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_Hash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HashRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).Hash(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/Hash",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).Hash(ctx, req.(*HashRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_RemoveName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Name)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).RemoveName(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/RemoveName",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).RemoveName(ctx, req.(*Name))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Name)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/List",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).List(ctx, req.(*Name))
	}
	return interceptor(ctx, in, info, handler)
}

func _Keys_AddName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddNameRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeysServer).AddName(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pbkeys.Keys/AddName",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeysServer).AddName(ctx, req.(*AddNameRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Keys_serviceDesc = grpc.ServiceDesc{
	ServiceName: "pbkeys.Keys",
	HandlerType: (*KeysServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateKey",
			Handler:    _Keys_GenerateKey_Handler,
		},
		{
			MethodName: "PublicKey",
			Handler:    _Keys_PublicKey_Handler,
		},
		{
			MethodName: "Sign",
			Handler:    _Keys_Sign_Handler,
		},
		{
			MethodName: "Verify",
			Handler:    _Keys_Verify_Handler,
		},
		{
			MethodName: "Import",
			Handler:    _Keys_Import_Handler,
		},
		{
			MethodName: "ImportJSON",
			Handler:    _Keys_ImportJSON_Handler,
		},
		{
			MethodName: "Export",
			Handler:    _Keys_Export_Handler,
		},
		{
			MethodName: "Hash",
			Handler:    _Keys_Hash_Handler,
		},
		{
			MethodName: "RemoveName",
			Handler:    _Keys_RemoveName_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Keys_List_Handler,
		},
		{
			MethodName: "AddName",
			Handler:    _Keys_AddName_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "keys.proto",
}

func init() { proto.RegisterFile("keys.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 640 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x51, 0x6f, 0xd3, 0x3c,
	0x14, 0x55, 0x9b, 0x7c, 0xdd, 0x7a, 0xda, 0x4e, 0x1f, 0x06, 0xa6, 0x52, 0x0d, 0x34, 0xf9, 0x85,
	0x31, 0x89, 0x8a, 0x0d, 0xc4, 0x04, 0x12, 0x42, 0x08, 0xa6, 0xc1, 0x86, 0xc6, 0xd4, 0x49, 0xbc,
	0xf1, 0x90, 0xae, 0x97, 0xb5, 0x2a, 0x69, 0x43, 0x9c, 0x0c, 0xf2, 0xc0, 0xdf, 0xe3, 0x77, 0x21,
	0x3b, 0x76, 0x6d, 0x47, 0xeb, 0xa8, 0xc4, 0x9b, 0xef, 0xcd, 0xbd, 0xf7, 0x1c, 0xdf, 0x9c, 0x9c,
	0x00, 0x53, 0x2a, 0x44, 0x3f, 0x49, 0xe7, 0xd9, 0x9c, 0x35, 0x92, 0xa1, 0x8c, 0xf8, 0x36, 0xc2,
	0xd3, 0x28, 0x26, 0xd6, 0xc5, 0xda, 0x94, 0x8a, 0x59, 0x14, 0x53, 0xb7, 0xb6, 0x5d, 0xdb, 0x69,
	0x0e, 0x4c, 0xc8, 0xd7, 0xf0, 0xdf, 0x61, 0x9c, 0x64, 0x05, 0x1f, 0x01, 0x47, 0x34, 0x1b, 0xd0,
	0xf7, 0x9c, 0x44, 0xc6, 0x1e, 0x00, 0x49, 0x24, 0x44, 0x32, 0x4e, 0x23, 0x61, 0x7a, 0x9c, 0x0c,
	0xdb, 0x42, 0xf3, 0x22, 0x4f, 0xaf, 0x28, 0x2b, 0x12, 0xea, 0xd6, 0x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