types

package
v0.0.13-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Driver

type Driver string
const (
	DriverUnknown  Driver = ""
	DriverPostgres Driver = "postgres"
	DriverSQLite   Driver = "sqlite"
)

func GetDriver

func GetDriver(dsn string) Driver

func (Driver) PackageName

func (d Driver) PackageName() string

func (Driver) PackagePath

func (d Driver) PackagePath() string

func (Driver) PackageSchemaPath

func (d Driver) PackageSchemaPath() string

func (Driver) String

func (d Driver) String() string

func (Driver) StructName

func (d Driver) StructName() string

type MIGConfig

type MIGConfig struct {
	RootDSN            string `yaml:"root_dsn"`
	JSON               bool   `yaml:"json"`
	MigrationFolder    string `yaml:"migration_folder"`
	Package            string `yaml:"package"`
	SchemaVersionTable string `yaml:"schema_version_table"`
	ShellPath          string `yaml:"shell_path"`
	Verbose            bool   `yaml:"verbose"`
	MIGFolderPath      string `yaml:"mig_folder"`
}

type MigrationDirection

type MigrationDirection string
const (
	MigrationDirectionUp   MigrationDirection = "UP"
	MigrationDirectionDown MigrationDirection = "DOWN"

	// MigrationDirectionNotReversible is used to indicate that the migration is reversed or is in a down type.
	// This is used to avoid infinite loop when executing a migration.
	// This is not a real migration direction. DO NOT ADD IT TO MigrationDirectionValues.
	MigrationDirectionNotReversible MigrationDirection = "NOT_REVERSIBLE"
)

func (MigrationDirection) IsValid

func (m MigrationDirection) IsValid() bool

func (MigrationDirection) String

func (m MigrationDirection) String() string

type MigrationFileType

type MigrationFileType string
const (
	MigrationFileTypeChange  MigrationFileType = "change"
	MigrationFileTypeClassic MigrationFileType = "classic"
	MigrationFileTypeSQL     MigrationFileType = "sql"
)

func (MigrationFileType) IsValid

func (m MigrationFileType) IsValid() bool

func (MigrationFileType) String

func (m MigrationFileType) String() string

Jump to

Keyboard shortcuts

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