templates

package
v0.0.7-alpha Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInitCreateTableTemplate

func GetInitCreateTableTemplate(t CreateTableData, base bool) (string, error)

func GetMainTemplate

func GetMainTemplate(t MainData) (string, error)

func GetMigrationTemplate

func GetMigrationTemplate(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
	DriverPath  string
	DriverName  string
}

type MigrationData

type MigrationData struct {
	Package    string
	StructName string
	Name       string

	Type types.MigrationFileType

	Imports []string

	InChange string
	InUp     string
	InDown   string

	CreatedAt string // RFC3339

	PackageDriverName string
	PackageDriverPath string

	UseSchemaImport bool
	UseFmtImport    bool
}

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