Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod is a test component for running a Postgres docker instance.
func NewPod ¶
NewPod creates a new Postgres test container instance.
It accepts options to configure the image tag, database name, and migrations filesystem.
If migrations are provided, they will be executed after the container is started.
If seed data is provided, it will be executed after the migrations using transactions to ensure operation atomicity.
type PodOption ¶
type PodOption func(*podOptions)
func WithPodDatabaseName ¶
WithPodDatabaseName sets the database name for the Postgres container.
func WithPodImageTag ¶
WithPodImageTag sets the image tag for the Postgres container.
func WithPodMigrationsFS ¶
WithPodMigrationsFS sets the filesystem for migrations.
func WithPodSeedFS ¶
WithPodSeedFS sets the filesystem for seed data.