store

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

SupportedBackends is the list of backends we have support and have tested.

Functions

func AvailableBackends

func AvailableBackends() []string

AvailableBackends returns the available backends on this platform

Types

type Store

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

Store is a backend token store

func New

func New(cfg keyring.Config) (*Store, error)

New creates a new Store from a keyring.Config

func (*Store) Erase

func (s *Store) Erase(vaultAddr string) error

Error erases the token for the vaultAddr from the token store. A missing token is not an error. Errors are returned if there are errors communicating with the token store.

func (*Store) Get

func (s *Store) Get(vaultAddr string) (Token, error)

Get retrieves a token for the vaultAddr if one is available in the token store. A missing token is not an error. Errors are returned if there are errors communicating with the token store.

func (*Store) List

func (s *Store) List() ([]string, error)

List retrieves all tokens available in the token store. An empty store is not an error. Errors are returned if there are errors communicating with the token store. func (s *Store) List() ([]Token, error) {

func (*Store) Store

func (s *Store) Store(token Token) error

Store saves the token in the token store, returning any errors that occur while trying to persist the token.

type Token

type Token struct {
	VaultAddr string
	Token     string
	// contains filtered or unexported fields
}

Token represents a Vault token stored in a backend credential store

func (Token) Created

func (t Token) Created() time.Time

func (Token) LastModified

func (t Token) LastModified() time.Time

Jump to

Keyboard shortcuts

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