secrets

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SecretFetcher

func SecretFetcher(client *api.Client, config cfg.Config)

SecretFetcher inspects the environment for variables that define secret definitions. The variables are used to guide the SecretFetcher in acquiring and outputting the specified secrets

Types

type LogicalClient added in v1.0.2

type LogicalClient interface {
	Read(string) (*api.Secret, error)
}

LogicalClient is the minimum interface needed to read secrets from the API

type ParallelReader added in v1.0.2

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

ParallelReader allows for processing vault read requests in parallel with n workers

func NewParallelReader added in v1.0.2

func NewParallelReader(ctx context.Context, logicalClient LogicalClient, numWorkers int) *ParallelReader

NewParallelReader returns an instance of ParallelReader and starts n workers

func (*ParallelReader) Close added in v1.0.2

func (pr *ParallelReader) Close()

Close stops the workers

func (*ParallelReader) ReadPaths added in v1.1.5

func (pr *ParallelReader) ReadPaths(def *SecretDefinition) error

ReadPaths processes all of the paths for the provided secret definition

type SecretDefinition added in v1.1.0

type SecretDefinition struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

SecretDefinition is used for representing a secret definition input

func (*SecretDefinition) Walk added in v1.1.0

func (sd *SecretDefinition) Walk(client *api.Client) error

Walk walks a SecretDefintions SecretApex. This is used for iteration of the provided apex path

type SecretResult added in v1.0.2

type SecretResult struct {
	KeyPath string
	Secret  *api.Secret
	Err     error
}

SecretResult is the output of reading a secret

Jump to

Keyboard shortcuts

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