vaultx

package
v0.0.0-...-51d8ade Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package vaultx Noble vault reader

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitVault

func InitVault(cfg *VaultCfg) error

InitVault required for using "vault:<key>"

func SetLogger

func SetLogger(l *logrus.Entry) bool

SetLogger set logrus entry as log source

func SetSecretPath

func SetSecretPath(path string)

SetSecretPath set vault k/v path. Used secret/data by default

func SetServerAddress

func SetServerAddress(addr string)

SetServerAddress set vault server address

func SetToken

func SetToken(token string)

SetToken set vault token to login

func SetTokenEnv

func SetTokenEnv(envName string) bool

SetTokenEnv set vault token to login from environment var

func SetTokenTTL

func SetTokenTTL(ttl int64)

SetTokenTTL token time to live in hours

Types

type KeyReader

type KeyReader struct {
}

KeyReader type implements noble.SecretStorage

func (*KeyReader) Clone

func (r *KeyReader) Clone() noble.SecretStorage

Clone returns new empty instance of KeyReader

func (*KeyReader) Read

func (r *KeyReader) Read(key string) (string, error)

type VaultCfg

type VaultCfg struct {
	ServerAddress string //vault server address
	SecretPath    string
	// Timeout and Refresh Timestamp in hours
	TokenTTLHours         int64
	TokenRefreshTimeHours int64
	Token                 string
}

VaultCfg vault config

Jump to

Keyboard shortcuts

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