models

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomTime added in v0.0.5

type CustomTime struct {
	time.Time
}

func (CustomTime) MarshalJson added in v0.0.5

func (c CustomTime) MarshalJson() ([]byte, error)

func (*CustomTime) Scan added in v0.0.5

func (c *CustomTime) Scan(value interface{}) error

func (CustomTime) Value added in v0.0.5

func (c CustomTime) Value() (driver.Value, error)

type MigrationModel

type MigrationModel struct {
	Id           uint32 `gorm:"primaryKey"`
	Rank         int
	Type         string
	Version      Version
	Description  string
	RegisteredOn CustomTime  `gorm:"type:datetime"`
	ExecutedOn   *CustomTime `gorm:"type:datetime"`
	Checksum     string
	State        MigrationState
}

func (MigrationModel) TableName

func (v MigrationModel) TableName() string

type MigrationState

type MigrationState string
const (
	StateSuccess    MigrationState = "success"
	StateFailure    MigrationState = "failure"
	StateUndone     MigrationState = "undone"
	StateRegistered MigrationState = "registered"
	StateSkipped    MigrationState = "skipped"
	StateNotFound   MigrationState = "not found"
)

type Version added in v0.1.5

type Version struct {
	Major      int
	Minor      int
	Patch      int
	PreRelease int
}

func ParseVersion added in v0.1.5

func ParseVersion(versionString string) (Version, error)

func (Version) Equals added in v0.1.5

func (v Version) Equals(version Version) bool

func (Version) LessOrEqual added in v0.1.5

func (v Version) LessOrEqual(version Version) bool

func (Version) LessThan added in v0.1.5

func (v Version) LessThan(version Version) bool

func (Version) MoreOrEqual added in v0.1.5

func (v Version) MoreOrEqual(version Version) bool

func (Version) MoreThan added in v0.1.5

func (v Version) MoreThan(version Version) bool

func (*Version) Scan added in v0.1.5

func (v *Version) Scan(value interface{}) error

func (Version) String added in v0.1.5

func (v Version) String() string

func (Version) Value added in v0.1.5

func (v Version) Value() (driver.Value, error)

type VersionModel

type VersionModel struct {
	Version Version
}

func (VersionModel) TableName

func (v VersionModel) TableName() string

Jump to

Keyboard shortcuts

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