Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Condition ¶
type Condition struct { // JSONKey specifies the path of the field, support the peer and subordinate fields. JSONKey string `json:"jsonKey"` // Op options includes `==` 、`!=` and `in`, default is `==` // +optional Op string `json:"op,omitempty"` // Value specifies the prospective value. Value interface{} `json:"value"` // Action options includes `enable` or `disable`, default is `enable` // +optional Action string `json:"action,omitempty"` }
Condition control whether fields are enabled or disabled by certain conditions.
type GroupOption ¶
GroupOption define multiple data structure composition options.
type Option ¶
type Option struct { Label string `json:"label"` Value interface{} `json:"value"` }
Option select option
type Style ¶
type Style struct { // ColSpan the width of a responsive layout ColSpan int `json:"colSpan"` }
Style ui style
type UIParameter ¶
type UIParameter struct { Sort uint `json:"sort"` Label string `json:"label"` Description string `json:"description"` Validate *Validate `json:"validate,omitempty"` JSONKey string `json:"jsonKey"` UIType string `json:"uiType"` Style *Style `json:"style,omitempty"` // means disable parameter in ui Disable *bool `json:"disable,omitempty"` // Conditions: control whether fields are enabled or disabled by certain conditions. // Rules: // if all conditions are not matching, the parameter will be disabled // if there are no conditions, and disable==false the parameter will be enabled. // if one disable action condition is matched, the parameter will be disabled. // if all enable actions conditions are matched, the parameter will be enabled. // +optional Conditions []Condition `json:"conditions,omitempty"` SubParameterGroupOption []GroupOption `json:"subParameterGroupOption,omitempty"` SubParameters []*UIParameter `json:"subParameters,omitempty"` AdditionalParameter *UIParameter `json:"additionalParameter,omitempty"` Additional *bool `json:"additional,omitempty"` }
UIParameter Structured import table simple UI model
type Validate ¶
type Validate struct { Required bool `json:"required,omitempty"` Max *float64 `json:"max,omitempty"` MaxLength *uint64 `json:"maxLength,omitempty"` Min *float64 `json:"min,omitempty"` MinLength uint64 `json:"minLength,omitempty"` Pattern string `json:"pattern,omitempty"` Options []Option `json:"options,omitempty"` DefaultValue interface{} `json:"defaultValue,omitempty"` // the parameter cannot be changed twice. Immutable bool `json:"immutable"` }
Validate parameter validate rule
Click to show internal directories.
Click to hide internal directories.