vault

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader added in v1.0.0

type Reader interface {
	Read(path string) ([]byte, error)
}

Reader meant to be used by func that want to read in Vault

type Vault

type Vault struct {
	Client     *vaultapi.Client
	RenewToken bool
}

Vault represents a means for interacting with a remote Vault instance (unsealed and pre-authenticated) to read and write secrets.

func NewClient

func NewClient(address string, proxy string, renew bool) (*Vault, error)

NewClient creates a new vault client

func (*Vault) Delete added in v1.0.0

func (v *Vault) Delete(path string) error

Delete a secret in vault

func (*Vault) Read

func (v *Vault) Read(path string) ([]byte, error)

Read reads data from vault

func (*Vault) Renewer

func (v *Vault) Renewer(secret *vaultapi.Secret)

Renewer creates a secret renewer

func (*Vault) SelfRenew added in v1.0.0

func (v *Vault) SelfRenew() error

SelfRenew renews the vault client token

func (*Vault) SelfRenewer added in v1.0.0

func (v *Vault) SelfRenewer()

SelfRenewer starts a goroutine that periodically renew the vault client token

func (*Vault) Write

func (v *Vault) Write(path string, data map[string]interface{}) error

Write writes a secret in vault

type Writer added in v1.0.0

type Writer interface {
	Write(path string, data map[string]interface{}) error
}

Writer meant to be used by func that want to write in Vault

Jump to

Keyboard shortcuts

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