triggers

package
v0.0.0-...-b3c8e8e Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(mux goahttp.Muxer, service *Service)

Types

type Service

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

func NewService

func NewService(
	logger *slog.Logger,
	tracerProvider trace.TracerProvider,
	db *pgxpool.Pool,
	sessions *sessions.Manager,
	authzEngine *authz.Engine,
	app *bgtriggers.App,
	auditLogger *audit.Logger,
) *Service

func (*Service) APIKeyAuth

func (s *Service) APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)

func (*Service) CreateTriggerInstance

func (s *Service) CreateTriggerInstance(ctx context.Context, payload *gen.CreateTriggerInstancePayload) (*types.TriggerInstance, error)

func (*Service) DeleteTriggerInstance

func (s *Service) DeleteTriggerInstance(ctx context.Context, payload *gen.DeleteTriggerInstancePayload) error

func (*Service) GetTriggerInstance

func (s *Service) GetTriggerInstance(ctx context.Context, payload *gen.GetTriggerInstancePayload) (*types.TriggerInstance, error)

func (*Service) HandleWebhook

func (s *Service) HandleWebhook(w http.ResponseWriter, r *http.Request) error

HandleWebhook takes an incoming webhook request and passes it onto the trigger app facade

NOTE(security): webhook signature is checked in `*App.ProcessWebhook`. Requires `Definition.AuthenticateWebhook` to be defined.

func (*Service) PauseTriggerInstance

func (s *Service) PauseTriggerInstance(ctx context.Context, payload *gen.PauseTriggerInstancePayload) (*types.TriggerInstance, error)

func (*Service) ResumeTriggerInstance

func (s *Service) ResumeTriggerInstance(ctx context.Context, payload *gen.ResumeTriggerInstancePayload) (*types.TriggerInstance, error)

func (*Service) UpdateTriggerInstance

func (s *Service) UpdateTriggerInstance(ctx context.Context, payload *gen.UpdateTriggerInstancePayload) (*types.TriggerInstance, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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