vault

package
v3.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetSecret allows to retrieve a secret within a Vault.
	//
	// Some extra options may be given. It is up to the Vault client implementation to choose
	// to honor them.
	GetSecret(id string, options ...string) (Secret, error)

	// Shutdown tells a Client to shutdown, close all connections and release any created resources
	Shutdown() error
}

Client is the common interface for Vault clients.

Basically it allows to interact with a Vault to resolve a secret.

type ClientBuilder

type ClientBuilder interface {
	// BuildClient builds a Vault client based on Yorc configuration
	BuildClient(cfg config.Configuration) (Client, error)
}

A ClientBuilder builds a Vault client based on Yorc configuration

type Secret

type Secret interface {
	// Any secret should be serializable into a string to get the resulting data
	fmt.Stringer
	// Raw returns the Vault implementation secret.
	//
	// This is useful when used into Go templates like in config files.
	Raw() interface{}
}

A Secret is a resolved secret instance.

Based on the Vault implementation it could be the resolved secret like a string for instance or the implementation secret wrapped into a vault.Secret interface-compatible structure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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