Documentation
¶
Index ¶
- Constants
- func BuildProcessQueueContext(httpCtx core.HTTPContext, tx *gorm.DB, node *models.CanvasNode, ...) (*core.ProcessQueueContext, error)
- func NewIntegrationSubscriptionContext(tx *gorm.DB, registry *registry.Registry, ...) core.IntegrationSubscriptionContext
- type AuthContext
- type ConfigurationBuildError
- type EventContext
- type ExecutionMetadataContext
- type ExecutionRequestContext
- type ExecutionStateContext
- func (s *ExecutionStateContext) Emit(channel, payloadType string, payloads []any) error
- func (s *ExecutionStateContext) Fail(reason, message string) error
- func (s *ExecutionStateContext) IsFinished() bool
- func (s *ExecutionStateContext) Pass() error
- func (s *ExecutionStateContext) SetKV(key, value string) error
- type IntegrationContext
- func (c *IntegrationContext) Error(message string)
- func (c *IntegrationContext) FindSubscription(predicate func(core.IntegrationSubscriptionContext) bool) (core.IntegrationSubscriptionContext, error)
- func (c *IntegrationContext) GetConfig(name string) ([]byte, error)
- func (c *IntegrationContext) GetMetadata() any
- func (c *IntegrationContext) GetOptionalConfig(name string) ([]byte, error)
- func (c *IntegrationContext) GetSecrets() ([]core.IntegrationSecret, error)
- func (c *IntegrationContext) GetState() string
- func (c *IntegrationContext) ID() uuid.UUID
- func (c *IntegrationContext) ListSubscriptions() ([]core.IntegrationSubscriptionContext, error)
- func (c *IntegrationContext) NewBrowserAction(action core.BrowserAction)
- func (c *IntegrationContext) Ready()
- func (c *IntegrationContext) RemoveBrowserAction()
- func (c *IntegrationContext) RequestWebhook(configuration any) error
- func (c *IntegrationContext) ScheduleActionCall(actionName string, parameters any, interval time.Duration) error
- func (c *IntegrationContext) ScheduleResync(interval time.Duration) error
- func (c *IntegrationContext) SetMetadata(value any)
- func (c *IntegrationContext) SetSecret(name string, value []byte) error
- func (c *IntegrationContext) Subscribe(configuration any) (*uuid.UUID, error)
- type IntegrationSubscriptionContext
- type NodeConfigurationBuilder
- func (b *NodeConfigurationBuilder) Build(configuration map[string]any) (map[string]any, error)
- func (b *NodeConfigurationBuilder) BuildExpressionEnv(expression string) (map[string]any, error)
- func (b *NodeConfigurationBuilder) BuildMessageChainForExpression(expression string) (map[string]any, error)
- func (b *NodeConfigurationBuilder) ForBlueprintNode(parentBlueprintNode *models.CanvasNode) *NodeConfigurationBuilder
- func (b *NodeConfigurationBuilder) ResolveExpression(expression string) (any, error)
- func (b *NodeConfigurationBuilder) WithConfigurationFields(fields []configuration.Field) *NodeConfigurationBuilder
- func (b *NodeConfigurationBuilder) WithInput(input any) *NodeConfigurationBuilder
- func (b *NodeConfigurationBuilder) WithNodeID(nodeID string) *NodeConfigurationBuilder
- func (b *NodeConfigurationBuilder) WithPreviousExecution(previousExecutionID *uuid.UUID) *NodeConfigurationBuilder
- func (b *NodeConfigurationBuilder) WithRootEvent(rootEventID *uuid.UUID) *NodeConfigurationBuilder
- type NodeMetadataContext
- type NodeRequestContext
- type NodeWebhookContext
- type NotificationContext
- type SecretsContext
- type WebhookContext
Constants ¶
View Source
const DefaultMaxPayloadSize = 32 * 1024
* DefaultMaxPayloadSize is used to enforce reasonably-sized * event payloads from components and trigger implementations.
Variables ¶
This section is empty.
Functions ¶
func BuildProcessQueueContext ¶
func BuildProcessQueueContext(httpCtx core.HTTPContext, tx *gorm.DB, node *models.CanvasNode, queueItem *models.CanvasNodeQueueItem, configFields []configuration.Field) (*core.ProcessQueueContext, error)
func NewIntegrationSubscriptionContext ¶ added in v0.5.0
func NewIntegrationSubscriptionContext( tx *gorm.DB, registry *registry.Registry, subscription *models.NodeSubscription, node *models.CanvasNode, integration *models.Integration, integrationCtx *IntegrationContext, ) core.IntegrationSubscriptionContext
Types ¶
type AuthContext ¶
type AuthContext struct {
// contains filtered or unexported fields
}
func NewAuthContext ¶
func NewAuthContext(tx *gorm.DB, orgID uuid.UUID, authService authorization.Authorization, authenticatedUser *models.User) *AuthContext
func (*AuthContext) AuthenticatedUser ¶
func (c *AuthContext) AuthenticatedUser() *core.User
type ConfigurationBuildError ¶
type ConfigurationBuildError struct {
Err error
QueueItem *models.CanvasNodeQueueItem
Node *models.CanvasNode
Event *models.CanvasEvent
RootEventID uuid.UUID
}
func (*ConfigurationBuildError) Error ¶
func (e *ConfigurationBuildError) Error() string
func (*ConfigurationBuildError) Unwrap ¶
func (e *ConfigurationBuildError) Unwrap() error
type EventContext ¶
type EventContext struct {
// contains filtered or unexported fields
}
func NewEventContext ¶
func NewEventContext(tx *gorm.DB, node *models.CanvasNode) *EventContext
type ExecutionMetadataContext ¶
type ExecutionMetadataContext struct {
// contains filtered or unexported fields
}
func NewExecutionMetadataContext ¶
func NewExecutionMetadataContext(tx *gorm.DB, execution *models.CanvasNodeExecution) *ExecutionMetadataContext
func (*ExecutionMetadataContext) Get ¶
func (m *ExecutionMetadataContext) Get() any
func (*ExecutionMetadataContext) Set ¶
func (m *ExecutionMetadataContext) Set(value any) error
type ExecutionRequestContext ¶
type ExecutionRequestContext struct {
// contains filtered or unexported fields
}
func NewExecutionRequestContext ¶
func NewExecutionRequestContext(tx *gorm.DB, execution *models.CanvasNodeExecution) *ExecutionRequestContext
func (*ExecutionRequestContext) ScheduleActionCall ¶
type ExecutionStateContext ¶
type ExecutionStateContext struct {
// contains filtered or unexported fields
}
func NewExecutionStateContext ¶
func NewExecutionStateContext(tx *gorm.DB, execution *models.CanvasNodeExecution) *ExecutionStateContext
func (*ExecutionStateContext) Emit ¶
func (s *ExecutionStateContext) Emit(channel, payloadType string, payloads []any) error
func (*ExecutionStateContext) Fail ¶
func (s *ExecutionStateContext) Fail(reason, message string) error
func (*ExecutionStateContext) IsFinished ¶
func (s *ExecutionStateContext) IsFinished() bool
func (*ExecutionStateContext) Pass ¶
func (s *ExecutionStateContext) Pass() error
func (*ExecutionStateContext) SetKV ¶
func (s *ExecutionStateContext) SetKV(key, value string) error
type IntegrationContext ¶
type IntegrationContext struct {
// contains filtered or unexported fields
}
func NewIntegrationContext ¶
func NewIntegrationContext(tx *gorm.DB, node *models.CanvasNode, integration *models.Integration, encryptor crypto.Encryptor, registry *registry.Registry) *IntegrationContext
func (*IntegrationContext) Error ¶ added in v0.6.0
func (c *IntegrationContext) Error(message string)
func (*IntegrationContext) FindSubscription ¶ added in v0.9.0
func (c *IntegrationContext) FindSubscription(predicate func(core.IntegrationSubscriptionContext) bool) (core.IntegrationSubscriptionContext, error)
FindSubscription finds the first subscription matching the predicate. Note: This loads all subscriptions via ListSubscriptions() and iterates through them. For installations with many subscriptions, this may be inefficient. Consider adding an index-based lookup if performance becomes an issue.
func (*IntegrationContext) GetConfig ¶ added in v0.5.0
func (c *IntegrationContext) GetConfig(name string) ([]byte, error)
func (*IntegrationContext) GetMetadata ¶ added in v0.5.0
func (c *IntegrationContext) GetMetadata() any
func (*IntegrationContext) GetOptionalConfig ¶ added in v0.9.0
func (c *IntegrationContext) GetOptionalConfig(name string) ([]byte, error)
func (*IntegrationContext) GetSecrets ¶ added in v0.5.0
func (c *IntegrationContext) GetSecrets() ([]core.IntegrationSecret, error)
func (*IntegrationContext) GetState ¶ added in v0.5.0
func (c *IntegrationContext) GetState() string
func (*IntegrationContext) ID ¶ added in v0.5.0
func (c *IntegrationContext) ID() uuid.UUID
func (*IntegrationContext) ListSubscriptions ¶ added in v0.5.0
func (c *IntegrationContext) ListSubscriptions() ([]core.IntegrationSubscriptionContext, error)
func (*IntegrationContext) NewBrowserAction ¶ added in v0.5.0
func (c *IntegrationContext) NewBrowserAction(action core.BrowserAction)
func (*IntegrationContext) Ready ¶ added in v0.6.0
func (c *IntegrationContext) Ready()
func (*IntegrationContext) RemoveBrowserAction ¶ added in v0.5.0
func (c *IntegrationContext) RemoveBrowserAction()
func (*IntegrationContext) RequestWebhook ¶ added in v0.5.0
func (c *IntegrationContext) RequestWebhook(configuration any) error
func (*IntegrationContext) ScheduleActionCall ¶ added in v0.6.0
func (*IntegrationContext) ScheduleResync ¶ added in v0.5.0
func (c *IntegrationContext) ScheduleResync(interval time.Duration) error
func (*IntegrationContext) SetMetadata ¶ added in v0.5.0
func (c *IntegrationContext) SetMetadata(value any)
type IntegrationSubscriptionContext ¶ added in v0.5.0
type IntegrationSubscriptionContext struct {
// contains filtered or unexported fields
}
func (*IntegrationSubscriptionContext) Configuration ¶ added in v0.5.0
func (c *IntegrationSubscriptionContext) Configuration() any
func (*IntegrationSubscriptionContext) SendMessage ¶ added in v0.5.0
func (c *IntegrationSubscriptionContext) SendMessage(message any) error
type NodeConfigurationBuilder ¶
type NodeConfigurationBuilder struct {
// contains filtered or unexported fields
}
func NewNodeConfigurationBuilder ¶
func NewNodeConfigurationBuilder(tx *gorm.DB, workflowID uuid.UUID) *NodeConfigurationBuilder
func (*NodeConfigurationBuilder) BuildExpressionEnv ¶ added in v0.1.2
func (b *NodeConfigurationBuilder) BuildExpressionEnv(expression string) (map[string]any, error)
func (*NodeConfigurationBuilder) BuildMessageChainForExpression ¶ added in v0.0.45
func (b *NodeConfigurationBuilder) BuildMessageChainForExpression(expression string) (map[string]any, error)
func (*NodeConfigurationBuilder) ForBlueprintNode ¶
func (b *NodeConfigurationBuilder) ForBlueprintNode(parentBlueprintNode *models.CanvasNode) *NodeConfigurationBuilder
func (*NodeConfigurationBuilder) ResolveExpression ¶
func (b *NodeConfigurationBuilder) ResolveExpression(expression string) (any, error)
func (*NodeConfigurationBuilder) WithConfigurationFields ¶ added in v0.0.45
func (b *NodeConfigurationBuilder) WithConfigurationFields(fields []configuration.Field) *NodeConfigurationBuilder
func (*NodeConfigurationBuilder) WithInput ¶
func (b *NodeConfigurationBuilder) WithInput(input any) *NodeConfigurationBuilder
func (*NodeConfigurationBuilder) WithNodeID ¶ added in v0.1.6
func (b *NodeConfigurationBuilder) WithNodeID(nodeID string) *NodeConfigurationBuilder
func (*NodeConfigurationBuilder) WithPreviousExecution ¶
func (b *NodeConfigurationBuilder) WithPreviousExecution(previousExecutionID *uuid.UUID) *NodeConfigurationBuilder
func (*NodeConfigurationBuilder) WithRootEvent ¶
func (b *NodeConfigurationBuilder) WithRootEvent(rootEventID *uuid.UUID) *NodeConfigurationBuilder
type NodeMetadataContext ¶
type NodeMetadataContext struct {
// contains filtered or unexported fields
}
func NewNodeMetadataContext ¶
func NewNodeMetadataContext(tx *gorm.DB, node *models.CanvasNode) *NodeMetadataContext
func (*NodeMetadataContext) Get ¶
func (m *NodeMetadataContext) Get() any
func (*NodeMetadataContext) Set ¶
func (m *NodeMetadataContext) Set(value any) error
type NodeRequestContext ¶
type NodeRequestContext struct {
// contains filtered or unexported fields
}
func NewNodeRequestContext ¶
func NewNodeRequestContext(tx *gorm.DB, node *models.CanvasNode) *NodeRequestContext
func (*NodeRequestContext) ScheduleActionCall ¶
type NodeWebhookContext ¶ added in v0.0.30
type NodeWebhookContext struct {
// contains filtered or unexported fields
}
func NewNodeWebhookContext ¶ added in v0.0.30
func NewNodeWebhookContext(ctx context.Context, tx *gorm.DB, encryptor crypto.Encryptor, node *models.CanvasNode, baseURL string) *NodeWebhookContext
func (*NodeWebhookContext) GetBaseURL ¶ added in v0.0.30
func (c *NodeWebhookContext) GetBaseURL() string
func (*NodeWebhookContext) GetSecret ¶ added in v0.0.30
func (c *NodeWebhookContext) GetSecret() ([]byte, error)
func (*NodeWebhookContext) ResetSecret ¶ added in v0.0.30
func (c *NodeWebhookContext) ResetSecret() ([]byte, []byte, error)
func (*NodeWebhookContext) Setup ¶ added in v0.0.30
func (c *NodeWebhookContext) Setup() (string, error)
type NotificationContext ¶ added in v0.0.43
type NotificationContext struct {
// contains filtered or unexported fields
}
func NewNotificationContext ¶ added in v0.0.43
func NewNotificationContext(tx *gorm.DB, orgID, workflowID uuid.UUID) *NotificationContext
func (*NotificationContext) Send ¶ added in v0.0.43
func (c *NotificationContext) Send(title, body, url, urlLabel string, receivers core.NotificationReceivers) error
type SecretsContext ¶ added in v0.7.0
type SecretsContext struct {
// contains filtered or unexported fields
}
SecretsContext resolves organization secret key values for component execution.
func NewSecretsContext ¶ added in v0.7.0
func NewSecretsContext(tx *gorm.DB, organizationID uuid.UUID, encryptor crypto.Encryptor) *SecretsContext
NewSecretsContext returns a SecretsContext that looks up secrets in the given transaction for the given organization.
type WebhookContext ¶
type WebhookContext struct {
// contains filtered or unexported fields
}
func NewWebhookContext ¶
func (*WebhookContext) GetConfiguration ¶ added in v0.0.30
func (c *WebhookContext) GetConfiguration() any
func (*WebhookContext) GetID ¶ added in v0.0.30
func (c *WebhookContext) GetID() string
func (*WebhookContext) GetMetadata ¶ added in v0.0.30
func (c *WebhookContext) GetMetadata() any
func (*WebhookContext) GetSecret ¶
func (c *WebhookContext) GetSecret() ([]byte, error)
func (*WebhookContext) GetURL ¶ added in v0.0.30
func (c *WebhookContext) GetURL() string
func (*WebhookContext) SetSecret ¶ added in v0.0.30
func (c *WebhookContext) SetSecret(secret []byte) error
Source Files
¶
- auth_context.go
- common.go
- event_context.go
- execution_metadata_context.go
- execution_request_context.go
- execution_state_context.go
- integration_context.go
- integration_subscription_context.go
- node_configuration_builder.go
- node_metadata_context.go
- node_request_context.go
- node_webhook_context.go
- notification_context.go
- process_queue_context.go
- secrets_context.go
- webhook_context.go
Click to show internal directories.
Click to hide internal directories.