Documentation ¶
Index ¶
- Constants
- Variables
- func RenderAddParallel(s *SceneStage) error
- func RenderClick(s *SceneStage) error
- func RenderCopyParallel(s *SceneStage) error
- func RenderCopyTo(s *SceneStage) error
- func RenderDelete(s *SceneStage) error
- func RenderEdit(s *SceneStage) error
- func RenderGroupMove(s *SceneStage) error
- func RenderItemMove(s *SceneStage) error
- func RenderList(s *SceneStage) error
- func RenderSplit(s *SceneStage) error
- func RenderSwitch(s *SceneStage) error
- type CommonStageForm
- type Data
- type DragParams
- type InParams
- type OpMetaData
- type OpMetaInfo
- type OperationBaseInfo
- type OperationFunc
- type OperationInfo
- type SceneStage
- type StageData
- type State
Constants ¶
View Source
const ( InitializeOperation cptype.OperationKey = "__Initialize__" RenderingOperation cptype.OperationKey = "__Rendering__" AddParallelOperationKey cptype.OperationKey = "addParallel" CopyParallelOperationKey cptype.OperationKey = "copyParallel" CopyToOperationKey cptype.OperationKey = "copyTo" MoveItemOperationKey cptype.OperationKey = "moveItem" MoveGroupOperationKey cptype.OperationKey = "moveGroup" EditOperationKey cptype.OperationKey = "edit" DeleteOperationKey cptype.OperationKey = "delete" SplitOperationKey cptype.OperationKey = "split" SwitchOperationKey cptype.OperationKey = "switch" ClickOperationKey cptype.OperationKey = "clickItem" )
Variables ¶
View Source
var OperationRender = map[cptype.OperationKey]OperationFunc{ InitializeOperation: []func(s *SceneStage) error{RenderList}, RenderingOperation: []func(s *SceneStage) error{RenderList}, AddParallelOperationKey: []func(s *SceneStage) error{RenderAddParallel}, CopyParallelOperationKey: []func(s *SceneStage) error{RenderCopyParallel, RenderList}, CopyToOperationKey: []func(s *SceneStage) error{RenderCopyTo}, MoveItemOperationKey: []func(s *SceneStage) error{RenderItemMove, RenderList}, MoveGroupOperationKey: []func(s *SceneStage) error{RenderGroupMove, RenderList}, EditOperationKey: []func(s *SceneStage) error{RenderEdit}, DeleteOperationKey: []func(s *SceneStage) error{RenderDelete, RenderList}, SplitOperationKey: []func(s *SceneStage) error{RenderSplit, RenderList}, ClickOperationKey: []func(s *SceneStage) error{RenderClick}, SwitchOperationKey: []func(s *SceneStage) error{RenderSwitch, RenderList}, }
Functions ¶
func RenderAddParallel ¶
func RenderAddParallel(s *SceneStage) error
func RenderClick ¶
func RenderClick(s *SceneStage) error
func RenderCopyParallel ¶
func RenderCopyParallel(s *SceneStage) error
func RenderCopyTo ¶
func RenderCopyTo(s *SceneStage) error
func RenderDelete ¶
func RenderDelete(s *SceneStage) error
func RenderEdit ¶
func RenderEdit(s *SceneStage) error
func RenderGroupMove ¶
func RenderGroupMove(s *SceneStage) error
func RenderItemMove ¶
func RenderItemMove(s *SceneStage) error
func RenderList ¶
func RenderList(s *SceneStage) error
func RenderSplit ¶
func RenderSplit(s *SceneStage) error
func RenderSwitch ¶
func RenderSwitch(s *SceneStage) error
Types ¶
type CommonStageForm ¶
type CommonStageForm struct { Version string `json:"version,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` State State `json:"state,omitempty"` Operations map[string]interface{} `json:"operations,omitempty"` Data Data `json:"data,omitempty"` InParams InParams `json:"inParams,omitempty"` Props map[string]interface{} `json:"props,omitempty"` }
type DragParams ¶
type OpMetaData ¶
type OpMetaData struct { Type apistructs.StepAPIType `json:"type"` // 类型 Method apistructs.StepAPIMethod `json:"method"` // method Value string `json:"value"` // 值 Name string `json:"name"` // 名称 ID uint64 `json:"id"` }
type OpMetaInfo ¶
func GetOpsInfo ¶
func GetOpsInfo(opsData interface{}) (*OpMetaInfo, error)
type OperationBaseInfo ¶
type OperationBaseInfo struct { FillMeta string `json:"fillMeta"` Key string `json:"key"` Icon string `json:"icon"` HoverTip string `json:"hoverTip"` HoverShow bool `json:"hoverShow"` Text string `json:"text"` Confirm string `json:"confirm,omitempty"` Reload bool `json:"reload"` Disabled bool `json:"disabled"` DisabledTip string `json:"disabledTip"` Group string `json:"group"` }
type OperationFunc ¶
type OperationFunc []func(s *SceneStage) error
type OperationInfo ¶
type OperationInfo struct { OperationBaseInfo Meta OpMetaInfo `json:"meta"` }
type SceneStage ¶
type SceneStage struct { base.DefaultProvider CommonStageForm // contains filtered or unexported fields }
func (*SceneStage) Render ¶
func (s *SceneStage) Render(ctx context.Context, c *cptype.Component, scenario cptype.Scenario, event cptype.ComponentEvent, gs *cptype.GlobalStateData) error
type StageData ¶
type StageData struct { Title string `json:"title"` ID uint64 `json:"id"` GroupID int `json:"groupId"` Operations map[string]interface{} `json:"operations"` Tags []stages.Tag `json:"tags"` }
func NewStageData ¶
func NewStageData(scene apistructs.AutoTestScene, svc *autotestv2.Service) (s StageData)
type State ¶
type State struct { Visible bool `json:"visible"` DragParams DragParams `json:"dragParams"` SetID uint64 `json:"setID"` StepId uint64 `json:"stepId"` ShowScenesSetDrawer bool `json:"showScenesSetDrawer"` ActionType string `json:"actionType"` SceneID uint64 `json:"sceneId"` SceneSetKey uint64 `json:"sceneSetKey"` PageNo int `json:"pageNo"` SetId__urlQuery string `json:"setId__urlQuery"` SceneId__urlQuery string `json:"sceneId__urlQuery"` SelectedKeys []string `json:"selectedKeys"` IsClickScene bool `json:"isClickScene"` IsClickFolderTableRow bool `json:"isClickFolderTableRow"` ClickFolderTableRowID uint64 `json:"clickFolderTableRowID"` IsAddParallel bool `json:"isAddParallel"` }
Click to show internal directories.
Click to hide internal directories.