Documentation ¶
Index ¶
- func AnotatedStructs(f *ast.File, anotation string) structs
- func Generate(from string, opts Option) error
- func StructFuncs(f *ast.File) map[string]funcs
- type BelongsTo
- func (f BelongsTo) BelongsTo() bool
- func (b BelongsTo) ForeignKey() string
- func (b BelongsTo) Func() string
- func (b BelongsTo) FuncName() string
- func (f BelongsTo) HasMany() bool
- func (f BelongsTo) HasOne() bool
- func (b BelongsTo) Model() string
- func (b BelongsTo) PrimaryKey() string
- func (b BelongsTo) TableName() string
- type HasMany
- func (f HasMany) BelongsTo() bool
- func (h HasMany) ForeignKey() string
- func (h HasMany) ForeignKeyField() string
- func (h HasMany) Func() string
- func (h HasMany) FuncName() string
- func (f HasMany) HasMany() bool
- func (f HasMany) HasOne() bool
- func (h HasMany) Model() string
- func (h HasMany) TableName() string
- type HasOne
- type Option
- type Scope
- type Template
- type Templates
- type Validation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnotatedStructs ¶
func StructFuncs ¶
Types ¶
type BelongsTo ¶
type BelongsTo struct { Recv *structType // contains filtered or unexported fields }
func (BelongsTo) ForeignKey ¶
func (BelongsTo) PrimaryKey ¶
type HasMany ¶
type HasMany struct { Recv *structType // contains filtered or unexported fields }
func (HasMany) ForeignKey ¶
func (HasMany) ForeignKeyField ¶
type HasOne ¶
type HasOne struct { Recv *structType // contains filtered or unexported fields }
func (HasOne) ForeignKey ¶
type Validation ¶
type Validation struct { Recv *structType // contains filtered or unexported fields }
func (Validation) ColumnName ¶
func (v Validation) ColumnName() string
func (Validation) FieldName ¶
func (v Validation) FieldName() string
func (Validation) FuncName ¶
func (v Validation) FuncName() string
Source Files ¶
- comment.go
- field.go
- funcs.go
- gen.go
- options.go
- parser.go
- struct.go
- tag.go
- template.go
- tpl_all.go
- tpl_and.go
- tpl_belongs_to.go
- tpl_build.go
- tpl_build_has_any.go
- tpl_count.go
- tpl_create.go
- tpl_delete.go
- tpl_destroy.go
- tpl_exists.go
- tpl_field_by_name.go
- tpl_find.go
- tpl_find_by.go
- tpl_first.go
- tpl_group.go
- tpl_has_many.go
- tpl_has_one.go
- tpl_having.go
- tpl_joins_belongs_to.go
- tpl_joins_has_any.go
- tpl_last.go
- tpl_limit.go
- tpl_offset.go
- tpl_order.go
- tpl_query.go
- tpl_query_row.go
- tpl_relation.go
- tpl_save.go
- tpl_scope.go
- tpl_select.go
- tpl_update.go
- tpl_validation.go
- tpl_where.go
- writer.go
Click to show internal directories.
Click to hide internal directories.