Documentation ¶
Index ¶
- func GetSecret(secretPath string) (map[string]interface{}, error)deprecated
- func GetSecretValue(secretPath string, key string) (string, error)deprecated
- type KubernetesVaultCredsHelper
- type StaticVaultCredsHelper
- type VaultClient
- func (rc VaultClient) CheckHealth() []health.Check
- func (vc VaultClient) GetSecret(secretPath string) (map[string]interface{}, error)
- func (vc VaultClient) GetSecretValue(secretPath string, key string) (string, error)
- func (v VaultClient) Ping() (bool, error)
- func (vc VaultClient) SetSecret(secretPath string, value []byte) (bool, error)
- type VaultCredsHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSecretValue
deprecated
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 ¶
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)
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
Click to show internal directories.
Click to hide internal directories.