vault

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoVaultPass occurs when vault pass file or value are empty
	ErrNoVaultPass = errors.New("no vault password file or vault pass provided")

	// ErrNoRootFolder occurs when root folder is blank
	ErrNoRootFolder = errors.New("no root folder")

	// ErrKeyNotFound occurs when key is not found in vault
	ErrKeyNotFound = errors.New("key not found")
)

Functions

func GetVaultPassword

func GetVaultPassword(vaultPath string, vaultPass string) (string, error)

GetVaultPassword is a helper for retrieve vault password value

Types

type App

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

App of package

func New

func New(vaultPassword string, rootFolder string) (*App, error)

New creates new App from Config

func (App) InEnv

func (a App) InEnv(env string, key string) (string, error)

InEnv retrieves given key in environment vault

func (App) InPath

func (a App) InPath(vaultPath string, key string) (string, error)

InPath retrieves given key in vault file

func (App) InString

func (a App) InString(rawVault string, key string) (string, error)

InString retrieves given key in vault file

Jump to

Keyboard shortcuts

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