registry

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPanicableApplication

func NewPanicableApplication(a core.Application) core.Application

func NewPanicableComponent

func NewPanicableComponent(c core.Component) core.Component

func NewPanicableTrigger

func NewPanicableTrigger(t core.Trigger) core.Trigger

func RegisterApplication

func RegisterApplication(name string, i core.Application)

func RegisterComponent

func RegisterComponent(name string, c core.Component)

func RegisterTrigger

func RegisterTrigger(name string, t core.Trigger)

func RegisterWidget added in v0.0.18

func RegisterWidget(name string, w core.Widget)

Types

type Integration

type Integration struct {
	EventHandler       integrations.EventHandler
	OIDCVerifier       integrations.OIDCVerifier
	NewResourceManager func(ctx context.Context, URL string, authenticate integrations.AuthenticateFn) (integrations.ResourceManager, error)
}

type PanicableApplication

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

* PanicableApplication wraps an Application implementation * around logic for handling panics.

func (*PanicableApplication) CleanupWebhook

func (s *PanicableApplication) CleanupWebhook(ctx core.CleanupWebhookContext) (err error)

func (*PanicableApplication) CompareWebhookConfig

func (s *PanicableApplication) CompareWebhookConfig(a, b any) (result bool, err error)

func (*PanicableApplication) Components

func (s *PanicableApplication) Components() []core.Component

func (*PanicableApplication) Configuration

func (s *PanicableApplication) Configuration() []configuration.Field

func (*PanicableApplication) Description

func (s *PanicableApplication) Description() string

func (*PanicableApplication) HandleRequest

func (s *PanicableApplication) HandleRequest(ctx core.HTTPRequestContext)

func (*PanicableApplication) Icon

func (s *PanicableApplication) Icon() string

func (*PanicableApplication) Label

func (s *PanicableApplication) Label() string

func (*PanicableApplication) Name

func (s *PanicableApplication) Name() string

* Non-panicking methods. * These are mostly definition methods, so they won't panic.

func (*PanicableApplication) SetupWebhook

func (s *PanicableApplication) SetupWebhook(ctx core.SetupWebhookContext) (metadata any, err error)

func (*PanicableApplication) Sync

func (s *PanicableApplication) Sync(ctx core.SyncContext) (err error)

* Panicking methods. * These are where the application logic is implemented, * so they could panic, and if they do, the system shouldn't crash.

func (*PanicableApplication) Triggers

func (s *PanicableApplication) Triggers() []core.Trigger

type PanicableComponent

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

* PanicableComponent wraps a Component implementation * around logic for handling panics.

func (*PanicableComponent) Actions

func (s *PanicableComponent) Actions() []core.Action

func (*PanicableComponent) Cancel

func (s *PanicableComponent) Cancel(ctx core.ExecutionContext) (err error)

func (*PanicableComponent) Color

func (s *PanicableComponent) Color() string

func (*PanicableComponent) Configuration

func (s *PanicableComponent) Configuration() []configuration.Field

func (*PanicableComponent) Description

func (s *PanicableComponent) Description() string

func (*PanicableComponent) Execute

func (s *PanicableComponent) Execute(ctx core.ExecutionContext) (err error)

func (*PanicableComponent) HandleAction

func (s *PanicableComponent) HandleAction(ctx core.ActionContext) (err error)

func (*PanicableComponent) HandleWebhook

func (s *PanicableComponent) HandleWebhook(ctx core.WebhookRequestContext) (status int, err error)

func (*PanicableComponent) Icon

func (s *PanicableComponent) Icon() string

func (*PanicableComponent) Label

func (s *PanicableComponent) Label() string

func (*PanicableComponent) Name

func (s *PanicableComponent) Name() string

* Non-panicking methods. * These are mostly definition methods, so they won't panic.

func (*PanicableComponent) OutputChannels

func (s *PanicableComponent) OutputChannels(config any) []core.OutputChannel

func (*PanicableComponent) ProcessQueueItem

