Documentation ¶
Index ¶
- func ManagedConnection(opts ...RecipeOption) *connection.ConnectionPG
- func PgCreateDatabase(t *testing.T, psqlExecutable []string, connString string, ...)
- func PgDropDatabase(t *testing.T, psqlExecutable []string, connString string, database string)
- func PgDump(t *testing.T, pgDumpExecutable []string, psqlExecutable []string, ...) string
- func PostgresContainer(opts ...ContainerOption) (*tc_postgres.PostgresContainer, error)
- func RecipeSource(opts ...RecipeOption) *postgres.PgSource
- func RecipeTarget(opts ...RecipeOption) *postgres.PgDestination
- type ContainerOption
- type ContainerParams
- type RecipeOption
- func WithConnection(connID string) RecipeOption
- func WithDBTables(tables ...string) RecipeOption
- func WithEdit(f func(pg *postgres.PgSource)) RecipeOption
- func WithFiles(files ...string) RecipeOption
- func WithInitDir(dir string) RecipeOption
- func WithInitFiles(files ...string) RecipeOption
- func WithPrefix(prefix string) RecipeOption
- func WithoutPgDump() RecipeOption
- type RecipeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManagedConnection ¶
func ManagedConnection(opts ...RecipeOption) *connection.ConnectionPG
func PgCreateDatabase ¶
func PgDropDatabase ¶
func PgDump ¶
func PgDump(t *testing.T, pgDumpExecutable []string, psqlExecutable []string, connString string, tableLikePattern string) string
PgDump dumps all tables in the PostgreSQL database specified in the connString. Use the specified pgDumpExecutable for dumping schemas, and the given psqlExecutable for dumping table data. You can specify tableLikePattern to filter tables in the dump, for example, 'public.my%table'
func PostgresContainer ¶
func PostgresContainer(opts ...ContainerOption) (*tc_postgres.PostgresContainer, error)
func RecipeSource ¶
func RecipeSource(opts ...RecipeOption) *postgres.PgSource
func RecipeTarget ¶
func RecipeTarget(opts ...RecipeOption) *postgres.PgDestination
Types ¶
type ContainerOption ¶
type ContainerOption func(opt *ContainerParams)
type ContainerParams ¶
type ContainerParams struct {
// contains filtered or unexported fields
}
type RecipeOption ¶
type RecipeOption func(pg *RecipeParams)
func WithConnection ¶
func WithConnection(connID string) RecipeOption
func WithDBTables ¶
func WithDBTables(tables ...string) RecipeOption
func WithEdit ¶
func WithEdit(f func(pg *postgres.PgSource)) RecipeOption
func WithFiles ¶
func WithFiles(files ...string) RecipeOption
func WithInitDir ¶
func WithInitDir(dir string) RecipeOption
func WithInitFiles ¶
func WithInitFiles(files ...string) RecipeOption
func WithPrefix ¶
func WithPrefix(prefix string) RecipeOption
func WithoutPgDump ¶
func WithoutPgDump() RecipeOption
type RecipeParams ¶
type RecipeParams struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.