Documentation ¶
Index ¶
- Constants
- func GenActionProps(ctx context.Context, c *apistructs.Component, name, version string) (err error)
- func GenHeaderProps(actionExt *apistructs.ExtensionVersion, versions []VersionOption) (props []apistructs.FormPropItem, err error)
- func GenLoopProps(loop *apistructs.PipelineTaskLoop) (loopFp []apistructs.FormPropItem)
- func GenParamAndLoopProps(actionExt *apistructs.ExtensionVersion) (params []apistructs.FormPropItem, loop []apistructs.FormPropItem, err error)
- func GenResourceProps(actionExt *apistructs.ExtensionVersion) (props []apistructs.FormPropItem, err error)
- func GenTimeoutProps(local *i18n.LocaleResource) (props []apistructs.FormPropItem, err error)
- func GetActionVersion(c *apistructs.Component) string
- func GetFromProps(extVersion *apistructs.ExtensionVersion) (interface{}, error)
- func RenderCreator() protocol.CompRender
- type ComponentAction
- func (a *ComponentAction) GenActionState(c *apistructs.Component) (version string, err error)
- func (a *ComponentAction) Render(ctx context.Context, c *apistructs.Component, ...) (err error)
- func (a *ComponentAction) SetActionProps(p interface{})
- func (a *ComponentAction) SetActionState(s ComponentActionState)
- func (a *ComponentAction) SetBundle(b protocol.ContextBundle) error
- func (a *ComponentAction) SetCompName(name string) error
- type ComponentActionState
- type VersionOption
Constants ¶
View Source
const DataValueKey = "action_data_value_key"
Variables ¶
This section is empty.
Functions ¶
func GenActionProps ¶ added in v1.3.1
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 GenTimeoutProps ¶ added in v1.5.0
func GenTimeoutProps(local *i18n.LocaleResource) (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 (a *ComponentAction) Render(ctx context.Context, c *apistructs.Component, scenario apistructs.ComponentProtocolScenario, event apistructs.ComponentEvent, globalStateData *apistructs.GlobalStateData) (err error)
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 ¶
func QueryExtensionVersion ¶ added in v1.3.1
func QueryExtensionVersion(bdl *bundle.Bundle, name, version string) (*apistructs.ExtensionVersion, []VersionOption, error)
Click to show internal directories.
Click to hide internal directories.