vault

package
v0.0.0-...-4eb878b Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (v *vault, err error)

Types

type Vault

type Vault interface {
	Address() string
	ReadString(string, string) (string, error)
	ReadStringP(string) (string, error)
	Token() string
}

type VaultError

type VaultError struct {
	Type VaultErrorType
	Err  error
}

func (VaultError) Error

func (ve VaultError) Error() string

type VaultErrorType

type VaultErrorType string
const (
	VaultAddressMissingError VaultErrorType = "Vault address missing in env and config."
	VaultConnectionError     VaultErrorType = "Cannot connect to vault. Are you on the VA VPN?"
	VaultClientLoadError     VaultErrorType = "Cannot create vault api client."
	VaultClientReadError     VaultErrorType = "Failed to read value from api client."
	VaultTokenMissingError   VaultErrorType = "Vault token missing in env and config."
	VaultTypeCastError       VaultErrorType = "Failed to type cast value."
	VaultUnexpectedError     VaultErrorType = "Unexpected error while connecting to Vault."
)

type VaultResult

type VaultResult interface{}

Jump to

Keyboard shortcuts

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