vault

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package vault implements a koanf.Provider for Hashicorp Vault KV secrets engine and provides it to koanf to be parsed by a koanf.Parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Vault server address
	Address string

	// Vault static token
	Token string

	// Secret data path
	Path string

	// If FlatPaths is true, then the loaded configuration is not split into
	// hierarchical maps based on the delimiter. The keys including the delimiter,
	// eg: app.db.name stays as-is in the confmap.
	FlatPaths bool

	// Delim is the delimiter to use
	// when specifying config key paths, for instance a . for `parent.child.key`
	// or a / for `parent/child/key`.
	Delim string

	// Internal HTTP client timeout
	Timeout time.Duration
}

type Vault

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

func Provider

func Provider(cfg Config) *Vault

Provider returns a provider that takes a Vault config.

func (*Vault) Read

func (r *Vault) Read() (map[string]interface{}, error)

Read fetches the configuration from the source and returns a nested config map.

func (*Vault) ReadBytes

func (r *Vault) ReadBytes() ([]byte, error)

ReadBytes is not supported by the vault provider.

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

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