Documentation ¶
Index ¶
- func New[T any](all ...Option) integration.Bootstrap[T]
- type Container
- type DB
- type Migrator
- type MigratorConfig
- type Option
- func WithContainerImage(image string) Option
- func WithContainerImageEnv(env string) Option
- func WithDBName(dbName string) Option
- func WithDeadline(deadline time.Duration) Option
- func WithFileSystem(fs afero.Fs) Option
- func WithMigrationsPath(path string) Option
- func WithMigrator(migrator Migrator) Option
- func WithPassword(password string) Option
- func WithPoolMaxConnections(maxCons int32) Option
- func WithPoolMaxIdleTime(maxIdleTime time.Duration) Option
- func WithPoolMinConnections(minCons int32) Option
- func WithUserName(userName string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MigratorConfig ¶
type Option ¶
type Option func(*config)
func WithContainerImage ¶
WithContainerImage override initial container image for run postgresql instance, by default using value 'postgres:16'.
func WithContainerImageEnv ¶
WithContainerImageEnv override ENV contained container image name, by default using GROAT_I9N_PG_IMAGE
func WithDBName ¶
WithDBName override the initial database for check correct migrationsPath process by default using value 'test'.
func WithDeadline ¶
WithDeadline override the initial timeout for bootstrap container, by default used 5 seconds deadline.
func WithFileSystem ¶
func WithMigrationsPath ¶
WithMigrationsPath set default path to migrations files
func WithMigrator ¶
WithMigrator override default migration func for pgx pool by default used plain sql files in directory
func WithPassword ¶
WithPassword override the initial password of the user to be created when the container starts as superuser by default using value 'test'.
func WithPoolMaxConnections ¶
WithPoolMaxConnections override default number of pgx pool max connections by default used 8.
func WithPoolMaxIdleTime ¶
WithPoolMaxIdleTime override default number of pgx pool min connections by default used one minute
func WithPoolMinConnections ¶
WithPoolMinConnections override default number of pgx pool min connections by default used 2
func WithUserName ¶
WithUserName override initial username of the user to be created when the container starts. By default, using value 'test'.