keyprovider

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknownKeyProvider is returned when a key provider is
	// requested for which no corresponding factory has been
	// registered.  Check your initialization order if this is
	// returned unexpectedly.
	ErrUnknownKeyProvider = errors.New("no key provider with that name")

	// ErrNoSuchKey is returned when the key requested can't be
	// retrieved.
	ErrNoSuchKey = errors.New("no key exists with that identifier")

	// ErrInternal is returned when something screwy is happening
	// and a key can't be provided for some non-recoverable error.
	ErrInternal = errors.New("an internal error has occured")
)

Functions

func Register

func Register(name string, impl Factory)

Register is called by implementations during early init to register themselves.

func SetParentLogger

func SetParentLogger(l hclog.Logger)

SetParentLogger sets the parent logger for this instance.

Types

type Factory

type Factory func(hclog.Logger) (KeyProvider, error)

Factory returns a KeyProvider to the caller.

type KeyProvider

type KeyProvider interface {
	Provide(string, string) ([]byte, error)
}

KeyProvider provides an interface for obtaining keys from various sources.

func New

func New(b string) (KeyProvider, error)

New returns a KeyProvider initialized with the specified logger.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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