codegen

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(schemaDB *schema.Database)

func RegisterTemplate

func RegisterTemplate(t Template)

Types

type DatabaseGenerator

type DatabaseGenerator interface {
	Template
	FileName(string) string
	GenerateDatabase(db *model2.Database, f io.Writer, importPath string) error
}

type EnumGenerator

type EnumGenerator interface {
	Template
	FileName(*model2.Enum) string
	GenerateEnum(table *model2.Enum, f io.Writer, importPath string) error
}

type TableGenerator

type TableGenerator interface {
	Template
	FileName(*model2.Table) string
	GenerateTable(table *model2.Table, f io.Writer, importPath string) error
}

type Template

type Template interface {
	Overwrite() bool
}

Jump to

Keyboard shortcuts

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