Documentation ¶
Index ¶
- Constants
- 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 GetFromProps(extVersion *apistructs.ExtensionVersion) (interface{}, error)
- func RenderCreator() protocol.CompRender
- type ComponentAction
- func (a *ComponentAction) GenActionProps(name, version string) (err error)
- func (a *ComponentAction) GenActionState(c *apistructs.Component) (err error)
- func (a ComponentAction) GetActionVersion() string
- func (a ComponentAction) QueryExtensionVersion(name, version string) (*apistructs.ExtensionVersion, []VersionOption, 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 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 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) GenActionProps ¶
func (a *ComponentAction) GenActionProps(name, version string) (err error)
func (*ComponentAction) GenActionState ¶
func (a *ComponentAction) GenActionState(c *apistructs.Component) (err error)
func (ComponentAction) GetActionVersion ¶
func (a ComponentAction) GetActionVersion() string
func (ComponentAction) QueryExtensionVersion ¶
func (a ComponentAction) QueryExtensionVersion(name, version string) (*apistructs.ExtensionVersion, []VersionOption, 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 ¶
Click to show internal directories.
Click to hide internal directories.