Documentation ¶
Index ¶
- Constants
- func ConvertFromStructpb(from *structpb.Struct, to interface{}) error
- func ConvertToStructpb(from interface{}) (*structpb.Struct, error)
- type Component
- type Connector
- func (c *Connector) AddConnectorDefinition(def *connectorPB.ConnectorDefinition) error
- func (c *Connector) GetConnectorDefinitionByID(defID string) (*connectorPB.ConnectorDefinition, error)
- func (c *Connector) GetConnectorDefinitionByUID(defUID uuid.UUID) (*connectorPB.ConnectorDefinition, error)
- func (c *Connector) IsCredentialField(defID string, target string) bool
- func (c *Connector) ListConnectorDefinitions() []*connectorPB.ConnectorDefinition
- func (c *Connector) ListCredentialField(defID string) ([]string, error)
- func (c *Connector) LoadConnectorDefinitions(definitionsJsonBytes []byte, tasksJsonBytes []byte) error
- type Execution
- func (e *Execution) ExecuteWithValidation(inputs []*structpb.Struct) ([]*structpb.Struct, error)
- func (e *Execution) GetConfig() *structpb.Struct
- func (e *Execution) GetTask() string
- func (e *Execution) GetUID() uuid.UUID
- func (e *Execution) Validate(data []*structpb.Struct, jsonSchema string) error
- type IComponent
- type IConnector
- type IExecution
- type IOperator
- type Operator
- func (o *Operator) AddOperatorDefinition(def *pipelinePB.OperatorDefinition) error
- func (o *Operator) GetOperatorDefinitionByID(defID string) (*pipelinePB.OperatorDefinition, error)
- func (o *Operator) GetOperatorDefinitionByUID(defUID uuid.UUID) (*pipelinePB.OperatorDefinition, error)
- func (o *Operator) ListOperatorDefinitions() []*pipelinePB.OperatorDefinition
- func (o *Operator) LoadOperatorDefinitions(definitionsJsonBytes []byte, tasksJsonBytes []byte) error
Constants ¶
View Source
const OpenAPITemplate = `` /* 1538-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ConvertFromStructpb ¶
func ConvertToStructpb ¶
Types ¶
type Component ¶
type Component struct { Name string // Logger Logger *zap.Logger // contains filtered or unexported fields }
func (*Component) GetTaskInputSchemas ¶
func (*Component) GetTaskOutputSchemas ¶
type Connector ¶
type Connector struct { Component // contains filtered or unexported fields }
func (*Connector) AddConnectorDefinition ¶
func (c *Connector) AddConnectorDefinition(def *connectorPB.ConnectorDefinition) error
func (*Connector) GetConnectorDefinitionByID ¶
func (c *Connector) GetConnectorDefinitionByID(defID string) (*connectorPB.ConnectorDefinition, error)
func (*Connector) GetConnectorDefinitionByUID ¶
func (c *Connector) GetConnectorDefinitionByUID(defUID uuid.UUID) (*connectorPB.ConnectorDefinition, error)
func (*Connector) IsCredentialField ¶
func (*Connector) ListConnectorDefinitions ¶
func (c *Connector) ListConnectorDefinitions() []*connectorPB.ConnectorDefinition
func (*Connector) ListCredentialField ¶
type Execution ¶
type Execution struct { Logger *zap.Logger Component IComponent ComponentExecution IExecution UID uuid.UUID Config *structpb.Struct Task string }
func CreateExecutionHelper ¶
func CreateExecutionHelper(e IExecution, comp IComponent, defUID uuid.UUID, task string, config *structpb.Struct, logger *zap.Logger) Execution
func (*Execution) ExecuteWithValidation ¶
type IComponent ¶
type IComponent interface { // Create a execution by definition uid and component configuration CreateExecution(defUID uuid.UUID, task string, config *structpb.Struct, logger *zap.Logger) (IExecution, error) // Get task input schemas GetTaskInputSchemas() map[string]string // Get task output schemas GetTaskOutputSchemas() map[string]string // contains filtered or unexported methods }
All component need to implement this interface
type IConnector ¶
type IConnector interface { IComponent // Functions that need to be implemented for all connectors // Test connection Test(defUID uuid.UUID, config *structpb.Struct, logger *zap.Logger) (connectorPB.ConnectorResource_State, error) // Functions that shared for all connectors // Load connector definitions from json files LoadConnectorDefinitions(definitionsJson []byte, tasksJson []byte) error // Add definition AddConnectorDefinition(def *connectorPB.ConnectorDefinition) error // Get the connector definition by definition uid GetConnectorDefinitionByUID(defUID uuid.UUID) (*connectorPB.ConnectorDefinition, error) // Get the connector definition by definition id GetConnectorDefinitionByID(defID string) (*connectorPB.ConnectorDefinition, error) // Get the list of connector definitions under this connector ListConnectorDefinitions() []*connectorPB.ConnectorDefinition // List the CredentialFields by definition id ListCredentialField(defID string) ([]string, error) // A helper function to check the target field a.b.c is credential IsCredentialField(defID string, target string) bool }
`IConnector` define the function interface for all connectors.
type IExecution ¶
type IExecution interface { // Functions that shared for all connectors // Validate the input and output format Validate(data []*structpb.Struct, jsonSchema string) error // Execute GetTask() string GetConfig() *structpb.Struct GetUID() uuid.UUID // Execute ExecuteWithValidation(inputs []*structpb.Struct) ([]*structpb.Struct, error) // execute Execute(inputs []*structpb.Struct) ([]*structpb.Struct, error) }
type IOperator ¶
type IOperator interface { IComponent // Functions that shared for all operators // Load operator definitions from json files LoadOperatorDefinitions(definitionsJson []byte, tasksJson []byte) error // Add definition AddOperatorDefinition(def *pipelinePB.OperatorDefinition) error // Get the operator definition by definition uid GetOperatorDefinitionByUID(defUID uuid.UUID) (*pipelinePB.OperatorDefinition, error) // Get the operator definition by definition id GetOperatorDefinitionByID(defID string) (*pipelinePB.OperatorDefinition, error) // Get the list of operator definitions under this operator ListOperatorDefinitions() []*pipelinePB.OperatorDefinition }
`IOperator` define the function interface for all operators.
type Operator ¶
type Operator struct {
Component
}
func (*Operator) AddOperatorDefinition ¶
func (o *Operator) AddOperatorDefinition(def *pipelinePB.OperatorDefinition) error
func (*Operator) GetOperatorDefinitionByID ¶
func (o *Operator) GetOperatorDefinitionByID(defID string) (*pipelinePB.OperatorDefinition, error)
func (*Operator) GetOperatorDefinitionByUID ¶
func (o *Operator) GetOperatorDefinitionByUID(defUID uuid.UUID) (*pipelinePB.OperatorDefinition, error)
func (*Operator) ListOperatorDefinitions ¶
func (o *Operator) ListOperatorDefinitions() []*pipelinePB.OperatorDefinition
Click to show internal directories.
Click to hide internal directories.