package pkg

import "github.com/edgexfoundry/go-mod-secrets/pkg"

******************************************************************************

Package errors contains the error types which are used by the SecretClient to communicate errors

Index

Constants

const (
	CoreSecurityServiceKey = "edgex-core-security"
	ConfigFileName         = "configuration.toml"
	ConfigDirectory        = "./res"
	ConfigDirEnv           = "EDGEX_CONF_DIR"
)

Defines the valid secret store providers.

Types

type Caller

type Caller interface {
	Do(req *http.Request) (*http.Response, error)
}

Caller interface used to abstract the implementation details for issuing an HTTP request. This allows for easier testing by the way of mocks.

type ErrSecretStore

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

ErrSecretStore error for unexpected problems with the secret store.

func NewErrSecretStore

func NewErrSecretStore(description string) ErrSecretStore

NewErrSecretStore creates an ErrSecretStore error type.

func (ErrSecretStore) Error

func (e ErrSecretStore) Error() string

type ErrSecretsNotFound

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

ErrSecretsNotFound error when a secret cannot be found. This aids in differentiating between empty("") values and non-existent keys

func NewErrSecretsNotFound

func NewErrSecretsNotFound(keys []string) ErrSecretsNotFound

NewErrSecretsNotFound creates a new ErrSecretsNotFound error.

func (ErrSecretsNotFound) Error

func (scnf ErrSecretsNotFound) Error() string

type TokenExpiredCallback

type TokenExpiredCallback func(expiredToken string) (replacementToken string, retry bool)

TokenExpiredCallback is the callback function to handle the case when the vault token has already expired

Source Files

constants.go errors.go interfaces.go

Directories

PathSynopsis
pkg/keyskeys contains common secret key strings used to obtain secrets
pkg/listener
pkg/providers
pkg/providers/vault
pkg/token
pkg/token/authtokenloader
pkg/token/authtokenloader/mocks
pkg/token/fileioperformer
pkg/token/fileioperformer/mocks
pkg/types
Version
v0.0.33 (latest)
Published
Jan 19, 2021
Platform
linux/amd64
Imports
3 packages
Last checked
2 months ago

Tools for package owners.