api

package
v0.0.0-...-3747bb0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvAutoComplete                        = "AUTO_COMPLETE"
	EnvAutoCompleteFilePrefix              = "AUTO_COMPLETE_FILE_PREFIX"
	EnvAutoCompleteVaultKVPathPrefix       = "AUTO_COMPLETE_VAULT_KV_PATH_PREFIX"
	EnvAutoCompleteAdditionalSuffixFilters = "AUTO_COMPLETE_ADDITIONAL_SUFFIX_FILTERS"
	EnvAutoCompletePrune                   = "AUTO_COMPLETE_PRUNE"
	EnvFlatten                             = "FLATTEN"
	EnvVaultKvMount                        = "VAULT_KV_MOUNT"
	EnvVaultKvPath                         = "VAULT_KV_PATH"
	EnvVaultKvVersion                      = "VAULT_KV_VERSION"
	EnvVaultAddr                           = "VAULT_ADDR"
	EnvVaultToken                          = "VAULT_TOKEN"
	EnvVaultAuthMethod                     = "VAULT_AUTH_METHOD"
	EnvVaultAuthKubernetesRole             = "VAULT_AUTH_K8S_ROLE"
	EnvVaultAuthKubernetesMountPath        = "VAULT_AUTH_K8S_MOUNT_PATH"
	EnvVaultTlsSkipVerify                  = "VAULT_TLS_SKIP_VERIFY"
)

Variables

This section is empty.

Functions

func AuthKubernetes

func AuthKubernetes() (token string, accessor string, err error)

func AuthToken

func AuthToken() (token string, err error)

func AutoCompleteGetFiles

func AutoCompleteGetFiles(directories []string) (*[]ExtendedFileInfo, error)

func AutoCompleteInit

func AutoCompleteInit() (err error)

func EndsWithSlashIfNotEmpty

func EndsWithSlashIfNotEmpty(s string) (r string)

func FlattenMap

func FlattenMap(data map[string]interface{}) (flattened map[string]interface{}, err error)

func GetVaultKVPath

func GetVaultKVPath(e *ExtendedFileInfo) (path string, err error)

func Mapper

func Mapper(i interface{}) interface{}

func ReadJwtToken

func ReadJwtToken(path string) (string, error)

func Routine

func Routine(i interface{}, kvMount string, kvVersion int, kvPath string, c *vault.Client) (err error)

func TrimQuotes

func TrimQuotes(s string) (r string)

func VaultClientInit

func VaultClientInit() (c *vault.Client, err error)

func VaultDeleteSecret

func VaultDeleteSecret(kvMount string, kvPath string, c *vault.Client)

func VaultGetCurrentSecretList

func VaultGetCurrentSecretList(kvMount string, c *vault.Client) map[string]int

func VaultKVIdempotentWrite

func VaultKVIdempotentWrite(secret interface{}, kvMount string, kvVersion int, kvPath string, c *vault.Client) (err error)

func VaultSecretDataIsDifferent

func VaultSecretDataIsDifferent(newData map[string]interface{}, vaultSecret *vault.Secret, kvVersion int) (b bool, err error)

Types

type ExtendedFileInfo

type ExtendedFileInfo struct {
	os.FileInfo
	FilePath    string
	VaultKVPath string
}

Jump to

Keyboard shortcuts

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