pkg

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Overview

Package pkg generalized functions, interfaces, and structs which can be used for for different data-stores implementations.

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

  • Copyright 2019 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

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

Index

Constants

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

Defines the valid secret store providers.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrSecretStore added in v0.0.5

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

ErrSecretStore error for unexpected problems with the secret store.

func NewErrSecretStore added in v0.0.5

func NewErrSecretStore(description string) ErrSecretStore

NewErrSecretStore creates an ErrSecretStore error type.

func (ErrSecretStore) Error added in v0.0.5

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 SecretClient

type SecretClient interface {
	// GetSecrets retrieves secrets from a secret store.
	// path specifies the type or location of the secrets to retrieve.
	// keys specifies the secrets which to retrieve. If no keys are provided then all the keys associated with the
	// specified path will be returned.
	GetSecrets(path string, keys ...string) (map[string]string, error)

	// StoreSecrets stores the secrets to a secret store.
	// it sets the values requested at provided keys
	// path specifies the type or location of the secrets to store
	// secrets map specifies the "key": "value" pairs of secrets to store
	StoreSecrets(path string, secrets map[string]string) error
}

SecretClient provides a contract for storing and retrieving secrets from a secret store provider.

Directories

Path Synopsis
keys contains common secret key strings used to obtain secrets
keys contains common secret key strings used to obtain secrets
providers
vault
Package vault defines structs that will be used frequently by clients which utilize HTTP transport.
Package vault defines structs that will be used frequently by clients which utilize HTTP transport.
token

Jump to

Keyboard shortcuts

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