Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
proto/signer.proto
It has these top-level messages:
CreateKeyRequest KeyInfo KeyID Algorithm GetKeyInfoResponse PublicKey Signature SignatureRequest Void
Index ¶
- func RegisterKeyManagementServer(s *grpc.Server, srv KeyManagementServer)
- func RegisterSignerServer(s *grpc.Server, srv SignerServer)
- type Algorithm
- type CreateKeyRequest
- type GetKeyInfoResponse
- type KeyID
- type KeyInfo
- type KeyManagementClient
- type KeyManagementServer
- type PublicKey
- type Signature
- type SignatureRequest
- type SignerClient
- type SignerServer
- type Void
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterKeyManagementServer ¶
func RegisterKeyManagementServer(s *grpc.Server, srv KeyManagementServer)
func RegisterSignerServer ¶
func RegisterSignerServer(s *grpc.Server, srv SignerServer)
Types ¶
type Algorithm ¶
type Algorithm struct {
Algorithm string `protobuf:"bytes,1,opt,name=algorithm" json:"algorithm,omitempty"`
}
Type holds the type of crypto algorithm used
func (*Algorithm) Descriptor ¶ added in v0.4.0
func (*Algorithm) ProtoMessage ¶
func (*Algorithm) ProtoMessage()
type CreateKeyRequest ¶ added in v0.4.0
type CreateKeyRequest struct { Algorithm string `protobuf:"bytes,1,opt,name=algorithm" json:"algorithm,omitempty"` Gun string `protobuf:"bytes,2,opt,name=gun" json:"gun,omitempty"` Role string `protobuf:"bytes,3,opt,name=role" json:"role,omitempty"` }
func (*CreateKeyRequest) Descriptor ¶ added in v0.4.0
func (*CreateKeyRequest) Descriptor() ([]byte, []int)
func (*CreateKeyRequest) ProtoMessage ¶ added in v0.4.0
func (*CreateKeyRequest) ProtoMessage()
func (*CreateKeyRequest) Reset ¶ added in v0.4.0
func (m *CreateKeyRequest) Reset()
func (*CreateKeyRequest) String ¶ added in v0.4.0
func (m *CreateKeyRequest) String() string
type GetKeyInfoResponse ¶ added in v0.4.0
type GetKeyInfoResponse struct { KeyInfo *KeyInfo `protobuf:"bytes,1,opt,name=keyInfo" json:"keyInfo,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` Role string `protobuf:"bytes,3,opt,name=role" json:"role,omitempty"` }
GetKeyInfoResponse returns the public key, the role, and the algorithm and key ID. For backwards compatibility, it doesn't embed a PublicKey object
func (*GetKeyInfoResponse) Descriptor ¶ added in v0.4.0
func (*GetKeyInfoResponse) Descriptor() ([]byte, []int)
func (*GetKeyInfoResponse) GetKeyInfo ¶ added in v0.4.0
func (m *GetKeyInfoResponse) GetKeyInfo() *KeyInfo
func (*GetKeyInfoResponse) ProtoMessage ¶ added in v0.4.0
func (*GetKeyInfoResponse) ProtoMessage()
func (*GetKeyInfoResponse) Reset ¶ added in v0.4.0
func (m *GetKeyInfoResponse) Reset()
func (*GetKeyInfoResponse) String ¶ added in v0.4.0
func (m *GetKeyInfoResponse) String() string
type KeyID ¶
type KeyID struct {
ID string `protobuf:"bytes,1,opt,name=ID,json=iD" json:"ID,omitempty"`
}
KeyID holds an ID that is used to reference the key
func (*KeyID) Descriptor ¶ added in v0.4.0
func (*KeyID) ProtoMessage ¶
func (*KeyID) ProtoMessage()
type KeyInfo ¶
type KeyInfo struct { KeyID *KeyID `protobuf:"bytes,1,opt,name=keyID" json:"keyID,omitempty"` Algorithm *Algorithm `protobuf:"bytes,2,opt,name=algorithm" json:"algorithm,omitempty"` }
KeyInfo holds a KeyID that is used to reference the key and it's algorithm
func (*KeyInfo) Descriptor ¶ added in v0.4.0
func (*KeyInfo) GetAlgorithm ¶
func (*KeyInfo) ProtoMessage ¶
func (*KeyInfo) ProtoMessage()
type KeyManagementClient ¶
type KeyManagementClient interface { // CreateKey creates as asymmetric key pair and returns the PublicKey CreateKey(ctx context.Context, in *CreateKeyRequest, opts ...grpc.CallOption) (*PublicKey, error) // DeleteKey deletes the key associated with a KeyID DeleteKey(ctx context.Context, in *KeyID, opts ...grpc.CallOption) (*Void, error) // GetKeyInfo returns the PublicKey associated with a KeyID GetKeyInfo(ctx context.Context, in *KeyID, opts ...grpc.CallOption) (*GetKeyInfoResponse, error) }
func NewKeyManagementClient ¶
func NewKeyManagementClient(cc *grpc.ClientConn) KeyManagementClient
type KeyManagementServer ¶
type KeyManagementServer interface { // CreateKey creates as asymmetric key pair and returns the PublicKey CreateKey(context.Context, *CreateKeyRequest) (*PublicKey, error) // DeleteKey deletes the key associated with a KeyID DeleteKey(context.Context, *KeyID) (*Void, error) // GetKeyInfo returns the PublicKey associated with a KeyID GetKeyInfo(context.Context, *KeyID) (*GetKeyInfoResponse, error) }
type PublicKey ¶
type PublicKey struct { KeyInfo *KeyInfo `protobuf:"bytes,1,opt,name=keyInfo" json:"keyInfo,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` }
PublicKey has a KeyInfo that is used to reference the key, and opaque bytes of a publicKey
func (*PublicKey) Descriptor ¶ added in v0.4.0
func (*PublicKey) GetKeyInfo ¶
func (*PublicKey) ProtoMessage ¶
func (*PublicKey) ProtoMessage()
type Signature ¶
type Signature struct { KeyInfo *KeyInfo `protobuf:"bytes,1,opt,name=keyInfo" json:"keyInfo,omitempty"` Algorithm *Algorithm `protobuf:"bytes,2,opt,name=algorithm" json:"algorithm,omitempty"` Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` }
Signature specifies a KeyInfo that was used for signing and signed content
func (*Signature) Descriptor ¶ added in v0.4.0
func (*Signature) GetAlgorithm ¶
func (*Signature) GetKeyInfo ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
type SignatureRequest ¶
type SignatureRequest struct { KeyID *KeyID `protobuf:"bytes,1,opt,name=keyID" json:"keyID,omitempty"` Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` }
SignatureRequests specifies a KeyInfo, and content to be signed
func (*SignatureRequest) Descriptor ¶ added in v0.4.0
func (*SignatureRequest) Descriptor() ([]byte, []int)
func (*SignatureRequest) GetKeyID ¶
func (m *SignatureRequest) GetKeyID() *KeyID
func (*SignatureRequest) ProtoMessage ¶
func (*SignatureRequest) ProtoMessage()
func (*SignatureRequest) Reset ¶
func (m *SignatureRequest) Reset()
func (*SignatureRequest) String ¶
func (m *SignatureRequest) String() string
type SignerClient ¶
type SignerClient interface { // Sign calculates a cryptographic signature using the Key associated with a KeyID and returns the signature Sign(ctx context.Context, in *SignatureRequest, opts ...grpc.CallOption) (*Signature, error) }
func NewSignerClient ¶
func NewSignerClient(cc *grpc.ClientConn) SignerClient
type SignerServer ¶
type SignerServer interface { // Sign calculates a cryptographic signature using the Key associated with a KeyID and returns the signature Sign(context.Context, *SignatureRequest) (*Signature, error) }
type Void ¶
type Void struct { }
Void represents an empty message type
func (*Void) Descriptor ¶ added in v0.4.0
func (*Void) ProtoMessage ¶
func (*Void) ProtoMessage()