vaultunboxer

package
v0.122.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvCirrusVaultURL       = "CIRRUS_VAULT_URL"
	EnvCirrusVaultAuthPath  = "CIRRUS_VAULT_AUTH_PATH"
	EnvCirrusVaultNamespace = "CIRRUS_VAULT_NAMESPACE"
	EnvCirrusVaultRole      = "CIRRUS_VAULT_ROLE"
)

Variables

View Source
var (
	ErrNotABoxedValue    = errors.New("doesn't look like a Vault-boxed value")
	ErrInvalidBoxedValue = errors.New("Vault-boxed value has an invalid format")
)

Functions

This section is empty.

Types

type BoxedValue

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

func NewBoxedValue

func NewBoxedValue(rawBoxedValue string) (*BoxedValue, error)

func (*BoxedValue) Select

func (value *BoxedValue) Select(data interface{}) (string, error)

func (*BoxedValue) UseCache

func (value *BoxedValue) UseCache() bool

func (*BoxedValue) VaultPathArgs

func (value *BoxedValue) VaultPathArgs() map[string][]string

type CachedSecret

type CachedSecret struct {
	Secret *vault.Secret
	Err    error
}

type JWTAuth

type JWTAuth struct {
	Token string
	Role  string
	Path  string
}

func (*JWTAuth) Login

func (jwtAuth *JWTAuth) Login(ctx context.Context, client *vault.Client) (*vault.Secret, error)

type VaultUnboxer

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

func New

func New(client *vault.Client) *VaultUnboxer

func NewFromEnvironment

func NewFromEnvironment(ctx context.Context, env *environment.Environment) (*VaultUnboxer, error)

func (*VaultUnboxer) Unbox

func (unboxer *VaultUnboxer) Unbox(ctx context.Context, value *BoxedValue) (string, error)

Jump to

Keyboard shortcuts

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