Documentation
¶
Index ¶
- Variables
- type ComponentSecrets
- type ExecutionParams
- type Store
- func (s *Store) CreateExecution(p ExecutionParams) (*base.ExecutionWrapper, error)
- func (s *Store) GetDefinitionByID(defID string, sysVars map[string]any, compConfig *base.ComponentConfig) (*pb.ComponentDefinition, error)
- func (s *Store) GetDefinitionByUID(defUID uuid.UUID, sysVars map[string]any, compConfig *base.ComponentConfig) (*pb.ComponentDefinition, error)
- func (s *Store) HandleVerificationEvent(defID string, header map[string][]string, req *structpb.Struct, ...) (bool, *structpb.Struct, error)
- func (s *Store) Import(comp base.IComponent)
- func (s *Store) IsSecretField(defUID uuid.UUID, target string) (bool, error)
- func (s *Store) ListDefinitions(sysVars map[string]any, returnTombstone bool) []*pb.ComponentDefinition
Constants ¶
This section is empty.
Variables ¶
var ErrComponentDefinitionNotFound = fmt.Errorf("component definition not found")
ErrComponentDefinitionNotFound is returned when trying to access an inexistent component definition.
Functions ¶
This section is empty.
Types ¶
type ComponentSecrets ¶
ComponentSecrets contains the global config secrets of each implemented component (referenced by ID). Components may use these secrets to skip the component configuration step and have a ready-to-run config.
type ExecutionParams ¶
type ExecutionParams struct { // Component ID is the ID of the component *as defined in the recipe*. ComponentID string // ComponentDefinitionID determines the type of component to be executed. ComponentDefinitionID string // SystemVariables contains information about the pipeline trigger in which // the component is being executed. SystemVariables map[string]any // Setup may contain the configuration to connect to an external service. Setup *structpb.Struct // Task determines the task that the execution will carry out. It defines // the input and output of the execution. Task string }
ExecutionParams contains the information needed to execute a component.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds in-memory information about the initialized components.
func Init ¶
func Init( logger *zap.Logger, secrets ComponentSecrets, usageHandlerCreator base.UsageHandlerCreator, ) *Store
Init initializes the components implemented in this repository and loads their information to memory.
func (*Store) CreateExecution ¶
func (s *Store) CreateExecution(p ExecutionParams) (*base.ExecutionWrapper, error)
CreateExecution initializes the execution of a component.
func (*Store) GetDefinitionByID ¶
func (s *Store) GetDefinitionByID(defID string, sysVars map[string]any, compConfig *base.ComponentConfig) (*pb.ComponentDefinition, error)
GetDefinitionByID returns a component definition by its ID.
func (*Store) GetDefinitionByUID ¶
func (s *Store) GetDefinitionByUID(defUID uuid.UUID, sysVars map[string]any, compConfig *base.ComponentConfig) (*pb.ComponentDefinition, error)
GetDefinitionByUID returns a component definition by its UID.
func (*Store) HandleVerificationEvent ¶
func (*Store) Import ¶
func (s *Store) Import(comp base.IComponent)
Import loads the component definitions into memory.
func (*Store) IsSecretField ¶
func (*Store) ListDefinitions ¶
func (s *Store) ListDefinitions(sysVars map[string]any, returnTombstone bool) []*pb.ComponentDefinition
ListDefinitions returns all the loaded component definitions.