func (s *PanicableComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (id *uuid.UUID, err error)

func (*PanicableComponent) Setup

func (s *PanicableComponent) Setup(ctx core.SetupContext) (err error)

* Panicking methods. * These are where the component logic is implemented, * so they could panic, and if they do, the system shouldn't crash.

type PanicableTrigger

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

* PanicableTrigger wraps a Trigger implementation * around logic for handling panics.

func (*PanicableTrigger) Actions

func (s *PanicableTrigger) Actions() []core.Action

func (*PanicableTrigger) Color

func (s *PanicableTrigger) Color() string

func (*PanicableTrigger) Configuration

func (s *PanicableTrigger) Configuration() []configuration.Field

func (*PanicableTrigger) Description

func (s *PanicableTrigger) Description() string

func (*PanicableTrigger) HandleAction

func (s *PanicableTrigger) HandleAction(ctx core.TriggerActionContext) (result map[string]any, err error)

func (*PanicableTrigger) HandleWebhook

func (s *PanicableTrigger) HandleWebhook(ctx core.WebhookRequestContext) (status int, err error)

func (*PanicableTrigger) Icon

func (s *PanicableTrigger) Icon() string

func (*PanicableTrigger) Label

func (s *PanicableTrigger) Label() string

func (*PanicableTrigger) Name

func (s *PanicableTrigger) Name() string

* Non-panicking methods. * These are mostly definition methods, so they won't panic.

func (*PanicableTrigger) Setup

func (s *PanicableTrigger) Setup(ctx core.TriggerContext) (err error)

* Panicking methods. * These are where the component logic is implemented, * so they could panic, and if they do, the system shouldn't crash.

type Registry

type Registry struct {
	Encryptor    crypto.Encryptor
	Integrations map[string]Integration
	Applications map[string]core.Application
	Components   map[string]core.Component
	Triggers     map[string]core.Trigger
	Widgets      map[string]core.Widget
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(encryptor crypto.Encryptor) *Registry

func (*Registry) GetApplication

func (r *Registry) GetApplication(name string) (core.Application, error)

func (*Registry) GetApplicationComponent

func (r *Registry) GetApplicationComponent(appName, componentName string) (core.Component, error)

func (*Registry) GetApplicationTrigger

func (r *Registry) GetApplicationTrigger(appName, triggerName string) (core.Trigger, error)

func (*Registry) GetComponent

func (r *Registry) GetComponent(name string) (core.Component, error)

func (*Registry) GetEventHandler

func (r *Registry) GetEventHandler(integrationType string) (integrations.EventHandler, error)

func (*Registry) GetOIDCVerifier

func (r *Registry) GetOIDCVerifier(integrationType string) (integrations.OIDCVerifier, error)

func (*Registry) GetTrigger

func (r *Registry) GetTrigger(name string) (core.Trigger, error)

func (*Registry) GetWidget added in v0.0.18

func (r *Registry) GetWidget(name string) (core.Widget, error)

func (*Registry) HasIntegrationWithType

func (r *Registry) HasIntegrationWithType(integrationType string) bool

func (*Registry) HasOIDCVerifier

func (r *Registry) HasOIDCVerifier(integrationType string) bool

func (*Registry) Init

func (r *Registry) Init()

func (*Registry) ListApplications

func (r *Registry) ListApplications() []core.Application

func (*Registry) ListComponents

func (r *Registry) ListComponents() []core.Component

func (*Registry) ListTriggers

func (r *Registry) ListTriggers() []core.Trigger

func (*Registry) ListWidgets added in v0.0.18

func (r *Registry) ListWidgets() []core.Widget

func (*Registry) NewResourceManager

func (r *Registry) NewResourceManager(ctx context.Context, integration *models.Integration) (integrations.ResourceManager, error)

func (*Registry) NewResourceManagerInTransaction

func (r *Registry) NewResourceManagerInTransaction(ctx context.Context, tx *gorm.DB, integration *models.Integration) (integrations.ResourceManager, error)

Jump to

Keyboard shortcuts

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