Documentation
¶
Overview ¶
Package component exposes the component interfaces
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TypeMap = map[Type]interface{}{ PipelineType: (*PipelinePlugin)(nil), MetadataType: (*MetadataPlugin)(nil), }
TypeMap is a mapping of Type to the nil pointer to the interface of that type. This can be used with libraries such as mapper.
Functions ¶
This section is empty.
Types ¶
type MetadataPlugin ¶
type MetadataPlugin interface {
PluginMetadata(ctx context.Context) (*PluginMetadata, error)
}
MetadataPlugin is a plugin that provides metadata
type PipelinePlugin ¶
type PipelinePlugin interface {
ActionInput(ctx context.Context, actionName string) (interface{}, error)
ActionOutput(ctx context.Context, actionName string) (interface{}, error)
ExecuteAction(ctx context.Context, input *PipelinePluginActionInput, evalCtx *hcl.EvalContext) interface{}
Shutdown(ctx context.Context) error
Config(ctx context.Context) (interface{}, error)
ConfigSet(ctx context.Context, config interface{}) error
Schema(ctx context.Context) (*PipelinePluginSchema, error)
}
PipelinePlugin represents a pipeline plugin
type PipelinePluginActionInput ¶
PipelinePluginActionInput is the input for executing an action
type PipelinePluginActionResponse ¶
PipelinePluginActionResponse is the response after execution an action
type PipelinePluginActionSchema ¶
type PipelinePluginActionSchema struct {
Input *SchemaBlock `json:"input"`
Outputs map[string]*SchemaAttribute `json:"outputs,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Group string `json:"group"`
Deprecated bool `json:"deprecated"`
}
PipelinePluginActionSchema represents a single action in a pipeline plugin schema
type PipelinePluginSchema ¶
type PipelinePluginSchema struct {
Config *SchemaBlock `json:"config"`
Actions map[string]*PipelinePluginActionSchema `json:"actions"`
}
PipelinePluginSchema represents the schema of a pipeline plugin
type PluginMetadata ¶
type PluginMetadata struct {
Description string `json:"description"`
}
PluginMetadata is the metadata for a plugin
type SchemaAttribute ¶
type SchemaAttribute struct {
Name string `json:"name"`
Description string `json:"description"`
Type cty.Type `json:"type"`
Deprecated bool `json:"deprecated"`
NestedAttributes map[string]*SchemaAttribute `json:"nested_attributes"`
Required *bool `json:"required,omitempty"`
}
SchemaAttribute represents a single attribute in a schema
type SchemaBlock ¶
type SchemaBlock struct {
Attributes map[string]*SchemaAttribute `json:"attributes"`
BlockSpecs map[string]*SchemaBlockSpec `json:"block_specs"`
}
SchemaBlock represents a single HCL block in a schema
type SchemaBlockSpec ¶
type SchemaBlockSpec struct {
Name string `json:"name"`
Type cty.Type `json:"type"`
Description string `json:"description"`
Deprecated bool `json:"deprecated"`
Required bool `json:"required"`
Block *SchemaBlock `json:"block"`
}
SchemaBlockSpec represents an HCL block field