vault

package
v0.0.0-...-c2b5c71 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package vault adds a vault client implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an abstraction to github.com/hashicorp/vault/api

func NewVaultClient

func NewVaultClient() (*Client, error)

NewVaultClient creates a new VaultClient from a VaultConfig

func (*Client) DeleteSecret

func (v *Client) DeleteSecret(secretPath string) (*api.Secret, error)

DeleteSecret do a logical delete on a given Secret Path

func (*Client) ListSecrets

func (v *Client) ListSecrets(secretPath string) (*SecretList, error)

ListSecrets list secrets on a given Secret Path

func (*Client) ReadSecret

func (v *Client) ReadSecret(secretPath string) (*api.Secret, error)

ReadSecret do a logical read on a given Secret Path

func (*Client) WriteSecret

func (v *Client) WriteSecret(secretPath string, secret map[string]interface{}) (*api.Secret, error)

WriteSecret do a logical write on a given Secret Path

type SecretList

type SecretList struct {
	Keys []string
}

SecretList is a list of secrets

Jump to

Keyboard shortcuts

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