shared

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration

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

func (*Migration) Down

func (m *Migration) Down(db *sql.DB, migrate func(MigrationInterface) error) error

func (*Migration) DownSQL

func (m *Migration) DownSQL() string

func (*Migration) Name

func (m *Migration) Name() string

func (*Migration) Up

func (m *Migration) Up(db *sql.DB, migrate func(MigrationInterface) error) error

func (*Migration) UpSQL

func (m *Migration) UpSQL() string

type MigrationInterface

type MigrationInterface interface {
	Name() string
	UpSQL() string
	DownSQL() string
	Up(*sql.DB, func(MigrationInterface) error) error
	Down(*sql.DB, func(MigrationInterface) error) error
}

func NewMigration

func NewMigration(name, upSql, downSql string, up, down func(*sql.DB) error) MigrationInterface

Jump to

Keyboard shortcuts

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