vault

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secret

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

Secret is a vault secret

func (*Secret) Body

func (s *Secret) Body() string

Body always returns the empty string

func (*Secret) Bytes

func (s *Secret) Bytes() ([]byte, error)

Bytes returns a list serialized copy of this secret

func (*Secret) Data

func (s *Secret) Data() map[string]interface{}

Data returns the data map. Will never be nil

func (*Secret) DeleteKey

func (s *Secret) DeleteKey(key string) error

DeleteKey removes a single key

func (*Secret) Equal

func (s *Secret) Equal(other store.Secret) bool

Equal returns true if two secrets match

func (*Secret) Password

func (s *Secret) Password() string

Password returns the password

func (*Secret) SetBody

func (s *Secret) SetBody(string) error

SetBody is not supported

func (*Secret) SetPassword

func (s *Secret) SetPassword(pw string)

SetPassword sets the password

func (*Secret) SetValue

func (s *Secret) SetValue(key string, value string) error

SetValue sets a single key

func (*Secret) String

func (s *Secret) String() string

String implement fmt.Stringer

func (*Secret) Value

func (s *Secret) Value(key string) (string, error)

Value returns a single value

type Store

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

Store is a vault backed store

func New

func New(ctx context.Context, alias string, url *backend.URL, cfgdir string, agent *client.Client) (*Store, error)

New creates a new store

func (*Store) AddRecipient

func (s *Store) AddRecipient(context.Context, string) error

AddRecipient is unsupported

func (*Store) Alias

func (s *Store) Alias() string

Alias returns the mount point of this store

func (*Store) Copy

func (s *Store) Copy(ctx context.Context, from string, to string) error

Copy tries to copy one or more entries

func (*Store) Crypto

func (s *Store) Crypto() backend.Crypto

Crypto is unsupported

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, path string) error

Delete removes a single entry

func (*Store) Equals

func (s *Store) Equals(other store.Store) bool

Equals returns true if this and other are the same store

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, name string) bool

Exists checks if a given secret exists

func (*Store) ExportMissingPublicKeys

func (s *Store) ExportMissingPublicKeys(context.Context, []string) (bool, error)

ExportMissingPublicKeys is unsupported

func (*Store) Fsck

func (s *Store) Fsck(ctx context.Context, prefix string) error

Fsck is unsupported

func (*Store) Get

func (s *Store) Get(ctx context.Context, name string) (store.Secret, error)

Get returns a secret

func (*Store) GetRecipients

func (s *Store) GetRecipients(context.Context, string) ([]string, error)

GetRecipients is unsupported

func (*Store) GetRevision

func (s *Store) GetRevision(context.Context, string, string) (store.Secret, error)

GetRevision is unsupported

func (*Store) GetTemplate

func (s *Store) GetTemplate(context.Context, string) ([]byte, error)

GetTemplate is unsupported

func (*Store) GitInit

func (s *Store) GitInit(context.Context, string, string) error

GitInit is unsupported

func (*Store) HasTemplate

func (s *Store) HasTemplate(context.Context, string) bool

HasTemplate is unsupported

func (*Store) ImportMissingPublicKeys

func (s *Store) ImportMissingPublicKeys(context.Context) error

ImportMissingPublicKeys is unsupported

func (*Store) Init

func (s *Store) Init(context.Context, string, ...string) error

Init returns nil

func (*Store) Initialized

func (s *Store) Initialized(ctx context.Context) bool

Initialized returns true if the backend can communicate with Vault

func (*Store) IsDir

func (s *Store) IsDir(ctx context.Context, name string) bool

IsDir returns true if the given name is a dir

func (*Store) List

func (s *Store) List(ctx context.Context, prefix string) ([]string, error)

List returns a list of entries with the given prefix

func (*Store) ListRevisions

func (s *Store) ListRevisions(context.Context, string) ([]backend.Revision, error)

ListRevisions is unsupported

func (*Store) ListTemplates

func (s *Store) ListTemplates(context.Context, string) []string

ListTemplates is unsupported

func (*Store) LookupTemplate

func (s *Store) LookupTemplate(context.Context, string) (string, []byte, bool)

LookupTemplate is unsupported

func (*Store) Move

func (s *Store) Move(ctx context.Context, from string, to string) error

Move moves one or many secrets

func (*Store) Path

func (s *Store) Path() string

Path returns the path component

func (*Store) Prune

func (s *Store) Prune(ctx context.Context, name string) error

Prune removes a directory tree

func (*Store) RCS

func (s *Store) RCS() backend.RCS

RCS is unsupported

func (*Store) Recipients

func (s *Store) Recipients(context.Context) []string

Recipients is unsupported

func (*Store) RemoveRecipient

func (s *Store) RemoveRecipient(context.Context, string) error

RemoveRecipient is unsupported

func (*Store) RemoveTemplate

func (s *Store) RemoveTemplate(context.Context, string) error

RemoveTemplate is unsupported

func (*Store) SaveRecipients

func (s *Store) SaveRecipients(context.Context) error

SaveRecipients is unsupported

func (*Store) Set

func (s *Store) Set(ctx context.Context, name string, sec store.Secret) error

Set writes a secret

func (*Store) SetRecipients added in v1.8.0

func (s *Store) SetRecipients(context.Context, []string) error

SetRecipients is unsupported

func (*Store) SetTemplate

func (s *Store) SetTemplate(context.Context, string, []byte) error

SetTemplate is unsupported

func (*Store) Storage

func (s *Store) Storage() backend.Storage

Storage is unsupported

func (*Store) String

func (s *Store) String() string

String implement fmt.Stringer

func (*Store) TemplateTree

func (s *Store) TemplateTree(context.Context) (tree.Tree, error)

TemplateTree is unsupported

func (*Store) URL

func (s *Store) URL() string

URL returns the full URL

func (*Store) Valid

func (s *Store) Valid() bool

Valid returns true if this store is not nil

Jump to

Keyboard shortcuts

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