authenticators

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationSettings

type AuthenticationSettings interface {
	// UpdateConfigWithAuth adds authentication parameters
	// to an existing mysql.Config struct.
	UpdateConfigWithAuth(ctx context.Context, config mysql.Config) (*mysql.Config, stackerr.Error)
	// UpdateDialectorSettings updates the dialector settings with
	// override values required by this authentication method
	UpdateDialectorSettings(dialectors.MysqlDialectorInput) (dialectors.MysqlDialectorInput, stackerr.Error)
}

type MysqlConnectionParametersAwsIam

type MysqlConnectionParametersAwsIam struct {
	// The host of the primary cluster
	Host string `json:"host"`
	// The port to connect to the primary cluster
	Port int `json:"port"`
	// The name of the database to connect to
	Schema string `json:"database"`
	// The username to connect with
	Username string `json:"username"`
	// This is the region that the database is in, not
	// that we're connecting from. If this field is not
	// provideed, the connection function will attempt to
	// parse the region from the host name.
	Region string `json:"region"`
	// The AWS config to use for authentication/credentials
	AwsCredentials aws.CredentialsProvider
}

func (*MysqlConnectionParametersAwsIam) UpdateConfigWithAuth

func (params *MysqlConnectionParametersAwsIam) UpdateConfigWithAuth(ctx context.Context, config mysql.Config) (*mysql.Config, stackerr.Error)

func (*MysqlConnectionParametersAwsIam) UpdateDialectorSettings

type MysqlConnectionParametersPassword

type MysqlConnectionParametersPassword struct {
	// The host of the primary cluster
	Host string `json:"host"`
	// The port to connect to the primary cluster
	Port int `json:"port"`
	// The name of the database to connect to
	Schema string `json:"database"`
	// A function for dynamically retrieving the username/password
	GetCredentials func(ctx context.Context) (PasswordCredentials, stackerr.Error)
}

func (*MysqlConnectionParametersPassword) UpdateConfigWithAuth

func (params *MysqlConnectionParametersPassword) UpdateConfigWithAuth(ctx context.Context, config mysql.Config) (*mysql.Config, stackerr.Error)

func (*MysqlConnectionParametersPassword) UpdateDialectorSettings

type PasswordCredentials

type PasswordCredentials struct {
	// The username to connect to the database with
	Username string `json:"username"`
	// The password to connect to the database with
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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