vault

package
v0.0.0-...-4c750bb Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VaultClient

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

func (*VaultClient) Delete

func (vc *VaultClient) Delete(path string) (*api.Secret, error)

func (*VaultClient) Get

func (vc *VaultClient) Get(path string) (*api.Secret, error)

func (*VaultClient) Set

func (vc *VaultClient) Set(path string, data map[string]interface{}) (*api.Secret, error)

type VaultClientInterface

type VaultClientInterface interface {
	Set(path string, data map[string]interface{}) (*api.Secret, error)
	Get(path string) (*api.Secret, error)
	Delete(path string) (*api.Secret, error)
}

func NewVaultClient

func NewVaultClient(vconfig *config.VaultConfig) (VaultClientInterface, error)

TODO: set token needs to happen. also change config to hous all info needed

type VaultDB

type VaultDB struct {
	SecretsPath string
	// contains filtered or unexported fields
}

func (*VaultDB) DeleteSecrets

func (vdb *VaultDB) DeleteSecrets(secretid string) error

func (*VaultDB) GetSecrets

func (vdb *VaultDB) GetSecrets(secretid string) (map[string]interface{}, error)

func (*VaultDB) SetSecrets

func (vdb *VaultDB) SetSecrets(secretid string, secret map[string]interface{}) error

type VaultInterface

type VaultInterface interface {
	GetSecrets(secretid string) (map[string]interface{}, error)
	SetSecrets(secretName string, data map[string]interface{}) error
	DeleteSecrets(secretid string) error
}

func NewVaultDB

func NewVaultDB(client VaultClientInterface, path string) VaultInterface

Jump to

Keyboard shortcuts

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