Documentation ¶
Index ¶
- type Capability
- type Engines
- type Namespaces
- type Secrets
- type Vault
- func (v *Vault) CreateNamespaceErrorIfNotForced(parentNS, nsName string, force bool) error
- func (v *Vault) DeleteNamespace(parentns, ns string) error
- func (v *Vault) DisableKV2Engine(rootPath string) error
- func (v *Vault) EnableKV1Engine(rootPath string) error
- func (v *Vault) EnableKV2Engine(rootPath string) error
- func (v *Vault) EnableKV2EngineErrorIfNotForced(force bool, path string) error
- func (v *Vault) GetCapabilities(path string) (*Capability, error)
- func (v *Vault) GetEngineDescription(rootPath string) (string, error)
- func (v *Vault) GetEngineTypeVersion(rootPath string) (string, string, error)
- func (v *Vault) IsKVv1(rootPath string) (bool, error)
- func (v *Vault) ListAllKVSecretEngines(ns string) (Engines, error)
- func (v *Vault) ListAllNamespaces(ns string) (Namespaces, error)
- func (v *Vault) ListKVSecretEngines(ns string) ([]string, error)
- func (v *Vault) ListKeys(rootPath, subPath string) ([]string, error)
- func (v *Vault) ListNamespaces(ns string) ([]string, error)
- func (v *Vault) ListRecursive(rootPath, subPath string, skipErrors bool) (*Secrets, error)
- func (v *Vault) ReadSecretMetadata(rootPath, subPath string) (interface{}, error)
- func (v *Vault) ReadSecretVersion(rootPath, subPath string) (interface{}, error)
- func (v *Vault) ReadSecrets(rootPath, subPath string) (map[string]interface{}, error)
- func (v *Vault) WriteSecrets(rootPath, subPath string, secrets map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capability ¶ added in v0.1.1
Capability represents a tokens caps for a specific path.
func (*Capability) String ¶ added in v0.1.1
func (c *Capability) String() string
type Namespaces ¶ added in v0.2.0
Namespaces represents vault hierarchical namespaces.
type Secrets ¶ added in v0.0.11
type Secrets map[string]interface{}
Secrets holds all recursive secrets of a certain path.
type Vault ¶
Vault represents a vault struct used for reading and writing secrets.
func NewDefaultClient ¶ added in v0.2.0
NewDefaultClient returns a new vault client wrapper.
func (*Vault) CreateNamespaceErrorIfNotForced ¶ added in v0.2.0
CreateNamespaceErrorIfNotForced creates a namespace returns no error if force is true.
func (*Vault) DeleteNamespace ¶ added in v0.2.0
DeleteNamespace deletes a namespace.
func (*Vault) DisableKV2Engine ¶ added in v0.0.2
DisableKV2Engine disables the kv2 engine at a specified path.
func (*Vault) EnableKV1Engine ¶ added in v0.6.0
EnableKV1Engine enables the kv1 engine at a specified path.
func (*Vault) EnableKV2Engine ¶ added in v0.0.2
EnableKV2Engine enables the kv2 engine at a specified path.
func (*Vault) EnableKV2EngineErrorIfNotForced ¶ added in v0.1.1
EnableKV2EngineErrorIfNotForced enables a KVv2 Engine and errors if already enabled, unless force is set to true.
func (*Vault) GetCapabilities ¶ added in v0.1.1
func (v *Vault) GetCapabilities(path string) (*Capability, error)
GetCapabilities returns the current authenticated tokens capabilities for a given path.
func (*Vault) GetEngineDescription ¶ added in v0.7.0
GetEngineDescription returns the description of the engine.
func (*Vault) GetEngineTypeVersion ¶ added in v0.7.0
func (*Vault) ListAllKVSecretEngines ¶ added in v0.2.0
ListAllKVSecretEngines returns a list of all visible KV secret engines.
func (*Vault) ListAllNamespaces ¶ added in v0.2.0
func (v *Vault) ListAllNamespaces(ns string) (Namespaces, error)
ListAllNamespaces lists all namespaces of a specified namespace recursively.
func (*Vault) ListKVSecretEngines ¶ added in v0.2.0
ListKVSecretEngines returns a list of all visible KV secret engines.
func (*Vault) ListNamespaces ¶ added in v0.2.0
ListNamespaces list the namespaces of the specified namespace.
func (*Vault) ListRecursive ¶ added in v0.0.2
ListRecursive returns secrets to a path recursive. nolint: cyclop
func (*Vault) ReadSecretMetadata ¶ added in v0.1.2
ReadSecretMetadata read the metadata of the secret.
func (*Vault) ReadSecretVersion ¶ added in v0.1.2
ReadSecretVersion read the version of the secret.
func (*Vault) ReadSecrets ¶
ReadSecrets returns a map with all secrets from a kv engine path.