Documentation ¶
Index ¶
- Constants
- func NewFunction()
- type Field
- func (f *Field) AddField(field *Field)
- func (f *Field) ContainsMap() bool
- func (f *Field) DbName() string
- func (f *Field) Findable() bool
- func (f *Field) FindableType() string
- func (f *Field) GetPath() string
- func (f *Field) GetTagValue(key string) string
- func (f *Field) SetFields(sf []*Field)
- func (f *Field) String() string
- func (f *Field) ValidFields() []*Field
- type Function
- type Generator
- type Model
- type Package
- type Processor
- type Template
- type TemplateData
- func (td *TemplateData) GenType(vi interface{}, path string) string
- func (td *TemplateData) GenVar(vi interface{}, done map[interface{}]bool) string
- func (td *TemplateData) LinkStruct(path string, vi interface{}) string
- func (td *TemplateData) StructValue(vi interface{}, done map[interface{}]bool) string
- type TemplateField
Constants ¶
View Source
const ( IdNamePattern = "%sId" StoreNamePattern = "%sStore" QueryNamePattern = "%sQuery" ResultSetNamePattern = "%sResultSet" )
View Source
const BaseDocument = "github.com/tyba/storable.Document"
Variables ¶
This section is empty.
Functions ¶
func NewFunction ¶
func NewFunction()
Types ¶
type Field ¶
type Field struct { Name string Type string CheckedNode *types.Var Tag reflect.StructTag Fields []*Field Parent *Field // contains filtered or unexported fields }
func (*Field) ContainsMap ¶
func (*Field) FindableType ¶
func (*Field) GetTagValue ¶
func (*Field) ValidFields ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
type Model ¶
type Model struct { Name string IdName string StoreName string QueryName string ResultSetName string Collection string Type string Fields []*Field CheckedNode *types.Struct }
func (*Model) ValidFields ¶
type Processor ¶
type Processor struct { Path string Ignore map[string]bool // contains filtered or unexported fields }
func NewProcessor ¶
type TemplateData ¶
type TemplateData struct { *Package Fields []*TemplateField // contains filtered or unexported fields }
func (*TemplateData) GenType ¶
func (td *TemplateData) GenType(vi interface{}, path string) string
func (*TemplateData) GenVar ¶
func (td *TemplateData) GenVar(vi interface{}, done map[interface{}]bool) string
func (*TemplateData) LinkStruct ¶
func (td *TemplateData) LinkStruct(path string, vi interface{}) string
func (*TemplateData) StructValue ¶
func (td *TemplateData) StructValue(vi interface{}, done map[interface{}]bool) string
type TemplateField ¶
func (*TemplateField) ValidFields ¶
func (tf *TemplateField) ValidFields() []*Field
Click to show internal directories.
Click to hide internal directories.