vault

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	APIClient *vaultApi.Client
	Config    config.Vault
	Token     string    // Store the token
	TokenTTL  time.Time // Store the token expiry time
}
var (
	GlobalClient *Client
)

func InitClient

func InitClient(cfg config.Vault, logger *logrus.Logger) (*Client, error)

func (*Client) DeleteSecretMetadataWithAppRole

func (client *Client) DeleteSecretMetadataWithAppRole(secretPath string) error

DeleteSecretMetadataWithAppRole permanently deletes the metadata and all versions of a secret.

func (*Client) DeleteSecretWithAppRole

func (client *Client) DeleteSecretWithAppRole(secretPath string) error

Delete a key-value secret (kv-v2) after authenticating via AppRole.

func (*Client) DestroySecretWithAppRole

func (client *Client) DestroySecretWithAppRole(secretPath string) error

Delete permanently a key-value secret (kv-v2) after authenticating via AppRole.

func (*Client) GetSecretWithAppRole

func (client *Client) GetSecretWithAppRole(secretPath string) (map[string]interface{}, error)

Fetches a key-value secret (kv-v2) after authenticating via AppRole.

func (*Client) ListSecretWithAppRole

func (client *Client) ListSecretWithAppRole(secretPath string) ([]string, error)

List a key-value secret (kv-v2) after authenticating via AppRole.

func (*Client) PutSecretWithAppRole

func (client *Client) PutSecretWithAppRole(secretPath string, data map[string]interface{}) error

Put a key-value secret (kv-v2) after authenticating via AppRole.

Jump to

Keyboard shortcuts

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