Documentation ¶
Index ¶
- type CommonInParamsForm
- type ComponentInParamsForm
- func (i *ComponentInParamsForm) Filter() []ParamData
- func (i *ComponentInParamsForm) GenComponentState(c *cptype.Component) error
- func (i *ComponentInParamsForm) GetInParams(ctx context.Context) error
- func (i *ComponentInParamsForm) GetSceneOutPutValue(sceneName uint64, name string) (string, error)
- func (i *ComponentInParamsForm) Render(ctx context.Context, c *cptype.Component, scenario cptype.Scenario, ...) (err error)
- func (i *ComponentInParamsForm) RenderListInParamsForm() error
- func (i *ComponentInParamsForm) RenderOnSelect(ctx context.Context, opsData interface{}) error
- func (i *ComponentInParamsForm) RenderProtocol(c *cptype.Component, g *cptype.GlobalStateData)
- func (i *ComponentInParamsForm) RenderUpdateInParamsForm() error
- func (i *ComponentInParamsForm) SetProps()
- type Data
- type DeleteOperation
- type InParams
- type OnSelectOperation
- type OpMetaInfo
- type OperationBaseInfo
- type OperationInfo
- type OptionValue
- type ParamData
- type PropChangeOption
- type PropColumn
- type PropRender
- type PropRenderProp
- type PropRenderRule
- type PropsKey
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonInParamsForm ¶
type CommonInParamsForm struct { Version string `json:"version,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Props map[string]interface{} `json:"props,omitempty"` State State `json:"state,omitempty"` Operations map[string]interface{} `json:"operations,omitempty"` Data Data `json:"data,omitempty"` InParams InParams `json:"inParams,omitempty"` }
type ComponentInParamsForm ¶
type ComponentInParamsForm struct { base.DefaultProvider CommonInParamsForm // contains filtered or unexported fields }
func (*ComponentInParamsForm) Filter ¶
func (i *ComponentInParamsForm) Filter() []ParamData
func (*ComponentInParamsForm) GenComponentState ¶
func (i *ComponentInParamsForm) GenComponentState(c *cptype.Component) error
GenComponentState 获取state
func (*ComponentInParamsForm) GetInParams ¶
func (i *ComponentInParamsForm) GetInParams(ctx context.Context) error
func (*ComponentInParamsForm) GetSceneOutPutValue ¶
func (i *ComponentInParamsForm) GetSceneOutPutValue(sceneName uint64, name string) (string, error)
func (*ComponentInParamsForm) Render ¶
func (i *ComponentInParamsForm) Render(ctx context.Context, c *cptype.Component, scenario cptype.Scenario, event cptype.ComponentEvent, gs *cptype.GlobalStateData) (err error)
func (*ComponentInParamsForm) RenderListInParamsForm ¶
func (i *ComponentInParamsForm) RenderListInParamsForm() error
func (*ComponentInParamsForm) RenderOnSelect ¶
func (i *ComponentInParamsForm) RenderOnSelect(ctx context.Context, opsData interface{}) error
func (*ComponentInParamsForm) RenderProtocol ¶
func (i *ComponentInParamsForm) RenderProtocol(c *cptype.Component, g *cptype.GlobalStateData)
func (*ComponentInParamsForm) RenderUpdateInParamsForm ¶
func (i *ComponentInParamsForm) RenderUpdateInParamsForm() error
func (*ComponentInParamsForm) SetProps ¶
func (i *ComponentInParamsForm) SetProps()
type DeleteOperation ¶
type DeleteOperation OperationInfo
type OnSelectOperation ¶
type OnSelectOperation OperationInfo
type OpMetaInfo ¶
type OpMetaInfo struct { apistructs.AutotestSceneRequest SelectOption []PropChangeOption `json:"selectOption"` }
func GetOpsInfo ¶
func GetOpsInfo(opsData interface{}) (*OpMetaInfo, error)
type OperationBaseInfo ¶
type OperationBaseInfo struct { Key string `json:"key"` // 操作展示名称 Text string `json:"text,omitempty"` // 确认提示 Confirm string `json:"confirm,omitempty"` // 前端操作是否需要触发后端 Reload bool `json:"reload"` Disabled bool `json:"disabled"` DisabledTip string `json:"disabledTip"` FillMeta string `json:"fillMeta"` }
type OperationInfo ¶
type OperationInfo struct { OperationBaseInfo Meta OpMetaInfo `json:"meta"` }
type OptionValue ¶
type OptionValue string
const ( BeforeSceneOutPutOptionValue OptionValue = "beforeSceneOutPut" // 前置场景出参 SceneOptionValue OptionValue = "scene" // 场景 X SceneOutPutOptionValue OptionValue = "sceneOutPut" // 场景出参 X MockOptionValue OptionValue = "mock" // MOCK MockValueOptionValue OptionValue = "mockValue" // MOCK值 GlobalOptionValue OptionValue = "global" // 全局参数 GlobalValueOptionValue OptionValue = "globalValue" // 全局参数环境 GlobalGlobalOptionValue OptionValue = "globalGlobal" // 全局参数环境Global )
func (OptionValue) String ¶
func (ov OptionValue) String() string
type PropChangeOption ¶
type PropChangeOption struct { Label string `json:"label"` Value string `json:"value"` IsLeaf bool `json:"isLeaf"` ToolTip string `json:"tooltip"` Children []PropChangeOption `json:"children"` }
func (*PropChangeOption) FindValue ¶
func (pct *PropChangeOption) FindValue(v string) *PropChangeOption
type PropColumn ¶
type PropRender ¶
type PropRender struct { Type string `json:"type,omitempty"` ValueConvertType string `json:"valueConvertType,omitempty"` Options []PropChangeOption `json:"options,omitempty"` Required bool `json:"required,omitempty"` UniqueValue bool `json:"uniqueValue,omitempty"` Operations map[string]interface{} `json:"operations,omitempty"` Rules []PropRenderRule `json:"rules,omitempty"` Props PropRenderProp `json:"props,omitempty"` }
type PropRenderProp ¶
type PropRenderProp struct { MaxLength int64 `json:"maxLength,omitempty"` Placeholder string `json:"placeholder,omitempty"` Options []PropChangeOption `json:"options,omitempty"` }
type PropRenderRule ¶
type State ¶
type State struct { AutotestSceneRequest apistructs.AutotestSceneRequest `json:"autotestSceneRequest"` List []apistructs.AutoTestSceneInput `json:"list"` }
Click to show internal directories.
Click to hide internal directories.