package
18.0.0-dev.vnet-windows.4+incompatible
Repository: https://github.com/gravitational/teleport.git
Documentation: pkg.go.dev
# Functions
AzureBeforeConnect will return a pgx BeforeConnect function suitable for Azure AD authentication.
ConnectPostgres will open a single connection to the "postgres" database in the database cluster specified in poolConfig.
GCPCloudSQLDialFunc creates a pgconn.DialFunc to use cloudsqlconn for "automatic" IAM database authentication.
IsCode checks if the passed error is a Postgres error with the given code.
Retry runs the closure potentially more than once, retrying quickly on serialization or deadlock errors, and backing off more on other retryable errors.
RetryIdempotent runs the closure potentially more than once, retrying quickly on serialization or deadlock errors, and backing off more on other errors.
RetryTx runs a closure like [Retry] or [RetryIdempotent], wrapped in [pgx.BeginTxFunc].
SetupAndMigrate sets up the database schema, applying the migrations in the schemas slice in order, starting from the first non-applied one.
SetupAndMigrateDynamic sets up the database schema, applying the migrations in the schemas slice in order, starting from the first non-applied one.
TryEnsureDatabase will connect to the "postgres" database and attempt to create the database named in the pool's configuration.
# Constants
AzureADAuth gets a connection token from Azure and uses it as the password when connecting.
GCPCloudSQLIAMAuth fetches an access token and uses it as password when connecting to GCP Cloud SQL PostgreSQL.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StaticAuth uses the static credentials as defined in the connection string.
# Structs
AuthConfig contains common auth configs.
# Type aliases
AuthMode determines if we should use some environment-specific authentication mechanism or credentials.
GCPIPType specifies the type of IP used for GCP connection.
SchemasBuilder returns the desired table schemas based on the postgres connection.