Documentation ¶
Index ¶
Constants ¶
View Source
const ( VaultAddressKey string = "USER_VAULT_ADDRESS" VaultSecretKey string = "USER_VAULT_TOKEN" VaultTimeoutKey string = "USER_VAULT_TIMEOUT" VaultPathKey string = "USER_VAULT_PATH" VaultConnectorPortKey string = "PORT_VAULT_CONNECTOR" DefaultTimeout string = "180" DefaultPort string = "50083" //synched with vault_connector.yaml )
Variables ¶
This section is empty.
Functions ¶
func GetEnvWithDefault ¶
Types ¶
type VaultConfig ¶
type VaultConnection ¶
type VaultConnection struct { Config VaultConfig Client *api.Client }
func CreateVaultConnection ¶
func CreateVaultConnection() VaultConnection
func (*VaultConnection) AddToVault ¶
func (vlt *VaultConnection) AddToVault(innerVaultPath string, credentialsMap map[string]interface{}) (string, error)
AddToVault adds crededentialsMap to vault at the path given by innerVaultPath
func (*VaultConnection) GetFromVault ¶
func (vlt *VaultConnection) GetFromVault(vaultPathKey string, innerVaultPath string) (string, error)
GetFromVault returns the credentials from vault as json
Click to show internal directories.
Click to hide internal directories.