scenesStages

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

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 Data

type Data struct {
	List []StageData `json:"value"`
	Type string      `json:"type"`
}

type DragParams

type DragParams struct {
	DragGroupKey int64 `json:"dragGroupKey"`
	DropGroupKey int64 `json:"dropGroupKey"`
	DragKey      int64 `json:"dragKey"`
	DropKey      int64 `json:"dropKey"`
	Position     int64 `json:"position"`
}

type InParams

type InParams struct {
	SceneID    string `json:"sceneId__urlQuery"`
	SceneSetID uint64 `json:"sceneSetId__urlQuery"`
}

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

type OpMetaInfo struct {
	ID   uint64                 `json:"id"`
	Data map[string]interface{} `json:"data"`
}

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

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL