postgres

package
v0.0.0-...-2680af6 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	// contains filtered or unexported fields
}

func Run

func Run(ctx context.Context, options ...Option) (*Container, error)

func (*Container) DropAllTables

func (c *Container) DropAllTables(ctx context.Context) error

func (*Container) GetConnString

func (c *Container) GetConnString() string

func (*Container) Migrate

func (c *Container) Migrate(ctx context.Context, sourceURL string) error

Migrate migrates with directory. E.g: file://path/to/root/internal/migration/todo

func (*Container) MigrateFS

func (c *Container) MigrateFS(ctx context.Context, fs fs.FS, path string) error

MigrateFS migrates with embedded files

func (*Container) OpenPGXDB

func (c *Container) OpenPGXDB(ctx context.Context) (*pgxpool.Pool, error)

func (*Container) Seed

func (c *Container) Seed(ctx context.Context, sourceURL string) error

func (*Container) Terminate

func (c *Container) Terminate(ctx context.Context) error

func (*Container) TruncateAllTables

func (c *Container) TruncateAllTables(ctx context.Context) error

type Option

type Option func(*Container)

func WithDBName

func WithDBName(dbname string) Option

func WithDBPassword

func WithDBPassword(dbpassword string) Option

func WithDBUser

func WithDBUser(dbuser string) Option

Jump to

Keyboard shortcuts

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