database

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelPostgres = "postgres"
	LabelPGWeb    = "pgweb"
	LabelRedis    = "redis"
	LabelTesting  = "testing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin added in v0.4.0

type Admin interface {
	CreateDB(ctx context.Context, req *CreateDBRequest) (*CreateDBResponse, error)
	RemoveDB(ctx context.Context, uri string) error
}

type CloseFunc added in v0.3.2

type CloseFunc func(ctx context.Context) error

type CreateDBRequest added in v0.4.0

type CreateDBRequest struct {
	Migrations string
	Fixtures   string

	WithDefaultMigrations bool
}

type CreateDBResponse added in v0.4.0

type CreateDBResponse struct {
	URI string
}

type Database

type Database interface {
	Start(ctx context.Context, detach bool) error
	Stop(ctx context.Context) error
	WaitForStart(ctx context.Context, timeout time.Duration) error
	URI() string
}

type Info

type Info struct {
	ID     string
	Type   string
	Status Status
}

type Status

type Status int
const (
	Running Status = iota
	Stoped
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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