testing

package
v1.13.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     int
	Database string
	Username string
	Password string
}

type Database

type Database interface {
	// Build the database.
	Build() error
	// Config gets the database configuration.
	Config() Config
	// Clear clears the database.
	Clear() error
	// Image gets the database image.
	Image(Image)
	// Seed runs the database seeds.
	Seed(seeds ...seeder.Seeder)
}

type DatabaseDriver

type DatabaseDriver interface {
	// Config gets the database configuration.
	Config(resource *dockertest.Resource) Config
	// Clear clears the database.
	Clear(pool *dockertest.Pool, resource *dockertest.Resource) error
	// Name gets the database driver name.
	Name() orm.Driver
	// Image gets the database image.
	Image() *dockertest.RunOptions
}

type Docker

type Docker interface {
	// Database get a database connection instance.
	Database(connection ...string) (Database, error)
}

type Image

type Image struct {
	Env        []string
	Repository string
	Tag        string
	// unit: second
	Timeout uint
}

type Testing

type Testing interface {
	// Docker get the Docker instance.
	Docker() Docker
}

Jump to

Keyboard shortcuts

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