vault

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVaultKeyEnv      = "FLOW_VAULT_KEY"
	DefaultVaultIdentityEnv = "FLOW_VAULT_IDENTITY"
	LegacyVaultReservedName = "legacy"
)
View Source
const DemoVaultReservedName = "demo"

Variables

This section is empty.

Functions

func CacheDirectory

func CacheDirectory(subPath string) string

func ConfigFilePath

func ConfigFilePath(vaultName string) string

func NewAES256Vault

func NewAES256Vault(logger io.Logger, name, storagePath, keyEnv, keyFile, logLevel string)

func NewAgeVault

func NewAgeVault(logger io.Logger, name, storagePath, recipients, identityKey, identityFile string)

func RefToParts

func RefToParts(ref SecretRef) (vaultName, key string, err error)

func ValidateIdentifier

func ValidateIdentifier(reference string) error

func VaultFromName

func VaultFromName(name string) (*VaultConfig, Vault, error)

Types

type Secret

type Secret interface {
	vault.Secret
	types.Entity

	Ref() SecretRef
	AsPlaintext() Secret
	AsObfuscatedText() Secret
}

func NewSecret

func NewSecret(vaultName, key string, value vault.Secret) (Secret, error)

type SecretList

type SecretList []Secret

func NewSecretList

func NewSecretList(vaultName string, v Vault) (SecretList, error)

func (SecretList) AsObfuscatedText

func (l SecretList) AsObfuscatedText() SecretList

func (SecretList) AsPlaintext

func (l SecretList) AsPlaintext() SecretList

func (SecretList) FindByName

func (l SecretList) FindByName(name string) Secret

func (SecretList) Items

func (l SecretList) Items() []*types.EntityInfo

func (SecretList) JSON

func (l SecretList) JSON() (string, error)

func (SecretList) JSONWithMode

func (l SecretList) JSONWithMode(plaintext bool) (string, error)

JSONWithMode allows explicit control over plaintext vs obfuscated serialization

func (SecretList) Plural

func (l SecretList) Plural() string

func (SecretList) Singular

func (l SecretList) Singular() string

func (SecretList) YAML

func (l SecretList) YAML() (string, error)

func (SecretList) YAMLWithMode

func (l SecretList) YAMLWithMode(plaintext bool) (string, error)

YAMLWithMode allows explicit control over plaintext vs obfuscated serialization

type SecretRef

type SecretRef string

func (SecretRef) Key

func (r SecretRef) Key() string

func (SecretRef) Vault

func (r SecretRef) Vault() string

type SecretValue

type SecretValue = vault.SecretValue

func NewSecretValue

func NewSecretValue(value []byte) *SecretValue

type Vault

type Vault = vault.Provider

type VaultConfig

type VaultConfig = vault.Config

Jump to

Keyboard shortcuts

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