kms

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 11

Documentation

Index

Constants

View Source
const (
	// InvalidRequestErrorCode is typically a code for invalid requests.
	InvalidRequestErrorCode = command.Code(iota + command.KMS)
	// CreateKeySetError is for failures while creating key set.
	CreateKeySetError
	// ImportKeyError is for failures while importing key.
	ImportKeyError
)

Error codes.

View Source
const (
	// command name.
	CommandName = "kms"

	// command methods.
	CreateKeySetCommandMethod = "CreateKeySet"
	ImportKeyCommandMethod    = "ImportKey"
)

constants for KMS commands.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command contains command operations provided by verifiable credential controller.

func New

func New(p provider) *Command

New returns new kms command instance.

func (*Command) CreateKeySet

func (o *Command) CreateKeySet(rw io.Writer, req io.Reader) command.Error

CreateKeySet create a new public/private encryption and signature key pairs set.

func (*Command) GetHandlers

func (o *Command) GetHandlers() []command.Handler

GetHandlers returns list of all commands supported by this controller command.

func (*Command) ImportKey added in v0.1.4

func (o *Command) ImportKey(rw io.Writer, req io.Reader) command.Error

ImportKey import key.

type CreateKeySetRequest

type CreateKeySetRequest struct {
	KeyType string `json:"keyType,omitempty"`
}

CreateKeySetRequest is model for createKeySey request.

type CreateKeySetResponse

type CreateKeySetResponse struct {
	//  key id base64 encoded
	KeyID string `json:"keyID,omitempty"`
	//  public key base64 encoded
	PublicKey string `json:"publicKey,omitempty"`
}

CreateKeySetResponse for returning key pair.

type JSONWebKey added in v0.1.4

type JSONWebKey struct {
	Use string `json:"use,omitempty"`
	Kty string `json:"kty,omitempty"`
	Kid string `json:"kid,omitempty"`
	Crv string `json:"crv,omitempty"`
	Alg string `json:"alg,omitempty"`
	X   string `json:"x,omitempty"`
	Y   string `json:"y,omitempty"`
	D   string `json:"d,omitempty"`
}

JSONWebKey contains subset of json web key json properties.

Jump to

Keyboard shortcuts

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