vaultclient

package
v0.3.11-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecret deprecated

func GetSecret(secretPath string) (map[string]interface{}, error)

Deprecated: Use the VaultClient method instead

func GetSecretValue deprecated

func GetSecretValue(secretPath string, key string) (string, error)

Deprecated: Use the VaultClient method instead

Types

type KubernetesVaultCredsHelper added in v0.0.12

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

func (KubernetesVaultCredsHelper) GetToken added in v0.0.12

func (kvch KubernetesVaultCredsHelper) GetToken() string

func (*KubernetesVaultCredsHelper) Login added in v0.0.12

func (kvch *KubernetesVaultCredsHelper) Login(vc *VaultClient) error

type StaticVaultCredsHelper added in v0.0.12

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

func (StaticVaultCredsHelper) GetToken added in v0.0.12

func (sch StaticVaultCredsHelper) GetToken() string

func (*StaticVaultCredsHelper) Login added in v0.0.12

func (sch *StaticVaultCredsHelper) Login(vc *VaultClient) error

type VaultClient

type VaultClient struct {
	Context context.Context
	Client  *vault.Client
	Url     string
}

func New added in v0.0.12

func New(ctx context.Context, credsHelper VaultCredsHelper, url string) (*VaultClient, error)

creates a new vault client

func NewVaultClient

func NewVaultClient(role string, url string) *VaultClient

This is a opinionated way to create a new vault client Might be better to migrate to New() a factory function that takes a VaultCredsHelper and a url as arguments. Migth deprecate this function in the future

func (VaultClient) CheckHealth

func (rc VaultClient) CheckHealth() []health.Check

func (VaultClient) GetSecret added in v0.0.12

func (vc VaultClient) GetSecret(secretPath string) (map[string]interface{}, error)

func (VaultClient) GetSecretValue added in v0.0.12

func (vc VaultClient) GetSecretValue(secretPath string, key string) (string, error)

func (VaultClient) Ping

func (v VaultClient) Ping() (bool, error)

func (VaultClient) SetSecret added in v0.0.12

func (vc VaultClient) SetSecret(secretPath string, value []byte) (bool, error)

type VaultCredsHelper added in v0.0.12

type VaultCredsHelper interface {
	GetToken() string
	Login(vc *VaultClient) error
}

func NewKubernetesVaultCredsHelper added in v0.0.12

func NewKubernetesVaultCredsHelper(vaultRole string, tokenRenewThreshold int32) VaultCredsHelper

func NewStaticVaultCredsHelper added in v0.0.12

func NewStaticVaultCredsHelper(token string) VaultCredsHelper

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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