gen

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB_TAG = func(col *core.Column) string {
	return fmt.Sprintf("db:\"%s\"", col.Name)
}
View Source
var FORM_TAG = func(col *core.Column) string {
	return fmt.Sprintf("form:\"%s\"", yutil.String.LittleCamelCase(col.Name))
}
View Source
var GORM_CURD_FUNC = func(tab *core.Table) string {
	return yutil.String.TemplateParse(g, yutil.String.BigCamelCase(tab.Name))
}
View Source
var JSON_TAG = func(col *core.Column) string {
	return fmt.Sprintf("json:\"%s\"", yutil.String.LittleCamelCase(col.Name))
}

Functions

This section is empty.

Types

type Gen

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

func NewGen

func NewGen() *Gen

func (*Gen) AddFuncHandlers

func (g *Gen) AddFuncHandlers(funcHandlers ...func(tab *core.Table) string) *Gen

func (*Gen) AddTagHandlers

func (g *Gen) AddTagHandlers(tagHandlers ...func(col *core.Column) string) *Gen

func (*Gen) ToStruct

func (g *Gen) ToStruct(dict map[string]string, tabs ...*core.Table) map[string]string

Jump to

Keyboard shortcuts

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