Documentation ¶
Index ¶
Constants ¶
View Source
const ( FuncType_CreateBefore = "CreateBefore" FuncType_CreateTxBefore = "CreateTxBefore" FuncType_CreateTxAfter = "CreateTxAfter" FuncType_CreateAfter = "CreateAfter" FuncType_UpdateBefore = "UpdateBefore" FuncType_UpdateTxBefore = "UpdateTxBefore" FuncType_UpdateTxAfter = "UpdateTxAfter" FuncType_UpdateAfter = "UpdateAfter" FuncType_InfoBefore = "InfoBefore" FuncType_InfoAfter = "InfoAfter" FuncType_ListBefore = "ListBefore" FuncType_ListAfter = "ListAfter" FuncType_DeleteBefore = "DeleteBefore" FuncType_DeleteTxBefore = "DeleteTxBefore" FuncType_DeleteTxAfter = "DeleteTxAfter" FuncType_DeleteAfter = "DeleteAfter" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attr ¶
type Generator ¶
type Generator struct { Pkg *Package Project string Output string Debug bool TrimPrefix string LineComment bool Template string Func map[string][]Func // 所有的ModelController都需要的方法 // contains filtered or unexported fields }
func NewGenerator ¶
func (*Generator) AddPackage ¶
func (*Generator) ParsePackage ¶
type Render ¶
type Render struct { Args string PackageName string Project string Name string DBIndex string Desc string Create bool CreateSave bool CreateParams []Attr CreateParamsDecs []string CreateBefore []MFunc CreateTxBefore []MFunc CreateTxAfter []MFunc CreateAfter []MFunc CreateSecurity []string Update bool UpdateSave bool UpdateParams []Attr UpdateParamsDecs []string UpdateBefore []MFunc UpdateTxBefore []MFunc UpdateTxAfter []MFunc UpdateAfter []MFunc UpdateSecurity []string List bool ListPreload bool ListPreloadV []string ListBefore []MFunc ListAfter []MFunc ListSecurity []string Info bool InfoPreload bool InfoPreloadV []string InfoBefore []MFunc InfoAfter []MFunc InfoSecurity []string Delete bool DeleteBefore []MFunc DeleteTxBefore []MFunc DeleteTxAfter []MFunc DeleteAfter []MFunc DeleteSecurity []string }
Click to show internal directories.
Click to hide internal directories.