cmd

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Types

type Config

type Config struct {
	Entityenhancer []*Option `yaml:"entityenhancer,flow"`
}

func (*Config) GetEntityOption

func (c *Config) GetEntityOption(name string) *Option

type EntityFieldSpec

type EntityFieldSpec struct {
	Name     string
	Column   string
	TypeDecl string
}

type EntitySpec added in v0.2.0

type EntitySpec struct {
	Name string

	TokenFset  *token.FileSet // original token fset
	TypeSpec   *ast.StructType
	FieldSpecs []EntityFieldSpec

	PkgHostDir string             // package full path in host in which the entity type is defined
	Imports    []gogen.ImportSpec // imports from the file in which the entity type is defined
}

func (*EntitySpec) FlattenFieldSpecs added in v0.2.0

func (es *EntitySpec) FlattenFieldSpecs(
	modSpec *ModuleSpec,
	pkgDir string,
	tbl string,
	fieldSpecs map[string][]EntityFieldSpec,
	importSpecs map[string][]gogen.ImportSpec,
) (tables []string)

type ModuleSpec added in v0.2.2

type ModuleSpec struct {
	RootModulePath string
	RootDir        string
}

///////////////////////////////////////////////////////////////////////////

func (*ModuleSpec) Init added in v0.2.2

func (m *ModuleSpec) Init() error

func (*ModuleSpec) ResolveModulePath added in v0.2.2

func (m *ModuleSpec) ResolveModulePath(modulePath string) (string, error)

type Option

type Option struct {
	Entity string `yaml:"entity"`
	Table  string `yaml:"table"`
}

must be public for it to be used in loading YAML configuration

Jump to

Keyboard shortcuts

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