secrets

package
v0.0.0-...-430414e Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID   string
	Data map[string]string
}

Account maps what each account can have.

func (*Account) Get

func (a *Account) Get(field string) (string, error)

Get returns the field within the specified account.

type Client

type Client interface {
	GetAccount(id string) (*Account, error)
	GetSecret(path string) (*vault.Secret, error)
}

Client struct defines what the client has access to.

type VaultClient

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

VaultClient struct defines a new vault client.

func NewClient

func NewClient() (*VaultClient, error)

NewClient will attempt create a new secrets client.

func (*VaultClient) GetAccount

func (c *VaultClient) GetAccount(id string) (*Account, error)

GetAccount will determine which account to use from the specified id.

func (*VaultClient) GetSecret

func (c *VaultClient) GetSecret(path string) (*vault.Secret, error)

GetSecret will read the secret from the given path.

Jump to

Keyboard shortcuts

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