vault

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataPath

func DataPath(key api.DataKey) string

func DataSubPath

func DataSubPath(key api.DataKey, subPath string) string

func KubernetesRolePath

func KubernetesRolePath(key Key) string

func PKIPath

func PKIPath(key Key) string

func PKISubPath

func PKISubPath(key Key, subPath string) string

func PolicyName

func PolicyName(key Key, policy string) string

func RoleName

func RoleName(key Key) string

Types

type Client

type Client struct {
	*vapi.Client
	ClientOptions
}

func New

func New(opts ClientOptions) (*Client, error)

func (*Client) CreateDataStore

func (c *Client) CreateDataStore(ctx context.Context, namespace string) error

func (*Client) DeleteData

func (c *Client) DeleteData(ctx context.Context, key api.DataKey) error

func (*Client) GetData

func (c *Client) GetData(ctx context.Context, key api.DataKey, data *api.Data) error

func (*Client) PutData

func (c *Client) PutData(ctx context.Context, key api.DataKey, data *api.Data) error

type ClientOptions

type ClientOptions struct {
	Instance string
	Role     string
	URL      string
	// CACert is the path to a PEM-encoded CA cert file to use to verify the
	// Vault server SSL certificate. It takes precedence over CACertBytes.
	CACert string
	// CACertBytes is a PEM-encoded certificate or bundle.
	CACertBytes []byte
	// AutoRenew indicates that the Vault token should automatically be renewed
	// to ensure it does not expire.
	AutoRenew bool
}

type Key

type Key struct {
	Instance  string
	Namespace string
	Component string
}

type VaultData

type VaultData struct {
	Data any `json:"data"`
}

type VaultSecret

type VaultSecret struct {
	Data *VaultData `json:"data"`
}

Jump to

Keyboard shortcuts

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