templates

package
v0.0.0-...-5ba6bf8 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInitCreateTableTemplate

func GetInitCreateTableTemplate(t CreateTableData) (string, error)

func GetMainTemplate

func GetMainTemplate(t MainData) (string, error)

func GetMigrationChangeTemplate

func GetMigrationChangeTemplate(direction types.MigrationFileType, t MigrationData) (string, error)

func GetMigrationsTemplate

func GetMigrationsTemplate(t MigrationsData) (string, error)

Types

type CreateTableData

type CreateTableData struct {
	Name string
}

type MainData

type MainData struct {
	PackagePath string
}

type MigrationData

type MigrationData struct {
	Package    string
	StructName string
	Name       string

	InUp   string
	InDown string

	CreatedAt string // RFC3339

	PackageDriverName string
	PackageDriverPath string
}

type MigrationsData

type MigrationsData struct {
	Package    string
	Migrations []string
}

Jump to

Keyboard shortcuts

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