azure

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

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

KV provides reading of secrets from Azure Key Vaults.

func NewKeyVault

func NewKeyVault(values map[string]string) (*KV, error)

NewKeyVault returns an Azure Key Vault client. Values contains "URL" and client credentials (or certificates or username/password) as documented in https://docs.microsoft.com/en-us/azure/go/azure-sdk-go-authorization#use-environment-based-authentication During development cli=true can be specified to use `az login` bearer token instead.

func (*KV) Error added in v0.4.2

func (k *KV) Error() error

Error returns the error(s) that have occurred since creation or nil if all went well.

func (*KV) Get

func (k *KV) Get(key, field string) string

Get value addressed by key from vault. If field is empty return the value as-is. Otherwise expect the value to be a JSON object and field a field of the object.

Jump to

Keyboard shortcuts

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