bank-vaults: Index | Files

package database

import ""


Package Files


func DynamicSecretDataSource Uses

func DynamicSecretDataSource(dialect string, source string) (dynamicSecretDataSource string, err error)

DynamicSecretDataSource creates a SQL data source but instead of passing username:password in the connection source, one just has to pass in a Vault role name:

ds, err := DynamicSecretDataSource("mysql", "my-role@localhost:3306/dbname?parseTime=True")

MySQL ( and PostgreSQL URI is supported.

The underlying Vault client will make sure that the credential is renewed when it is close to the time of expiry.

Package database imports 5 packages (graph) and is imported by 1 packages. Updated 2019-09-02. Refresh now. Tools for package owners.