Documentation
¶
Index ¶
- func ConnString(cfg Config) string
- func Connect(ctx context.Context, cfg Config) (*pgxpool.Pool, error)
- func ConnstrWithDatabase(connstr, database string) (string, error)
- func SanitizeDatabaseName(schema string) string
- func StatusCheck(ctx context.Context, db *pgxpool.Pool) error
- type Config
- type DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnString ¶ added in v0.1.2
ConnString translates config to a db connection string.
func Connect ¶ added in v0.1.2
Connect establishes a database connection based on the configuration.
func ConnstrWithDatabase ¶ added in v0.1.5
ConnstrWithDatabase changes the main database in the connection string.
func SanitizeDatabaseName ¶ added in v0.1.5
SanitizeDatabaseName ensures that the database name is a valid postgres identifier.
Types ¶
Click to show internal directories.
Click to hide internal directories.