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
Click to show internal directories.
Click to hide internal directories.