registry

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPanicableComponent

func NewPanicableComponent(c core.Component) core.Component

func NewPanicableIntegration added in v0.5.0

func NewPanicableIntegration(i core.Integration) core.Integration

func NewPanicableTrigger

func NewPanicableTrigger(t core.Trigger) core.Trigger

func RegisterComponent

func RegisterComponent(name string, c core.Component)

func RegisterIntegration added in v0.5.0

func RegisterIntegration(name string, i core.Integration)

func RegisterIntegrationWithWebhookHandler added in v0.7.0

func RegisterIntegrationWithWebhookHandler(name string, i core.Integration, h core.WebhookHandler)

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 HTTPContext added in v0.7.0

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

func NewHTTPContext added in v0.7.0

func NewHTTPContext(options HTTPOptions) (*HTTPContext, error)

func (*HTTPContext) Do added in v0.7.0

func (c *HTTPContext) Do(request *http.Request) (*http.Response, error)

type HTTPOptions added in v0.7.0

type HTTPOptions struct {
	BlockedHosts     []string
	PrivateIPRanges  []string
	MaxResponseBytes int64
}

type IntegrationRegistration added in v0.7.0

type IntegrationRegistration struct {
	Name           string
	Integration    core.Integration
	WebhookHandler core.WebhookHandler
}

type LimitedReadCloser added in v0.7.0

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

func (*LimitedReadCloser) Close added in v0.7.0

func (r *LimitedReadCloser) Close() error

func (*LimitedReadCloser) Read added in v0.7.0

func (r *LimitedReadCloser) Read(p []byte) (int, error)

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) Cleanup added in v0.7.0

func (s *PanicableComponent) Cleanup(ctx core.SetupContext) (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) Documentation added in v0.1.6

func (s *PanicableComponent) Documentation() string

func (*PanicableComponent) ExampleOutput added in v0.0.45

func (s *PanicableComponent) ExampleOutput() map[string]any

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) OnIntegrationMessage added in v0.5.0

func (s *PanicableComponent) OnIntegrationMessage(ctx core.IntegrationMessageContext) (err error)

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 PanicableIntegration added in v0.5.0

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

* PanicableIntegration wraps an Integration implementation * around logic for handling panics.

func (*PanicableIntegration) Actions added in v0.6.0

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

func (*PanicableIntegration) Cleanup added in v0.6.0

func (*PanicableIntegration) Components added in v0.5.0

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

func (*PanicableIntegration) Configuration added in v0.5.0

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

func (*PanicableIntegration) Description added in v0.5.0

func (s *PanicableIntegration) Description() string

func (*PanicableIntegration) HandleAction added in v0.6.0

func (s *PanicableIntegration) HandleAction(ctx core.IntegrationActionContext) (err error)

func (*PanicableIntegration) HandleRequest added in v0.5.0

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

func (*PanicableIntegration) Icon added in v0.5.0

func (s *PanicableIntegration) Icon() string

func (*PanicableIntegration) Instructions added in v0.5.0

func (s *PanicableIntegration) Instructions() string

func (*PanicableIntegration) Label added in v0.5.0

func (s *PanicableIntegration) Label() string

func (*PanicableIntegration) ListResources added in v0.5.0

func (s *PanicableIntegration) ListResources(resourceType string, ctx core.ListResourcesContext) (resources []core.IntegrationResource, err error)

func (*PanicableIntegration) Name added in v0.5.0

func (s *PanicableIntegration) Name() string

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

func (*PanicableIntegration) Sync added in v0.5.0

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

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

func (*PanicableIntegration) Triggers added in v0.5.0

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

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) Cleanup added in v0.7.0

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

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) Documentation added in v0.1.6

func (s *PanicableTrigger) Documentation() string

func (*PanicableTrigger) ExampleData added in v0.0.45

func (s *PanicableTrigger) ExampleData() map[string]any

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) OnIntegrationMessage added in v0.5.0

func (s *PanicableTrigger) OnIntegrationMessage(ctx core.IntegrationMessageContext) (err error)

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 PanicableWebhookHandler added in v0.7.0

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

func NewPanicableWebhookHandler added in v0.7.0

func NewPanicableWebhookHandler(underlying core.WebhookHandler) *PanicableWebhookHandler

func (*PanicableWebhookHandler) Cleanup added in v0.7.0

func (*PanicableWebhookHandler) CompareConfig added in v0.7.0

func (h *PanicableWebhookHandler) CompareConfig(a, b any) (bool, error)

func (*PanicableWebhookHandler) Setup added in v0.7.0

func (h *PanicableWebhookHandler) Setup(ctx core.WebhookHandlerContext) (metadata any, err error)

type Registry

type Registry struct {
	Encryptor       crypto.Encryptor
	Integrations    map[string]core.Integration
	WebhookHandlers map[string]core.WebhookHandler
	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, httpOptions HTTPOptions) (*Registry, error)

func (*Registry) GetComponent

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

func (*Registry) GetIntegration added in v0.5.0

func (r *Registry) GetIntegration(name string) (core.Integration, error)

func (*Registry) GetIntegrationComponent added in v0.5.0

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

func (*Registry) GetIntegrationTrigger added in v0.5.0

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

func (*Registry) GetTrigger

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

func (*Registry) GetWebhookHandler added in v0.7.0

func (r *Registry) GetWebhookHandler(name string) (core.WebhookHandler, error)

func (*Registry) GetWidget added in v0.0.18

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

func (*Registry) HTTPContext added in v0.7.0

func (r *Registry) HTTPContext() *HTTPContext

func (*Registry) Init

func (r *Registry) Init()

func (*Registry) ListComponents

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

func (*Registry) ListIntegrations added in v0.5.0

func (r *Registry) ListIntegrations() []core.Integration

func (*Registry) ListTriggers

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

func (*Registry) ListWidgets added in v0.0.18

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

Jump to

Keyboard shortcuts

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