action

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DataValueKey = "action_data_value_key"

Variables

This section is empty.

Functions

func GenActionProps added in v1.3.1

func GenActionProps(ctx context.Context, c *apistructs.Component, name, version string) (err error)

func GenHeaderProps

func GenHeaderProps(actionExt *apistructs.ExtensionVersion, versions []VersionOption) (props []apistructs.FormPropItem, err error)

func GenLoopProps

func GenLoopProps(loop *apistructs.PipelineTaskLoop) (loopFp []apistructs.FormPropItem)

func GenParamAndLoopProps

func GenParamAndLoopProps(actionExt *apistructs.ExtensionVersion) (params []apistructs.FormPropItem, loop []apistructs.FormPropItem, err error)

func GenResourceProps

func GenResourceProps(actionExt *apistructs.ExtensionVersion) (props []apistructs.FormPropItem, err error)

func GetActionVersion added in v1.3.1

func GetActionVersion(c *apistructs.Component) string

func GetFromProps

func GetFromProps(extVersion *apistructs.ExtensionVersion) (interface{}, error)

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type ComponentAction

type ComponentAction struct {
	CompName string                 `json:"name"`
	Props    map[string]interface{} `json:"props"`
	State    ComponentActionState   `json:"state"`
	// contains filtered or unexported fields
}

将组件关心的数据类型具体化

func (*ComponentAction) GenActionState

func (a *ComponentAction) GenActionState(c *apistructs.Component) (version string, err error)

func (*ComponentAction) Render

func (*ComponentAction) SetActionProps

func (a *ComponentAction) SetActionProps(p interface{})

func (*ComponentAction) SetActionState

func (a *ComponentAction) SetActionState(s ComponentActionState)

func (*ComponentAction) SetBundle

func (a *ComponentAction) SetBundle(b protocol.ContextBundle) error

func (*ComponentAction) SetCompName

func (a *ComponentAction) SetCompName(name string) error

type ComponentActionState

type ComponentActionState struct {
	Version string `json:"version"`
}

组件状态

type VersionOption

type VersionOption struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func QueryExtensionVersion added in v1.3.1

func QueryExtensionVersion(bdl *bundle.Bundle, name, version string) (*apistructs.ExtensionVersion, []VersionOption, error)

Jump to

Keyboard shortcuts

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