Categorygithub.com/testcontainers/testcontainers-go/modules/postgres
modulepackage
0.35.0
Repository: https://github.com/testcontainers/testcontainers-go.git
Documentation: pkg.go.dev

# Functions

BasicWaitStrategies is a simple but reliable way to wait for postgres to start.
Run creates an instance of the Postgres container type.
Deprecated: use Run instead RunContainer creates an instance of the Postgres container type.
WithConfigFile sets the config file to be used for the postgres container It will also set the "config_file" parameter to the path of the config file as a command line argument to the container.
WithDatabase sets the initial database to be created when the container starts It can be used to define a different name for the default database that is created when the image is first started.
WithInitScripts sets the init scripts to be run when the container starts.
WithPassword sets the initial password of the user to be created when the container starts It is required for you to use the PostgreSQL image.
WithSnapshotName adds a specific name to the snapshot database created from the main database defined on the container.
WithSQLDriver sets the SQL driver to use for the container.
WithSSLSettings configures the Postgres server to run with the provided CA Chain This will not function if the corresponding postgres conf is not correctly configured.
WithUsername sets the initial username to be created when the container starts It is used in conjunction with WithPassword to set a user and its password.

# Structs

PostgresContainer represents the postgres container type used in the module.

# Type aliases

Option is an option for the Redpanda container.
SnapshotOption is the type for passing options to the snapshot function of the database.