stages

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 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) RenderCopyStagesForm

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

func (*ComponentStageForm) RenderCreateStagesForm

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

func (*ComponentStageForm) RenderDeleteStagesForm

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

func (*ComponentStageForm) RenderDisableStagesForm added in v1.4.0

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

func (*ComponentStageForm) RenderListStageForm

func (i *ComponentStageForm) RenderListStageForm() error

func (*ComponentStageForm) RenderMoveStagesForm

func (i *ComponentStageForm) RenderMoveStagesForm() error

func (*ComponentStageForm) RenderProtocol

func (*ComponentStageForm) RenderSplitStagesForm

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

func (*ComponentStageForm) RenderUpdateStagesForm

func (i *ComponentStageForm) RenderUpdateStagesForm() error

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"`
	DragKey      int64 `json:"dragKey"`
	DropGroupKey int64 `json:"dropGroupKey"`
	DropKey      int64 `json:"dropKey"`
	Position     int64 `json:"position"`
}

type InParams

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

type MU

type MU struct {
	URL    string `json:"url"`
	Method string `json:"method"`
}

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"`      // 名称
	APISpecID uint64                   `json:"apiSpecID"` // api集市id
	ID        uint64                   `json:"id"`
	Disable   bool                     `json:"disable"`
}

type OpMetaInfo

type OpMetaInfo struct {
	apistructs.AutotestSceneRequest
	Data OpMetaData `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"`
	Group     string `json:"group"`
	// 操作展示名称
	Text     string `json:"text"`
	CopyText string `json:"copyText"`
	// 确认提示
	Confirm string `json:"confirm,omitempty"`
	// 前端操作是否需要触发后端
	Reload      bool   `json:"reload"`
	Disabled    bool   `json:"disabled"`
	DisabledTip string `json:"disabledTip"`
	SuccessMsg  string `json:"successMsg"`
}

type OperationInfo

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

type StageData

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

func RenderStage

func RenderStage(groupID uint64, step apistructs.AutoTestSceneStep) (StageData, error)

type State

type State struct {
	AutotestSceneRequest apistructs.AutotestSceneRequest `json:"autotestSceneRequest"`
	DragParams           DragParams                      `json:"dragParams"`

	StepId                 uint64 `json:"stepId"`
	ShowApiEditorDrawer    bool   `json:"showApiEditorDrawer"`
	ShowConfigSheetDrawer  bool   `json:"showConfigSheetDrawer"`
	ShowWaitEditorDrawer   bool   `json:"showWaitEditorDrawer"`
	ShowNestedSceneDrawer  bool   `json:"showNestedSceneDrawer"`
	ShowCustomEditorDrawer bool   `json:"showCustomEditorDrawer"`

	SceneId     uint64 `json:"sceneId"`
	IsClickItem bool   `json:"isClickItem"`
}

Jump to

Keyboard shortcuts

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