Documentation ¶
Index ¶
- Constants
- func AddStruct(name string) []byte
- func Convert(c ConvertInterface, filename string)
- func ConvertByTable(c ConvertInterface, tableName string)
- func ConvertParams(v interface{}, escaper string) string
- func GetDecl() *ast.GenDecl
- func Insert(values interface{}, field ...string) (string, []interface{})
- func NewLine() byte
- func StructEnd(name string) []byte
- func TableName(name string, id uint64) string
- func TwoLine() []byte
- type ConvertInterface
- type Deleted
- type Expression
- type Exprs
- type Field
- type Operation
- type TimeModel
- type TimeStampModel
- type TimeStringModel
Constants ¶
View Source
const FileTmpl = `package generate
import "time"
`
View Source
const TagTmpl = "`json:\"%s\" explain:\"%s\"`"
View Source
const Tmpl = `package entity
import "time"
type Example struct{
A int` + "`json:\"a\" explain:\"模板\"`" + `
B string
C time.Time
}
`
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(c ConvertInterface, filename string)
func ConvertByTable ¶
func ConvertByTable(c ConvertInterface, tableName string)
func ConvertParams ¶
Types ¶
type ConvertInterface ¶
type Expression ¶
type Exprs ¶
type Exprs []Expression
type TimeStampModel ¶
type TimeStringModel ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.