Documentation
¶
Index ¶
- func BoolFormatter(v reflect.Value) string
- func IdFormatter(v reflect.Value) string
- func IntFormatter(v reflect.Value) string
- func StringFormatter(v reflect.Value) string
- func StringSliceFormatter(v reflect.Value) string
- type Component
- type FieldConfig
- type Formatter
- type Model
- type RenderMethod
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolFormatter ¶
func IdFormatter ¶
func IntFormatter ¶
func StringFormatter ¶
func StringSliceFormatter ¶
Types ¶
type FieldConfig ¶
type FieldConfig struct {
// contains filtered or unexported fields
}
func (*FieldConfig) Component ¶
func (c *FieldConfig) Component(component Component)
func (*FieldConfig) Formatter ¶
func (c *FieldConfig) Formatter(formatter Formatter)
func (*FieldConfig) Label ¶
func (c *FieldConfig) Label(label string)
func (*FieldConfig) Name ¶
func (c *FieldConfig) Name(name string)
type Model ¶
type Model struct {
hound.Model `bson:",inline"`
Theme *Theme `json:"-" bson:"-"`
// contains filtered or unexported fields
}
func (*Model) FieldConfig ¶
func (m *Model) FieldConfig(name string) *FieldConfig
func (m *Model) UseComponent(fieldType string, component Component) {
m.Theme[fieldType] = component
}
type RenderMethod ¶
type RenderMethod string
const ( RenderByName RenderMethod = "RenderByName" RenderByFieldType RenderMethod = "RenderByFieldType" RenderByDataType RenderMethod = "RenderByDataType" )
func (RenderMethod) String ¶
func (m RenderMethod) String() string
type Theme ¶ added in v0.0.8
type Theme struct {
// contains filtered or unexported fields
}
func (*Theme) GetComponent ¶ added in v0.0.8
func (t *Theme) GetComponent(meta reflect.StructField) Component
Click to show internal directories.
Click to hide internal directories.