rdsiam

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package rdsiam generates short-lived Amazon RDS IAM database auth tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider generates tokens from one resolved AWS SDK configuration.

func New

func New(ctx context.Context) (*Provider, error)

New loads the default AWS SDK region and credential chain and verifies that credentials are resolvable. The resolved configuration is reused, but every call to Token generates a new database authentication token.

func (*Provider) Token

func (p *Provider) Token(
	ctx context.Context,
	endpoint string,
	user string,
) (string, error)

Token generates a fresh RDS IAM authentication token for endpoint and user.

type TokenProvider

type TokenProvider interface {
	Token(ctx context.Context, endpoint, user string) (string, error)
}

TokenProvider generates an authentication token for one database connection. Implementations must not cache tokens.

Jump to

Keyboard shortcuts

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