template

package
v0.0.0-...-f9c27df Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Delete string

Delete defines a delete template

View Source
var DeleteMethod string

DeleteMethod defines a delete template for interface method

View Source
var Error string

Error defines an error template

View Source
var Field string

Field defines a filed template for types

View Source
var FindOne string

FindOne defines find row by id.

View Source
var FindOneByField string

FindOneByField defines find row by field.

View Source
var FindOneByFieldExtraMethod string

FindOneByFieldExtraMethod defines find row by field with extras.

View Source
var FindOneByFieldMethod string

FindOneByFieldMethod defines find row by field method.

View Source
var FindOneMethod string

FindOneMethod defines find row method.

View Source
var Imports string

Imports defines a import template for model in cache case

View Source
var ImportsNoCache string

ImportsNoCache defines a import template for model in normal case

View Source
var Insert string

Insert defines a template for insert code in model

View Source
var InsertMethod string

InsertMethod defines an interface method template for insert code in model

View Source
var ModelCustom string

ModelCustom defines a template for extension

View Source
var ModelGen = fmt.Sprintf(`%s

package {{.pkg}}
{{.imports}}
{{.vars}}
{{.types}}
{{.new}}
{{.delete}}
{{.find}}
{{.insert}}
{{.update}}
{{.extraMethod}}
{{.tableName}}
`, util.DoNotEditHead)

ModelGen defines a template for model

New defines the template for creating model instance.

View Source
var TableName string

TableName defines a template that generate the tableName method.

Tag defines a tag template text

View Source
var Types string

Types defines a template for types in model.

View Source
var Update string

Update defines a template for generating update codes

View Source
var UpdateMethod string

UpdateMethod defines an interface method template for generating update codes

View Source
var Vars string

Vars defines a template for var block in model

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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