Documentation ¶
Index ¶
- func RegisterCustom(name string, field Field) error
- func Validate(field Field, req *http.Request, existing interface{}) (interface{}, error)
- type BaseField
- func (b *BaseField) Attrs() *BaseField
- func (b *BaseField) BaseRender(w io.Writer, tmpl *template.Template, value interface{}, errStr string, ...)
- func (b *BaseField) Configure(tagMap map[string]string) error
- func (b *BaseField) RenderString(val interface{}) template.HTML
- func (b *BaseField) Validate(val string) (interface{}, error)
- type BooleanField
- func (b *BooleanField) BaseRender(w io.Writer, value interface{}, errStr string, startRow bool, ...)
- func (b *BooleanField) Configure(tagMap map[string]string) error
- func (b *BooleanField) Render(w io.Writer, val interface{}, err string, startRow bool)
- func (b *BooleanField) RenderString(val interface{}) template.HTML
- func (b *BooleanField) Validate(val string) (interface{}, error)
- type Field
- type FileField
- type FileHandlerField
- type FloatField
- type ForeignKeyField
- func (f *ForeignKeyField) GetListColumn() string
- func (f *ForeignKeyField) GetModelSlug() string
- func (f *ForeignKeyField) GetRelatedTable() string
- func (f *ForeignKeyField) GetRelationTable() string
- func (f *ForeignKeyField) Render(w io.Writer, val interface{}, err string, startRow bool)
- func (f *ForeignKeyField) SetListColumn(column string)
- func (f *ForeignKeyField) SetModelSlug(slug string)
- func (f *ForeignKeyField) SetRelatedTable(table string)
- func (f *ForeignKeyField) Validate(val string) (interface{}, error)
- type IntField
- type ManyToManyField
- func (m *ManyToManyField) GetListColumn() string
- func (m *ManyToManyField) GetModelSlug() string
- func (m *ManyToManyField) GetRelatedTable() string
- func (m *ManyToManyField) GetRelationTable() string
- func (m *ManyToManyField) Render(w io.Writer, val interface{}, err string, startRow bool)
- func (m *ManyToManyField) SetListColumn(column string)
- func (m *ManyToManyField) SetModelSlug(slug string)
- func (m *ManyToManyField) SetRelatedTable(table string)
- func (m *ManyToManyField) Validate(val string) (interface{}, error)
- type RelationalField
- type TextField
- type TimeField
- type URLField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCustom ¶
Types ¶
type BaseField ¶
type BaseField struct { Name string Label string DefaultValue interface{} Blank bool Null bool ColumnName string List bool Searchable bool Width int Right bool Help string RelationTable string }
func (*BaseField) BaseRender ¶
func (*BaseField) RenderString ¶
type BooleanField ¶
type BooleanField struct {
*BaseField
}
func (*BooleanField) BaseRender ¶
func (*BooleanField) Render ¶
func (b *BooleanField) Render(w io.Writer, val interface{}, err string, startRow bool)
func (*BooleanField) RenderString ¶
func (b *BooleanField) RenderString(val interface{}) template.HTML
func (*BooleanField) Validate ¶
func (b *BooleanField) Validate(val string) (interface{}, error)
type Field ¶
type FileField ¶
func (*FileField) HandleFile ¶
func (f *FileField) HandleFile(file *multipart.FileHeader) (string, error)
type FileHandlerField ¶
type FileHandlerField interface {
HandleFile(*multipart.FileHeader) (string, error)
}
type FloatField ¶
type FloatField struct { *BaseField // contains filtered or unexported fields }
func (*FloatField) Render ¶
func (f *FloatField) Render(w io.Writer, val interface{}, err string, startRow bool)
func (*FloatField) Validate ¶
func (f *FloatField) Validate(val string) (interface{}, error)
type ForeignKeyField ¶
type ForeignKeyField struct { *BaseField // contains filtered or unexported fields }
func (*ForeignKeyField) GetListColumn ¶
func (f *ForeignKeyField) GetListColumn() string
func (*ForeignKeyField) GetModelSlug ¶
func (f *ForeignKeyField) GetModelSlug() string
func (*ForeignKeyField) GetRelatedTable ¶
func (f *ForeignKeyField) GetRelatedTable() string
func (*ForeignKeyField) GetRelationTable ¶
func (f *ForeignKeyField) GetRelationTable() string
func (*ForeignKeyField) Render ¶
func (f *ForeignKeyField) Render(w io.Writer, val interface{}, err string, startRow bool)
func (*ForeignKeyField) SetListColumn ¶
func (f *ForeignKeyField) SetListColumn(column string)
func (*ForeignKeyField) SetModelSlug ¶
func (f *ForeignKeyField) SetModelSlug(slug string)
func (*ForeignKeyField) SetRelatedTable ¶
func (f *ForeignKeyField) SetRelatedTable(table string)
func (*ForeignKeyField) Validate ¶
func (f *ForeignKeyField) Validate(val string) (interface{}, error)
type IntField ¶
type IntField struct { *BaseField // contains filtered or unexported fields }
type ManyToManyField ¶
type ManyToManyField struct { *BaseField // contains filtered or unexported fields }
func (*ManyToManyField) GetListColumn ¶
func (m *ManyToManyField) GetListColumn() string
func (*ManyToManyField) GetModelSlug ¶
func (m *ManyToManyField) GetModelSlug() string
func (*ManyToManyField) GetRelatedTable ¶
func (m *ManyToManyField) GetRelatedTable() string
func (*ManyToManyField) GetRelationTable ¶
func (m *ManyToManyField) GetRelationTable() string
func (*ManyToManyField) Render ¶
func (m *ManyToManyField) Render(w io.Writer, val interface{}, err string, startRow bool)
func (*ManyToManyField) SetListColumn ¶
func (m *ManyToManyField) SetListColumn(column string)
func (*ManyToManyField) SetModelSlug ¶
func (m *ManyToManyField) SetModelSlug(slug string)
func (*ManyToManyField) SetRelatedTable ¶
func (m *ManyToManyField) SetRelatedTable(table string)
func (*ManyToManyField) Validate ¶
func (m *ManyToManyField) Validate(val string) (interface{}, error)
type RelationalField ¶
Click to show internal directories.
Click to hide internal directories.