storage

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedLoadMongoDBConfig  = errors.New("failed to load MongoDB config")
	ErrFailedLoadMySQLConfig    = errors.New("failed to load MySQL config")
	ErrFailedLoadPostgresConfig = errors.New("failed to load PostgreSQL config")
)
View Source
var (
	ErrFailedCreateInstanceMongoDB  = errors.New("failed to create MongoDB instance")
	ErrFailedCreateInstanceMySQL    = errors.New("failed to create MySQL instance")
	ErrFailedCreateInstancePostgres = errors.New("failed to create PostgreSQL instance")
)
View Source
var (
	ErrUnableToGetMongoDBMigrator  = errors.New("unable to get MongoDB migrator")
	ErrUnableToGetMySQLMigrator    = errors.New("unable to get MySQL migrator")
	ErrUnableToGetPostgresMigrator = errors.New("unable to get PostgreSQL migrator")
)
View Source
var (
	ErrMongoDBMigrationsIsNotEnabled  = errors.New("MongoDB migrations is not enabled")
	ErrMySQLMigrationsIsNotEnabled    = errors.New("MySQL migrations is not enabled")
	ErrPostgresMigrationsIsNotEnabled = errors.New("PostgreSQL migrations is not enabled")
)
View Source
var (
	ErrMongoDBFSWasOmitted    = errors.New("unable to migrate MongoDB, target filesystem was omitted")
	ErrMySQLFSWasOmitted      = errors.New("unable to migrate MySQL, target filesystem was omitted")
	ErrPostgreSQLFSWasOmitted = errors.New("unable to migrate PostgreSQL, target filesystem was omitted")
)

Functions

This section is empty.

Types

type Factorier

type Factorier interface {
	Make(ctx context.Context) ([]Storager, error)
}

type Factory

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

func NewFactory

func NewFactory(logger logger.Logger, filesystems Filesystems) *Factory

func (*Factory) Make

func (f *Factory) Make(ctx context.Context) ([]Storager, error)

type Filesystems added in v1.0.0

type Filesystems map[Storage]embed.FS

type Storage added in v1.0.0

type Storage int
const (
	MongoDB Storage = iota
	MySQL
	PostgreSQL
)

type Storager

type Storager interface {
	Name() string
	Up() error
	Down() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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