secret

package
v0.0.0-...-c86e8f2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTemplateName = "secret-template"
View Source
const (
	JSONDataAttr = "data"
)
View Source
const TokenPattern = "{{(.*?)}}"

Variables

This section is empty.

Functions

func HasToken

func HasToken(str string) bool

func ReplaceToken

func ReplaceToken(placeholder string, secretValue string, str string) (string, error)

func ReplaceTokens

func ReplaceTokens(secretMap map[string]string, str string) (string, error)

Types

type Vault

type Vault struct {
	Host  string
	Token string
	// contains filtered or unexported fields
}

func (*Vault) OpenVault

func (v *Vault) OpenVault() error

func (*Vault) ReadAllSecrets

func (v *Vault) ReadAllSecrets(secretPath string) (map[string]interface{}, error)

func (*Vault) ReadAllSecretsAsStringMap

func (v *Vault) ReadAllSecretsAsStringMap(secretPath string) (map[string]string, error)

func (*Vault) ReadSecret

func (v *Vault) ReadSecret(key string, secretPath string) (string, error)

func (*Vault) ReadSecrets

func (v *Vault) ReadSecrets(keys []string, secretPath string) (map[string]string, error)

Jump to

Keyboard shortcuts

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