keystore

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keystore

type Keystore interface {
	CreateKey(kt kms.KeyType) (string, error)
	ExportKey(keyID string) ([]byte, error)
	CreateAndExportKey(kt kms.KeyType) (string, []byte, error)
	ImportKey(der []byte, kt kms.KeyType, kid string) (string, error)
	GetKeyHandle(keyID string) (interface{}, error)
	KeyManager() kms.KeyManager
}

Keystore represents a keystore.

func New

func New(opts ...Option) (Keystore, error)

New returns a new Keystore instance.

type Option

type Option func(options *Options)

Option configures Options.

func WithKMSCreator

func WithKMSCreator(creator kms.Creator) Option

WithKMSCreator sets the KMS creator.

func WithPrimaryKeyURI

func WithPrimaryKeyURI(uri string) Option

WithPrimaryKeyURI sets the primary key URI.

func WithSecretLock

func WithSecretLock(secretLock secretlock.Service) Option

WithSecretLock sets the secret lock service.

func WithStorageProvider

func WithStorageProvider(storageProvider storage.Provider) Option

WithStorageProvider sets the storage provider.

type Options

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

Options configures Keystore during creation.

Jump to

Keyboard shortcuts

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