Documentation ¶
Index ¶
- Constants
- Variables
- func NewFunction()
- type Event
- type Events
- 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) Inline() bool
- 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 ( StoreNamePattern = "%sStore" QueryNamePattern = "%sQuery" ResultSetNamePattern = "%sResultSet" )
View Source
const BaseDocument = "gopkg.in/src-d/storable.v1.Document"
Variables ¶
View Source
var (
ErrEventConflict = errors.New(
"Event conflict a *Save and a *Update or *Insert are present",
)
)
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 StoreName string QueryName string ResultSetName string Collection string Type string Fields []*Field New bool Init bool Events Events CheckedNode *types.Named NewFunc *types.Func Package *types.Package }
func (*Model) NewArgVars ¶
func (*Model) NewRetVars ¶
func (*Model) NewReturns ¶
func (*Model) ValidFields ¶
type Processor ¶
type Processor struct { Path string Ignore map[string]bool TypesPkg *types.Package SourceCode map[string][]byte }
func NewProcessor ¶
type TemplateData ¶
type TemplateData struct { *Package Fields []*TemplateField Processed map[interface{}]string }
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.