db

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package db contains all the functionality necessary for interacting with Vault's database secrets engine.

See https://www.vaultproject.io/docs/secrets/databases for more information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	API          api.API
	TokenManager auth.TokenManager
}

Client is the gateway into Vault's database secrets engine.

func (*Client) GenerateCredentials

func (db *Client) GenerateCredentials(ctx context.Context, role string) (Credentials, error)

GenerateCredentials generates a new set of dynamic credentials based on the role.

type Credentials

type Credentials struct {
	Username string
	Password string
	Lease    Lease
}

Credentials contains secret information for connecting to a database.

type Lease added in v0.0.4

type Lease struct {
	ID         string
	Renewable  bool
	Expiration time.Duration
}

Lease contains information about how long the secret is valid.

Jump to

Keyboard shortcuts

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