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 Config
- type ConvertInterface
- type Deleted
- type Field
- type FilterExpression
- type FilterExpressions
- 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 FilterExpression ¶
type FilterExpressions ¶
type FilterExpressions []FilterExpression
func (FilterExpressions) Build ¶
func (f FilterExpressions) Build() string
func (FilterExpressions) BuildSQL ¶
func (f FilterExpressions) BuildSQL() (string, []interface{})
type TimeStampModel ¶
type TimeStringModel ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.