Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionBase ¶
type ConditionBase struct { Key string `json:"key,omitempty"` Label string `json:"label,omitempty"` Type ConditionType `json:"type,omitempty"` Placeholder string `json:"placeholder,omitempty"` Disabled bool `json:"disabled,omitempty"` // condition relative location of filter form Outside bool `json:"outside,omitempty"` }
ConditionBase .
type ConditionType ¶
type ConditionType string
ConditionType .
const ( ConditionTypeSelect ConditionType = "select" ConditionTypeInput ConditionType = "input" ConditionTypeDateRange ConditionType = "dateRange" ConditionTypeTagsSelect ConditionType = "tagsSelect" )
ConditionTypeSelect .
type DateRangeCondition ¶
type DateRangeCondition SelectCondition
DateRangeCondition .
func NewDateRangeCondition ¶
func NewDateRangeCondition(key string, label string) *DateRangeCondition
NewDateRangeCondition .
type InputCondition ¶
type InputCondition struct {
ConditionBase
}
InputCondition .
func NewInputCondition ¶
func NewInputCondition(key string, label string) *InputCondition
NewInputCondition initial condition
type OptionBase ¶
type OptionBase struct { Label string `json:"label,omitempty"` Value interface{} `json:"value,omitempty"` Fix bool `json:"fix,omitempty"` }
OptionBase .
type SelectCondition ¶
type SelectCondition struct { ConditionBase Mode string `json:"mode,omitempty"` Options []SelectOption `json:"options,omitempty"` }
SelectCondition .
func NewSelectCondition ¶
func NewSelectCondition(key string, label string, options []SelectOption) *SelectCondition
NewSelectCondition initial condition with select option
func (*SelectCondition) WithMode ¶
func (o *SelectCondition) WithMode(mode string) *SelectCondition
WithMode .
func (*SelectCondition) WithPlaceHolder ¶
func (o *SelectCondition) WithPlaceHolder(placeholder string) *SelectCondition
WithPlaceHolder .
type SelectConditionWithChildren ¶
type SelectConditionWithChildren struct { ConditionBase Mode string `json:"mode,omitempty"` Options []SelectOptionWithChildren `json:"options,omitempty"` }
SelectConditionWithChildren .
func NewSelectConditionWithChildren ¶
func NewSelectConditionWithChildren(key string, label string, options []SelectOptionWithChildren) *SelectConditionWithChildren
NewSelectConditionWithChildren initial condition with select option with children
func (SelectConditionWithChildren) Type ¶
func (o SelectConditionWithChildren) Type() ConditionType
Type .
type SelectOption ¶
type SelectOption OptionBase
SelectOption .
func NewSelectOption ¶
func NewSelectOption(label string, value interface{}) *SelectOption
NewSelectOption .
type SelectOptionWithChildren ¶
type SelectOptionWithChildren struct { SelectOption Children []SelectOption `json:"children,omitempty"` }
SelectOptionWithChildren .
func NewSelectChildrenOption ¶
func NewSelectChildrenOption(label string, value interface{}, children []SelectOption) *SelectOptionWithChildren
NewSelectChildrenOption .
type TagsSelectCondition ¶
type TagsSelectCondition struct { ConditionBase Mode string `json:"mode,omitempty"` Options []TagsSelectOption `json:"options,omitempty"` }
TagsSelectCondition .
func NewTagsSelectCondition ¶
func NewTagsSelectCondition(key string, label string, options []TagsSelectOption) *TagsSelectCondition
NewTagsSelectCondition .
type TagsSelectOption ¶
type TagsSelectOption struct { SelectOption Color string `json:"color,omitempty"` }
TagsSelectOption .
func NewTagsSelectOption ¶
func NewTagsSelectOption(label string, value interface{}, color string) *TagsSelectOption
NewTagsSelectOption .
Click to show internal directories.
Click to hide internal directories.