proto

package
v0.3.0-RC5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

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:

KeyInfo
KeyID
Algorithm
PublicKey
Signature
SignatureRequest
Void
HealthStatus

Index

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) ProtoMessage

func (*Algorithm) ProtoMessage()

func (*Algorithm) Reset

func (m *Algorithm) Reset()

func (*Algorithm) String

func (m *Algorithm) String() string

type HealthStatus

type HealthStatus struct {
	Status map[string]string `` /* 132-byte string literal not displayed */
}

A mapping of health check name to the check result message

func (*HealthStatus) GetStatus

func (m *HealthStatus) GetStatus() map[string]string

func (*HealthStatus) ProtoMessage

func (*HealthStatus) ProtoMessage()

func (*HealthStatus) Reset

func (m *HealthStatus) Reset()

func (*HealthStatus) String

func (m *HealthStatus) String() string

type KeyID

type KeyID struct {
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
}

KeyID holds an ID that is used to reference the key

func (*KeyID) ProtoMessage

func (*KeyID) ProtoMessage()

func (*KeyID) Reset

func (m *KeyID) Reset()

func (*KeyID) String

func (m *KeyID) String() string

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) GetAlgorithm

func (m *KeyInfo) GetAlgorithm() *Algorithm

func (*KeyInfo) GetKeyID

func (m *KeyInfo) GetKeyID() *KeyID

func (*KeyInfo) ProtoMessage

func (*KeyInfo) ProtoMessage()

func (*KeyInfo) Reset

func (m *KeyInfo) Reset()

func (*KeyInfo) String

func (m *KeyInfo) String() string

type KeyManagementClient

type KeyManagementClient interface {
	// CreateKey creates as asymmetric key pair and returns the PublicKey
	CreateKey(ctx context.Context, in *Algorithm, 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) (*PublicKey, error)
	// CheckHealth returns the HealthStatus with the service
	CheckHealth(ctx context.Context, in *Void, opts ...grpc.CallOption) (*HealthStatus, 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, *Algorithm) (*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) (*PublicKey, error)
	// CheckHealth returns the HealthStatus with the service
	CheckHealth(context.Context, *Void) (*HealthStatus, 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) GetKeyInfo

func (m *PublicKey) GetKeyInfo() *KeyInfo

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) Reset

func (m *PublicKey) Reset()

func (*PublicKey) String

func (m *PublicKey) String() string

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) GetAlgorithm

func (m *Signature) GetAlgorithm() *Algorithm

func (*Signature) GetKeyInfo

func (m *Signature) GetKeyInfo() *KeyInfo

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) String

func (m *Signature) String() string

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) 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)
	// CheckHealth returns the HealthStatus with the service
	CheckHealth(ctx context.Context, in *Void, opts ...grpc.CallOption) (*HealthStatus, 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)
	// CheckHealth returns the HealthStatus with the service
	CheckHealth(context.Context, *Void) (*HealthStatus, error)
}

type Void

type Void struct {
}

Void represents an empty message type

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) Reset

func (m *Void) Reset()

func (*Void) String

func (m *Void) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL