package
0.0.0-20250306163500-5f3bb2705e1f
Repository: https://github.com/versoriumx/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.
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.
TryEnsureDatabase will connect to the "postgres" database and attempt to create the database named in the pool's configuration.