tract_webhook

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves POST /tract/hook/{trigger_uuid}, modeled on internal/transport/gitlab_webhook/handler.go: it authenticates the request directly against the trigger's own secret (not a user session — there is no user_context on a webhook call), so it depends on repository.TriggersRepo rather than going through service.TractService for the lookup/token-compare step. StartRun is spawned with baseCtx (the server-lifecycle context, not the request context, which is cancelled the moment ServeHTTP returns) so a fired run keeps executing after the HTTP response is sent.

func New

func New(baseCtx context.Context, triggers repository.TriggersRepo, tractSvc service.TractService) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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