apiEditor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EmptySpecID string = "undefined"
)

Variables

This section is empty.

Functions

func GetStepOutPut

func GetStepOutPut(steps []apistructs.AutoTestSceneStep) (map[string]map[string]string, error)

GetStepOutPut get output parameter by autotest steps

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type APISpec

type APISpec struct {
	APIInfo apistructs.APIInfoV2 `json:"apiSpec"`
}

APISpec step.value 的json解析

type ApiEditor

type ApiEditor struct {
	State State `json:"state"`
	// contains filtered or unexported fields
}

func (*ApiEditor) ExecuteApi

func (ae *ApiEditor) ExecuteApi(ops interface{}) error

ExecuteApi 小试一把

func (*ApiEditor) GenExecuteButton

func (ae *ApiEditor) GenExecuteButton() (string, error)

func (*ApiEditor) Save

func (ae *ApiEditor) Save(c *apistructs.Component) error

Save 保存

func (*ApiEditor) SetCtxBundle

func (ae *ApiEditor) SetCtxBundle(b protocol.ContextBundle) error

SetCtxBundle 设置bundle

type AttemptTestAll

type AttemptTestAll struct {
	Visible bool                   `json:"visible"`
	Status  string                 `json:"status"`
	Data    map[string]interface{} `json:"data"`
}

type ClickOperation

type ClickOperation struct {
	Key    string      `json:"key"`
	Reload bool        `json:"reload"`
	Meta   interface{} `json:"meta"`
}

type Input

type Input struct {
	Label    string  `json:"label"`
	Value    string  `json:"value"`
	IsLeaf   bool    `json:"isLeaf"`
	Children []Input `json:"children"`
}

Input 接口入参结构体

type Menu struct {
	Text       string                 `json:"text"`
	Key        string                 `json:"key"`
	Operations map[string]interface{} `json:"operations"`
}

type Meta

type Meta struct {
	Env       string `json:"env"`
	ScenesID  uint64 `json:"scenesID"`
	ConfigEnv string `json:"configEnv"`
}

func GetOpsInfo

func GetOpsInfo(opsData interface{}) (*Meta, error)

type OpMetaInfo

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

type State

type State struct {
	// 小试一把
	AttemptTest            AttemptTestAll `json:"attemptTest"`
	ConfigManageNamespaces string         `json:"configManageNamespaces"`

	// 步骤信息
	StepId    uint64 `json:"stepId"`
	SceneId   uint64 `json:"sceneId"`
	IsFirstIn bool   `json:"isFirstIn"` // 是否从步骤中点击进入
}

Jump to

Keyboard shortcuts

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