pgengine

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pgengine holds the connection setup the postgresql and alloydb plugins share, so their engines connect the same way.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IAMUser

func IAMUser(email string) string

IAMUser returns the database user name Cloud SQL and AlloyDB give an IAM principal: a service account's email without its ".gserviceaccount.com" suffix, and any other email unchanged.

func PoolConfig

func PoolConfig(user, password, database string, iam bool) (*pgxpool.Config, error)

PoolConfig returns the pool configuration for a connection that a Cloud SQL or AlloyDB connector dials. The credentials go into the config's fields rather than a connection string, so a value with spaces or quotes reaches the server intact. TLS is off at this layer because the connector encrypts the connection itself, and an IAM login sends no password because the connector authenticates it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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