component

package
v1.1.4-alpha6 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterComponentBuilders

func RegisterComponentBuilders(builders ...Builder) error

func UnRegisterComponents

func UnRegisterComponents(typeNames []string)

Types

type BaseComponent

type BaseComponent struct {
	// contains filtered or unexported fields
}

func NewBaseComponent

func NewBaseComponent(typeName string, name string, runParams map[string]any) *BaseComponent

func (*BaseComponent) GetName

func (c *BaseComponent) GetName() string

func (*BaseComponent) GetType

func (c *BaseComponent) GetType() string

func (*BaseComponent) OnRun

func (c *BaseComponent) OnRun(globalRunParams *GlobalRunParams, dynamicParams map[string]any, runFunc RunFunc) (any, error)

type Builder

type Builder interface {
	ProductType() string
	Build(name string, buildParams map[string]any, runParams map[string]any) (Component, error)
}

type Component

type Component interface {
	GetType() string
	GetName() string
	Run(globalRunParams *GlobalRunParams, dynamicParams map[string]any) (any, error)
}

func BuildComponent

func BuildComponent(typeName string, name string, buildParams map[string]any, runParams map[string]any) (Component, error)

type GlobalRunParams

type GlobalRunParams struct {
	CustomRunParams map[string]any
	// contains filtered or unexported fields
}

func (GlobalRunParams) GetLastResult

func (params GlobalRunParams) GetLastResult() any

func (GlobalRunParams) SetLastResult

func (params GlobalRunParams) SetLastResult(value any)

type RunFunc

type RunFunc func(globalRunParams *GlobalRunParams, dynamicParams map[string]any) (any, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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