stages

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderCreator

func RenderCreator() protocol.CompRender

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 ComponentStageForm

type ComponentStageForm struct {
	CommonStageForm
	// contains filtered or unexported fields
}

func (*ComponentStageForm) GenComponentState

func (i *ComponentStageForm) GenComponentState(c *apistructs.Component) error

GenComponentState 获取state

func (*ComponentStageForm) GetInParams

func (i *ComponentStageForm) GetInParams() error

func (*ComponentStageForm) RenderCreateStagesForm

func (i *ComponentStageForm) RenderCreateStagesForm(opsData interface{}) error

func (*ComponentStageForm) RenderDeleteStagesForm

func (i *ComponentStageForm) RenderDeleteStagesForm(opsData interface{}) error

func (*ComponentStageForm) RenderGroupMoveStagesForm added in v1.3.2

func (i *ComponentStageForm) RenderGroupMoveStagesForm() (err error)

func (*ComponentStageForm) RenderItemMoveStagesForm added in v1.3.2

func (i *ComponentStageForm) RenderItemMoveStagesForm() (err error)

func (*ComponentStageForm) RenderListStageForm

func (i *ComponentStageForm) RenderListStageForm() error

func (*ComponentStageForm) RenderProtocol

func (*ComponentStageForm) RenderSplitStagesForm added in v1.3.2

func (i *ComponentStageForm) RenderSplitStagesForm(opsData interface{}) (err error)

func (*ComponentStageForm) RenderStage added in v1.3.2

func (*ComponentStageForm) SetCtxBundle

func (i *ComponentStageForm) SetCtxBundle(b protocol.ContextBundle) error

SetCtxBundle 设置bundle

type CreateOperation

type CreateOperation OperationInfo

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 OnChangeOperation

type OnChangeOperation OperationInfo

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

type OperationInfo

type OperationInfo struct {
	OperationBaseInfo
	Meta OpMetaInfo `json:"meta"`
}

type StageData

type StageData struct {
	Title      string                 `json:"title"`
	ID         uint64                 `json:"id"`
	GroupID    int                    `json:"groupId"`
	Operations map[string]interface{} `json:"operations"`
}

type State

type State struct {
	Visible    bool       `json:"visible"`
	DragParams DragParams `json:"dragParams"`

	TestPlanId          uint64 `json:"testPlanId"`
	StepId              uint64 `json:"stepId"`
	ShowScenesSetDrawer bool   `json:"showScenesSetDrawer"`
}

Jump to

Keyboard shortcuts

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