v1

package
v1.2.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestIDFrom added in v1.1.0

func RequestIDFrom(ctx context.Context) string

RequestIDFrom extracts the request ID from the context, if present.

func WriteError

func WriteError(w http.ResponseWriter, status int, code, message string)

WriteError writes a standard JSON error response.

func WriteJSON

func WriteJSON(w http.ResponseWriter, status int, v interface{})

WriteJSON writes a JSON response with the given status code.

Types

type AlertHandler

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

AlertHandler handles alert-related HTTP endpoints.

func NewAlertHandler

func NewAlertHandler(alertStore alert.AlertStore, channelStore alert.ChannelStore, silenceStore alert.SilenceStore, notifier *alert.Notifier, broker *SSEBroker, allowPrivateWebhooks bool, escalator alert.Escalator) *AlertHandler

NewAlertHandler creates a new alert handler.

func (*AlertHandler) HandleAcknowledgeAlert added in v1.0.1

func (h *AlertHandler) HandleAcknowledgeAlert(w http.ResponseWriter, r *http.Request)

HandleAcknowledgeAlert handles POST /api/v1/alerts/{id}/acknowledge.

func (*AlertHandler) HandleCancelSilenceRule

func (h *AlertHandler) HandleCancelSilenceRule(w http.ResponseWriter, r *http.Request)

HandleCancelSilenceRule handles DELETE /api/v1/silence/{id}.

func (*AlertHandler) HandleCreateChannel

func (h *AlertHandler) HandleCreateChannel(w http.ResponseWriter, r *http.Request)

HandleCreateChannel handles POST /api/v1/channels.

func (*AlertHandler) HandleCreateSilenceRule

func (h *AlertHandler) HandleCreateSilenceRule(w http.ResponseWriter, r *http.Request)

HandleCreateSilenceRule handles POST /api/v1/silence.

func (*AlertHandler) HandleDeleteChannel

func (h *AlertHandler) HandleDeleteChannel(w http.ResponseWriter, r *http.Request)

HandleDeleteChannel handles DELETE /api/v1/channels/{id}.

func (*AlertHandler) HandleGetActiveAlerts

func (h *AlertHandler) HandleGetActiveAlerts(w http.ResponseWriter, r *http.Request)

HandleGetActiveAlerts handles GET /api/v1/alerts/active.

func (*AlertHandler) HandleGetAlert

func (h *AlertHandler) HandleGetAlert(w http.ResponseWriter, r *http.Request)

HandleGetAlert handles GET /api/v1/alerts/{id}.

func (*AlertHandler) HandleListAlerts

func (h *AlertHandler) HandleListAlerts(w http.ResponseWriter, r *http.Request)

HandleListAlerts handles GET /api/v1/alerts.

func (*AlertHandler) HandleListChannels

func (h *AlertHandler) HandleListChannels(w http.ResponseWriter, r *http.Request)

HandleListChannels handles GET /api/v1/channels.

func (*AlertHandler) HandleListSilenceRules

func (h *AlertHandler) HandleListSilenceRules(w http.ResponseWriter, r *http.Request)

HandleListSilenceRules handles GET /api/v1/silence.

func (*AlertHandler) HandleTestChannel

func (h *AlertHandler) HandleTestChannel(w http.ResponseWriter, r *http.Request)

HandleTestChannel handles POST /api/v1/channels/{id}/test.

func (*AlertHandler) HandleUpdateChannel

func (h *AlertHandler) HandleUpdateChannel(w http.ResponseWriter, r *http.Request)

HandleUpdateChannel handles PUT /api/v1/channels/{id}.

type AlertTriggerHandler added in v1.2.12

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

AlertTriggerHandler handles /api/v1/alert-triggers/* endpoints.

func NewAlertTriggerHandler added in v1.2.12

func NewAlertTriggerHandler(ts alert.TriggerStore, cs alert.ChannelStore, broker *SSEBroker) *AlertTriggerHandler

NewAlertTriggerHandler constructs a new handler.

func (*AlertTriggerHandler) HandleCreateTrigger added in v1.2.12

func (h *AlertTriggerHandler) HandleCreateTrigger(w http.ResponseWriter, r *http.Request)

HandleCreateTrigger handles POST /api/v1/alert-triggers.

func (*AlertTriggerHandler) HandleDeleteTrigger added in v1.2.12

func (h *AlertTriggerHandler) HandleDeleteTrigger(w http.ResponseWriter, r *http.Request)

HandleDeleteTrigger handles DELETE /api/v1/alert-triggers/{id}.

func (*AlertTriggerHandler) HandleGetTrigger added in v1.2.12

func (h *AlertTriggerHandler) HandleGetTrigger(w http.ResponseWriter, r *http.Request)

HandleGetTrigger handles GET /api/v1/alert-triggers/{id}.

func (*AlertTriggerHandler) HandleListTriggers added in v1.2.12

func (h *AlertTriggerHandler) HandleListTriggers(w http.ResponseWriter, r *http.Request)

HandleListTriggers handles GET /api/v1/alert-triggers.

func (*AlertTriggerHandler) HandleUpdateTrigger added in v1.2.12

func (h *AlertTriggerHandler) HandleUpdateTrigger(w http.ResponseWriter, r *http.Request)

HandleUpdateTrigger handles PUT /api/v1/alert-triggers/{id}.

type CVEHandler

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

CVEHandler handles CVE-related HTTP endpoints.

func NewCVEHandler

func NewCVEHandler(store update.UpdateStore) *CVEHandler

NewCVEHandler creates a new CVE handler.

func (*CVEHandler) HandleGetContainerCVEs

func (h *CVEHandler) HandleGetContainerCVEs(w http.ResponseWriter, r *http.Request)

HandleGetContainerCVEs handles GET /api/v1/cve/{container_id}.

func (*CVEHandler) HandleListCVEs

func (h *CVEHandler) HandleListCVEs(w http.ResponseWriter, r *http.Request)

HandleListCVEs handles GET /api/v1/cve.

type CertificateHandler

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

CertificateHandler handles certificate monitor CRUD endpoints.

func NewCertificateHandler

func NewCertificateHandler(svc *certificate.Service) *CertificateHandler

NewCertificateHandler creates a new certificate handler.

func (*CertificateHandler) HandleCreate

func (h *CertificateHandler) HandleCreate(w http.ResponseWriter, r *http.Request)

HandleCreate handles POST /api/v1/certificates

func (*CertificateHandler) HandleDelete

func (h *CertificateHandler) HandleDelete(w http.ResponseWriter, r *http.Request)

HandleDelete handles DELETE /api/v1/certificates/{id}

func (*CertificateHandler) HandleGet

func (h *CertificateHandler) HandleGet(w http.ResponseWriter, r *http.Request)

HandleGet handles GET /api/v1/certificates/{id}

func (*CertificateHandler) HandleList

func (h *CertificateHandler) HandleList(w http.ResponseWriter, r *http.Request)

HandleList handles GET /api/v1/certificates

func (*CertificateHandler) HandleListChecks

func (h *CertificateHandler) HandleListChecks(w http.ResponseWriter, r *http.Request)

HandleListChecks handles GET /api/v1/certificates/{id}/checks

func (*CertificateHandler) HandleUpdate

func (h *CertificateHandler) HandleUpdate(w http.ResponseWriter, r *http.Request)

HandleUpdate handles PUT /api/v1/certificates/{id}

type ContainerHandler

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

ContainerHandler handles container-related HTTP endpoints.

func NewContainerHandler

func NewContainerHandler(service *container.Service, uptime *container.UptimeCalculator) *ContainerHandler

NewContainerHandler creates a new container handler.

func (*ContainerHandler) HandleDelete

func (h *ContainerHandler) HandleDelete(w http.ResponseWriter, r *http.Request)

HandleDelete handles DELETE /api/v1/containers/{id}. Only allows deletion of non-running containers.

func (*ContainerHandler) HandleGet

func (h *ContainerHandler) HandleGet(w http.ResponseWriter, r *http.Request)

HandleGet handles GET /api/v1/containers/{id}.

func (*ContainerHandler) HandleList

func (h *ContainerHandler) HandleList(w http.ResponseWriter, r *http.Request)

HandleList handles GET /api/v1/containers.

func (*ContainerHandler) HandleLogs

func (h *ContainerHandler) HandleLogs(w http.ResponseWriter, r *http.Request)

HandleLogs handles GET /api/v1/containers/{id}/logs.

func (*ContainerHandler) HandleTransitions

func (h *ContainerHandler) HandleTransitions(w http.ResponseWriter, r *http.Request)

HandleTransitions handles GET /api/v1/containers/{id}/transitions.

func (*ContainerHandler) SetContainerNameLister

func (h *ContainerHandler) SetContainerNameLister(cl ContainerNameLister)

SetContainerNameLister sets the K8s container name lister for detail endpoints.

func (*ContainerHandler) SetLogFetcher

func (h *ContainerHandler) SetLogFetcher(lf LogFetcher)

SetLogFetcher sets the log fetcher for the logs endpoint.

func (*ContainerHandler) SetSecurityProvider added in v1.1.0

func (h *ContainerHandler) SetSecurityProvider(sp SecurityInsightProvider)

SetSecurityProvider sets the security insight provider for enriching container responses.

type ContainerInfoProvider added in v1.1.0

type ContainerInfoProvider interface {
	GetContainerInfo(ctx context.Context, externalID string) (update.ContainerInfo, error)
}

ContainerInfoProvider returns container metadata needed for command generation.

type ContainerNameLister

type ContainerNameLister interface {
	ListContainerNames(ctx context.Context, externalID string) ([]string, error)
}

ContainerNameLister lists container names in a K8s workload pod spec.

type EndpointHandler

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

EndpointHandler handles endpoint-related HTTP endpoints.

func NewEndpointHandler

func NewEndpointHandler(service *endpoint.Service, containerSvc *container.Service) *EndpointHandler

NewEndpointHandler creates a new endpoint handler.

func (*EndpointHandler) HandleCreateEndpoint added in v1.1.2

func (h *EndpointHandler) HandleCreateEndpoint(w http.ResponseWriter, r *http.Request)

HandleCreateEndpoint handles POST /api/v1/endpoints.

func (*EndpointHandler) HandleDeleteEndpoint added in v1.1.2

func (h *EndpointHandler) HandleDeleteEndpoint(w http.ResponseWriter, r *http.Request)

HandleDeleteEndpoint handles DELETE /api/v1/endpoints/{id}.

func (*EndpointHandler) HandleGetEndpoint

func (h *EndpointHandler) HandleGetEndpoint(w http.ResponseWriter, r *http.Request)

HandleGetEndpoint handles GET /api/v1/endpoints/{id}.

func (*EndpointHandler) HandleListChecks

func (h *EndpointHandler) HandleListChecks(w http.ResponseWriter, r *http.Request)

HandleListChecks handles GET /api/v1/endpoints/{id}/checks.

func (*EndpointHandler) HandleListContainerEndpoints

func (h *EndpointHandler) HandleListContainerEndpoints(w http.ResponseWriter, r *http.Request)

HandleListContainerEndpoints handles GET /api/v1/containers/{id}/endpoints.

func (*EndpointHandler) HandleListEndpoints

func (h *EndpointHandler) HandleListEndpoints(w http.ResponseWriter, r *http.Request)

HandleListEndpoints handles GET /api/v1/endpoints.

func (*EndpointHandler) HandleUpdateEndpoint added in v1.1.2

func (h *EndpointHandler) HandleUpdateEndpoint(w http.ResponseWriter, r *http.Request)

HandleUpdateEndpoint handles PUT /api/v1/endpoints/{id}.

type EnrichedPing

type EnrichedPing struct {
	*heartbeat.HeartbeatPing
	ExpectedAt    *time.Time `json:"expected_at,omitempty"`
	GraceDeadline *time.Time `json:"grace_deadline,omitempty"`
}

EnrichedPing extends HeartbeatPing with computed timing fields.

type ErrorDetail

type ErrorDetail struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

ErrorDetail contains the error code and human-readable message.

type ErrorResponse

type ErrorResponse struct {
	Error ErrorDetail `json:"error"`
}

ErrorResponse represents the standard JSON error format.

type EscalationHandler added in v1.2.12

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

EscalationHandler handles HTTP endpoints for escalation policies.

func NewEscalationHandler added in v1.2.12

func NewEscalationHandler(svc *escalation.Service) *EscalationHandler

NewEscalationHandler creates a new EscalationHandler.

func (*EscalationHandler) HandleCreatePolicy added in v1.2.12

func (h *EscalationHandler) HandleCreatePolicy(w http.ResponseWriter, r *http.Request)

HandleCreatePolicy handles POST /api/v1/escalation-policies.

func (*EscalationHandler) HandleDeletePolicy added in v1.2.12

func (h *EscalationHandler) HandleDeletePolicy(w http.ResponseWriter, r *http.Request)

HandleDeletePolicy handles DELETE /api/v1/escalation-policies/{id}.

func (*EscalationHandler) HandleGetPolicy added in v1.2.12

func (h *EscalationHandler) HandleGetPolicy(w http.ResponseWriter, r *http.Request)

HandleGetPolicy handles GET /api/v1/escalation-policies/{id}.

func (*EscalationHandler) HandleGetRun added in v1.2.12

func (h *EscalationHandler) HandleGetRun(w http.ResponseWriter, r *http.Request)

HandleGetRun handles GET /api/v1/escalation-runs/{run_id}.

func (*EscalationHandler) HandleListAlertRuns added in v1.2.12

func (h *EscalationHandler) HandleListAlertRuns(w http.ResponseWriter, r *http.Request)

HandleListAlertRuns handles GET /api/v1/alerts/{alert_id}/escalation-runs.

func (*EscalationHandler) HandleListPolicies added in v1.2.12

func (h *EscalationHandler) HandleListPolicies(w http.ResponseWriter, r *http.Request)

HandleListPolicies handles GET /api/v1/escalation-policies.

func (*EscalationHandler) HandleListPolicyRuns added in v1.2.12

func (h *EscalationHandler) HandleListPolicyRuns(w http.ResponseWriter, r *http.Request)

HandleListPolicyRuns handles GET /api/v1/escalation-policies/{id}/runs.

func (*EscalationHandler) HandleOverlapProbe added in v1.2.12

func (h *EscalationHandler) HandleOverlapProbe(w http.ResponseWriter, r *http.Request)

HandleOverlapProbe handles POST /api/v1/escalation-policies/overlap-probe.

func (*EscalationHandler) HandleSetPolicyActive added in v1.2.12

func (h *EscalationHandler) HandleSetPolicyActive(w http.ResponseWriter, r *http.Request)

HandleSetPolicyActive handles PATCH /api/v1/escalation-policies/{id}/active.

func (*EscalationHandler) HandleUpdatePolicy added in v1.2.12

func (h *EscalationHandler) HandleUpdatePolicy(w http.ResponseWriter, r *http.Request)

HandleUpdatePolicy handles PUT /api/v1/escalation-policies/{id}.

type HandlerDeps added in v1.1.0

type HandlerDeps struct {
	// Core services
	Broker       *SSEBroker
	Runtime      pbruntime.Runtime
	Containers   *container.Service
	Uptime       *container.UptimeCalculator
	Endpoints    *endpoint.Service
	Heartbeats   *heartbeat.Service
	Certificates *certificate.Service
	Resources    *resource.Service
	Logger       *slog.Logger

	// Alert pipeline
	AlertStore   alert.AlertStore
	ChannelStore alert.ChannelStore
	TriggerStore alert.TriggerStore
	SilenceStore alert.SilenceStore
	Notifier     *alert.Notifier
	Escalator    alert.Escalator

	// Status page admin
	StatusComponents   status.ComponentStore
	StatusIncidents    status.IncidentStore
	StatusSubscribers  status.SubscriberStore
	StatusMaintenance  status.MaintenanceStore
	StatusSvc          *status.Service
	StatusBroker       *SSEBroker
	PersonalizationSvc *status.PersonalizationService

	// Webhooks
	WebhookStore webhook.WebhookSubscriptionStore

	// UI extras
	UptimeDaily      UptimeDailyFetcher
	LogStreamer      LogStreamer
	ResourceTopSvc   ResourceTopService
	SparklineFetcher SparklineDataFetcher

	// Update intelligence
	UpdateSvc        *update.Service
	UpdateStore      update.UpdateStore
	ContainerAdapter ContainerInfoProvider

	// Security
	SecuritySvc *security.Service
	Scorer      *security.Scorer
	AckStore    security.AcknowledgmentStore

	// Escalation policies
	EscalationSvc *escalation.Service

	// License
	LicenseMgr *license.Manager

	// Swarm
	SwarmCluster        func() *swarm.SwarmCluster
	SwarmDiscovery      func() *swarm.ServiceDiscovery
	SwarmDetector       func() *swarm.Detector
	SwarmNodeStore      swarm.NodeStore
	SwarmUpdateTracker  *swarm.UpdateTracker
	SwarmCrashLoop      *swarm.CrashLoopDetector
	SwarmReplicaChecker *swarm.ReplicaHealthChecker

	// HTTP config
	CORSOrigins          string // comma-separated origins or "*"
	MaxBodySize          int64  // 0 = 1MB default
	BuildVersion         string
	OrganisationName     string
	AllowPrivateWebhooks bool // dev only: skip HTTPS + SSRF check on webhook URLs
}

HandlerDeps holds all dependencies needed to build the API handler.

type HeartbeatHandler

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

HeartbeatHandler handles heartbeat CRUD endpoints.

func NewHeartbeatHandler

func NewHeartbeatHandler(svc *heartbeat.Service) *HeartbeatHandler

NewHeartbeatHandler creates a new heartbeat handler.

func (*HeartbeatHandler) HandleCreate

func (h *HeartbeatHandler) HandleCreate(w http.ResponseWriter, r *http.Request)

HandleCreate handles POST /api/v1/heartbeats

func (*HeartbeatHandler) HandleDelete

func (h *HeartbeatHandler) HandleDelete(w http.ResponseWriter, r *http.Request)

HandleDelete handles DELETE /api/v1/heartbeats/{id}

func (*HeartbeatHandler) HandleGet

func (h *HeartbeatHandler) HandleGet(w http.ResponseWriter, r *http.Request)

HandleGet handles GET /api/v1/heartbeats/{id}

func (*HeartbeatHandler) HandleList

func (h *HeartbeatHandler) HandleList(w http.ResponseWriter, r *http.Request)

HandleList handles GET /api/v1/heartbeats

func (*HeartbeatHandler) HandleListExecutions

func (h *HeartbeatHandler) HandleListExecutions(w http.ResponseWriter, r *http.Request)

HandleListExecutions handles GET /api/v1/heartbeats/{id}/executions

func (*HeartbeatHandler) HandleListPings

func (h *HeartbeatHandler) HandleListPings(w http.ResponseWriter, r *http.Request)

HandleListPings handles GET /api/v1/heartbeats/{id}/pings

func (*HeartbeatHandler) HandlePause

func (h *HeartbeatHandler) HandlePause(w http.ResponseWriter, r *http.Request)

HandlePause handles POST /api/v1/heartbeats/{id}/pause

func (*HeartbeatHandler) HandleResume

func (h *HeartbeatHandler) HandleResume(w http.ResponseWriter, r *http.Request)

HandleResume handles POST /api/v1/heartbeats/{id}/resume

func (*HeartbeatHandler) HandleUpdate

func (h *HeartbeatHandler) HandleUpdate(w http.ResponseWriter, r *http.Request)

HandleUpdate handles PUT /api/v1/heartbeats/{id}

type K8sMetricsProvider added in v1.2.0

type K8sMetricsProvider interface {
	MetricsAvailable() bool
	GetPodMetrics(ctx context.Context, namespace, name string) (*kubernetes.PodResourceMetrics, error)
	GetNodeMetrics(ctx context.Context, name string) (*kubernetes.NodeResourceMetrics, error)
}

K8sMetricsProvider is an optional interface for runtimes that can query pod/node metrics.

type KubernetesHandler added in v1.2.0

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

KubernetesHandler handles Kubernetes API endpoints.

func NewKubernetesHandler added in v1.2.0

func NewKubernetesHandler(provider KubernetesProvider) *KubernetesHandler

NewKubernetesHandler creates a new KubernetesHandler.

func (*KubernetesHandler) HandleGetCluster added in v1.2.0

func (h *KubernetesHandler) HandleGetCluster(w http.ResponseWriter, r *http.Request)

HandleGetCluster handles GET /api/v1/kubernetes/cluster.

func (*KubernetesHandler) HandleGetNodeResources added in v1.2.0

func (h *KubernetesHandler) HandleGetNodeResources(w http.ResponseWriter, r *http.Request)

HandleGetNodeResources handles GET /api/v1/kubernetes/nodes/{name}/resources (Enterprise). Returns node-level CPU/RAM from metrics-server.

func (*KubernetesHandler) HandleGetPodDetail added in v1.2.0

func (h *KubernetesHandler) HandleGetPodDetail(w http.ResponseWriter, r *http.Request)

HandleGetPodDetail handles GET /api/v1/kubernetes/pods/{namespace}/{name}.

func (*KubernetesHandler) HandleGetWorkload added in v1.2.0

func (h *KubernetesHandler) HandleGetWorkload(w http.ResponseWriter, r *http.Request)

HandleGetWorkload handles GET /api/v1/kubernetes/workloads/{id}. The id path value is URL-encoded (namespace%2FKind%2Fname).

func (*KubernetesHandler) HandleGetWorkloadResources added in v1.2.0

func (h *KubernetesHandler) HandleGetWorkloadResources(w http.ResponseWriter, r *http.Request)

HandleGetWorkloadResources handles GET /api/v1/kubernetes/workloads/{id}/resources (Enterprise). Returns per-pod CPU/RAM from metrics-server.

func (*KubernetesHandler) HandleListNamespaces added in v1.2.0

func (h *KubernetesHandler) HandleListNamespaces(w http.ResponseWriter, r *http.Request)

HandleListNamespaces handles GET /api/v1/kubernetes/namespaces.

func (*KubernetesHandler) HandleListNodes added in v1.2.0

func (h *KubernetesHandler) HandleListNodes(w http.ResponseWriter, r *http.Request)

HandleListNodes handles GET /api/v1/kubernetes/nodes.

func (*KubernetesHandler) HandleListPods added in v1.2.0

func (h *KubernetesHandler) HandleListPods(w http.ResponseWriter, r *http.Request)

HandleListPods handles GET /api/v1/kubernetes/pods. Query params: namespaces (comma-separated), workload, node, status.

func (*KubernetesHandler) HandleListWorkloads added in v1.2.0

func (h *KubernetesHandler) HandleListWorkloads(w http.ResponseWriter, r *http.Request)

HandleListWorkloads handles GET /api/v1/kubernetes/workloads. Query params: namespaces (comma-separated), kind, status.

type KubernetesProvider added in v1.2.0

type KubernetesProvider interface {
	ListNamespaces(ctx context.Context) ([]string, error)
	ListWorkloads(ctx context.Context, namespaces []string) ([]kubernetes.K8sWorkloadGroup, error)
	GetWorkload(ctx context.Context, id string) (*kubernetes.K8sWorkload, []kubernetes.K8sPod, []kubernetes.K8sEvent, error)
	ListPods(ctx context.Context, namespaces []string, filters kubernetes.PodFilters) ([]kubernetes.K8sPod, error)
	GetPodDetail(ctx context.Context, namespace, name string) (*kubernetes.K8sPod, []kubernetes.K8sEvent, error)
	ListNodes(ctx context.Context) ([]kubernetes.K8sNode, error)
	ClusterOverview(ctx context.Context) (*kubernetes.K8sClusterOverview, error)
}

KubernetesProvider is the interface the handler needs from the K8s runtime.

type LogFetcher

type LogFetcher interface {
	FetchLogs(ctx context.Context, containerID string, lines int, timestamps bool) ([]string, error)
}

LogFetcher abstracts Docker log retrieval for the API layer.

type LogStreamHandler

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

LogStreamHandler handles SSE log streaming endpoints.

func NewLogStreamHandler

func NewLogStreamHandler(streamer LogStreamer, svc *container.Service) *LogStreamHandler

NewLogStreamHandler creates a new log stream handler.

func (*LogStreamHandler) HandleLogStream

func (h *LogStreamHandler) HandleLogStream(w http.ResponseWriter, r *http.Request)

HandleLogStream handles GET /api/v1/containers/{id}/logs/stream. It opens an SSE connection and streams container logs in real-time.

type LogStreamer

type LogStreamer interface {
	// StreamLogs returns an io.ReadCloser for following container logs.
	// The reader must be closed by the caller. Demuxing (if needed) is handled internally by the runtime.
	StreamLogs(ctx context.Context, externalID string, lines int, timestamps bool) (io.ReadCloser, error)
}

LogStreamer abstracts runtime log streaming for the API layer.

type PersonalizationHandler added in v1.2.11

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

func NewPersonalizationHandler added in v1.2.11

func NewPersonalizationHandler(svc *status.PersonalizationService) *PersonalizationHandler

func (*PersonalizationHandler) HandleCreateFAQItem added in v1.2.11

func (h *PersonalizationHandler) HandleCreateFAQItem(w http.ResponseWriter, r *http.Request)
func (h *PersonalizationHandler) HandleCreateFooterLink(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandleDeleteAsset added in v1.2.11

func (h *PersonalizationHandler) HandleDeleteAsset(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandleDeleteFAQItem added in v1.2.11

func (h *PersonalizationHandler) HandleDeleteFAQItem(w http.ResponseWriter, r *http.Request)
func (h *PersonalizationHandler) HandleDeleteFooterLink(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandleGetAsset added in v1.2.11

func (h *PersonalizationHandler) HandleGetAsset(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandleGetSettings added in v1.2.11

func (h *PersonalizationHandler) HandleGetSettings(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandleListFAQ added in v1.2.11

func (h *PersonalizationHandler) HandleListFAQ(w http.ResponseWriter, r *http.Request)
func (h *PersonalizationHandler) HandleListFooterLinks(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandlePutAsset added in v1.2.11

func (h *PersonalizationHandler) HandlePutAsset(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandlePutSettings added in v1.2.11

func (h *PersonalizationHandler) HandlePutSettings(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandleReorderFAQ added in v1.2.11

func (h *PersonalizationHandler) HandleReorderFAQ(w http.ResponseWriter, r *http.Request)
func (h *PersonalizationHandler) HandleReorderFooterLinks(w http.ResponseWriter, r *http.Request)

func (*PersonalizationHandler) HandleUpdateFAQItem added in v1.2.11

func (h *PersonalizationHandler) HandleUpdateFAQItem(w http.ResponseWriter, r *http.Request)
func (h *PersonalizationHandler) HandleUpdateFooterLink(w http.ResponseWriter, r *http.Request)

type PingHandler

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

PingHandler handles public ping endpoints.

func NewPingHandler

func NewPingHandler(svc *heartbeat.Service) *PingHandler

NewPingHandler creates a new ping handler.

func (*PingHandler) HandleExitCodePing

func (h *PingHandler) HandleExitCodePing(w http.ResponseWriter, r *http.Request)

HandleExitCodePing handles GET|POST /ping/{uuid}/{exit_code}

func (*PingHandler) HandlePing

func (h *PingHandler) HandlePing(w http.ResponseWriter, r *http.Request)

HandlePing handles GET|POST /ping/{uuid}

func (*PingHandler) HandleStartPing

func (h *PingHandler) HandleStartPing(w http.ResponseWriter, r *http.Request)

HandleStartPing handles GET|POST /ping/{uuid}/start

type PostureHandler added in v1.1.0

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

PostureHandler handles security posture HTTP endpoints.

func NewPostureHandler added in v1.1.0

func NewPostureHandler(scorer *security.Scorer, containerSvc *container.Service, ackStore security.AcknowledgmentStore, alertStore alert.AlertStore, securitySvc *security.Service, broker *SSEBroker) *PostureHandler

NewPostureHandler creates a new posture handler.

func (*PostureHandler) HandleCreateAcknowledgment added in v1.1.0

func (h *PostureHandler) HandleCreateAcknowledgment(w http.ResponseWriter, r *http.Request)

HandleCreateAcknowledgment handles POST /api/v1/security/acknowledgments.

func (*PostureHandler) HandleDeleteAcknowledgment added in v1.1.0

func (h *PostureHandler) HandleDeleteAcknowledgment(w http.ResponseWriter, r *http.Request)

HandleDeleteAcknowledgment handles DELETE /api/v1/security/acknowledgments/{id}.

func (*PostureHandler) HandleGetContainerPosture added in v1.1.0

func (h *PostureHandler) HandleGetContainerPosture(w http.ResponseWriter, r *http.Request)

HandleGetContainerPosture handles GET /api/v1/security/posture/containers/{container_id}.

func (*PostureHandler) HandleGetPosture added in v1.1.0

func (h *PostureHandler) HandleGetPosture(w http.ResponseWriter, r *http.Request)

HandleGetPosture handles GET /api/v1/security/posture.

func (*PostureHandler) HandleListAcknowledgments added in v1.1.0

func (h *PostureHandler) HandleListAcknowledgments(w http.ResponseWriter, r *http.Request)

HandleListAcknowledgments handles GET /api/v1/security/acknowledgments.

func (*PostureHandler) HandleListContainerPostures added in v1.1.0

func (h *PostureHandler) HandleListContainerPostures(w http.ResponseWriter, r *http.Request)

HandleListContainerPostures handles GET /api/v1/security/posture/containers.

type ResourceHandler

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

ResourceHandler handles resource monitoring HTTP endpoints.

func NewResourceHandler

func NewResourceHandler(service *resource.Service) *ResourceHandler

NewResourceHandler creates a new resource handler.

func (*ResourceHandler) HandleGetAlertConfig

func (h *ResourceHandler) HandleGetAlertConfig(w http.ResponseWriter, r *http.Request)

HandleGetAlertConfig handles GET /api/v1/containers/{id}/resources/alerts.

func (*ResourceHandler) HandleGetCurrent

func (h *ResourceHandler) HandleGetCurrent(w http.ResponseWriter, r *http.Request)

HandleGetCurrent handles GET /api/v1/containers/{id}/resources/current.

func (*ResourceHandler) HandleGetHistory

func (h *ResourceHandler) HandleGetHistory(w http.ResponseWriter, r *http.Request)

HandleGetHistory handles GET /api/v1/containers/{id}/resources/history.

func (*ResourceHandler) HandleGetSummary

func (h *ResourceHandler) HandleGetSummary(w http.ResponseWriter, r *http.Request)

HandleGetSummary handles GET /api/v1/resources/summary.

func (*ResourceHandler) HandleUpsertAlertConfig

func (h *ResourceHandler) HandleUpsertAlertConfig(w http.ResponseWriter, r *http.Request)

HandleUpsertAlertConfig handles PUT /api/v1/containers/{id}/resources/alerts.

type ResourceTopHandler

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

ResourceTopHandler handles top resource consumers endpoints.

func NewResourceTopHandler

func NewResourceTopHandler(svc ResourceTopService) *ResourceTopHandler

NewResourceTopHandler creates a new top consumers handler.

func (*ResourceTopHandler) HandleGetTopConsumers

func (h *ResourceTopHandler) HandleGetTopConsumers(w http.ResponseWriter, r *http.Request)

HandleGetTopConsumers handles GET /api/v1/resources/top?metric=cpu|memory&limit=5&period=1h|24h|7d|30d.

type ResourceTopService

type ResourceTopService interface {
	GetAllLatestSnapshots() map[int64]*resource.ResourceSnapshot
	GetContainerName(containerID int64) string
	GetTopConsumersByPeriod(ctx context.Context, metric, period string, limit int) ([]resource.TopConsumerRow, error)
}

ResourceTopService abstracts the resource service for top consumers.

type RiskHandler

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

RiskHandler handles risk score HTTP endpoints.

func NewRiskHandler

func NewRiskHandler(store update.UpdateStore) *RiskHandler

NewRiskHandler creates a new risk handler.

func (*RiskHandler) HandleGetContainerRisk

func (h *RiskHandler) HandleGetContainerRisk(w http.ResponseWriter, r *http.Request)

HandleGetContainerRisk handles GET /api/v1/risk/{container_id...}. When the ?period= query param is present (24h, 7d, 30d), returns risk score history instead of the current risk snapshot.

func (*RiskHandler) HandleListRiskScores

func (h *RiskHandler) HandleListRiskScores(w http.ResponseWriter, r *http.Request)

HandleListRiskScores handles GET /api/v1/risk.

type Router

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

Router sets up the /api/v1 route group.

func NewRouter

func NewRouter(d HandlerDeps) *Router

NewRouter creates a new API v1 router from the unified HandlerDeps.

func (*Router) Handler

func (r *Router) Handler() http.Handler

Handler returns the HTTP handler with the full middleware chain applied. Middleware order (outermost to innermost): panicRecovery → requestLogger → requestID → cors → bodyLimit → mux

type SSEBroker

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

SSEBroker manages Server-Sent Event connections and broadcasts events.

func NewSSEBroker

func NewSSEBroker(logger *slog.Logger) *SSEBroker

NewSSEBroker creates a new SSE broker.

func (*SSEBroker) AddObserver

func (b *SSEBroker) AddObserver(ch chan SSEEvent)

AddObserver registers a channel that receives all broadcast events (non-blocking).

func (*SSEBroker) Broadcast

func (b *SSEBroker) Broadcast(event SSEEvent)

Broadcast sends an event to all connected SSE clients and observers.

func (*SSEBroker) ClientCount

func (b *SSEBroker) ClientCount() int

ClientCount returns the number of connected SSE clients.

func (*SSEBroker) RemoveObserver

func (b *SSEBroker) RemoveObserver(ch chan SSEEvent)

RemoveObserver unregisters an observer channel.

func (*SSEBroker) ServeHTTP

func (b *SSEBroker) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles SSE connections.

type SSEEvent

type SSEEvent struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

SSEEvent represents an event to be sent to SSE clients.

type SecurityHandler added in v1.1.0

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

SecurityHandler handles security insight HTTP endpoints.

func NewSecurityHandler added in v1.1.0

func NewSecurityHandler(secSvc *security.Service, containerSvc *container.Service) *SecurityHandler

NewSecurityHandler creates a new security handler.

func (*SecurityHandler) HandleGetContainerInsights added in v1.1.0

func (h *SecurityHandler) HandleGetContainerInsights(w http.ResponseWriter, r *http.Request)

HandleGetContainerInsights handles GET /api/v1/security/insights/{container_id}.

func (*SecurityHandler) HandleGetSummary added in v1.1.0

func (h *SecurityHandler) HandleGetSummary(w http.ResponseWriter, r *http.Request)

HandleGetSummary handles GET /api/v1/security/summary.

func (*SecurityHandler) HandleListInsights added in v1.1.0

func (h *SecurityHandler) HandleListInsights(w http.ResponseWriter, r *http.Request)

HandleListInsights handles GET /api/v1/security/insights.

type SecurityInsightProvider added in v1.1.0

type SecurityInsightProvider interface {
	InsightCount(containerID int64) (int, string)
}

SecurityInsightProvider provides security insight counts for containers.

type SparklineDataFetcher

type SparklineDataFetcher interface {
	GetSparklineData(ctx context.Context, limit int) (map[int64][]float64, error)
}

SparklineDataFetcher abstracts the endpoint store for sparkline data.

type SparklineHandler

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

SparklineHandler handles the batch sparkline endpoint.

func NewSparklineHandler

func NewSparklineHandler(store SparklineDataFetcher) *SparklineHandler

NewSparklineHandler creates a new sparkline handler.

func (*SparklineHandler) HandleGetSparklines

func (h *SparklineHandler) HandleGetSparklines(w http.ResponseWriter, r *http.Request)

HandleGetSparklines handles GET /api/v1/dashboard/sparklines.

type StatusAdminHandler

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

StatusAdminHandler handles admin endpoints for the public status page.

func NewStatusAdminHandler

func NewStatusAdminHandler(
	components status.ComponentStore,
	incidents status.IncidentStore,
	subscribers status.SubscriberStore,
	maintenance status.MaintenanceStore,
	statusSvc *status.Service,
	broker *SSEBroker,
) *StatusAdminHandler

NewStatusAdminHandler creates a new status admin handler.

func (*StatusAdminHandler) HandleCreateComponent

func (h *StatusAdminHandler) HandleCreateComponent(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleCreateIncident

func (h *StatusAdminHandler) HandleCreateIncident(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleCreateMaintenance

func (h *StatusAdminHandler) HandleCreateMaintenance(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleDeleteComponent

func (h *StatusAdminHandler) HandleDeleteComponent(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleDeleteIncident

func (h *StatusAdminHandler) HandleDeleteIncident(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleDeleteMaintenance

func (h *StatusAdminHandler) HandleDeleteMaintenance(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleGetSmtpConfig

func (h *StatusAdminHandler) HandleGetSmtpConfig(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleListComponents

func (h *StatusAdminHandler) HandleListComponents(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleListIncidents

func (h *StatusAdminHandler) HandleListIncidents(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleListMaintenance

func (h *StatusAdminHandler) HandleListMaintenance(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleListSubscribers

func (h *StatusAdminHandler) HandleListSubscribers(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandlePostUpdate

func (h *StatusAdminHandler) HandlePostUpdate(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleTestSmtp

func (h *StatusAdminHandler) HandleTestSmtp(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleUpdateComponent

func (h *StatusAdminHandler) HandleUpdateComponent(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleUpdateIncident

func (h *StatusAdminHandler) HandleUpdateIncident(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleUpdateMaintenance

func (h *StatusAdminHandler) HandleUpdateMaintenance(w http.ResponseWriter, r *http.Request)

func (*StatusAdminHandler) HandleUpdateSmtpConfig

func (h *StatusAdminHandler) HandleUpdateSmtpConfig(w http.ResponseWriter, r *http.Request)

type SwarmHandler added in v1.2.0

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

SwarmHandler handles Swarm API endpoints.

func NewSwarmHandler added in v1.2.0

func NewSwarmHandler(
	clusterFn func() *swarm.SwarmCluster,
	discoveryFn func() *swarm.ServiceDiscovery,
	detectorFn func() *swarm.Detector,
	nodeStore swarm.NodeStore,
	updateTracker *swarm.UpdateTracker,
	crashLoop *swarm.CrashLoopDetector,
	replicaChecker *swarm.ReplicaHealthChecker,
	containerSvc *container.Service,
	resourceSvc *resource.Service,
) *SwarmHandler

NewSwarmHandler creates a new Swarm API handler.

func (*SwarmHandler) HandleGetCluster added in v1.2.0

func (h *SwarmHandler) HandleGetCluster(w http.ResponseWriter, r *http.Request)

HandleGetCluster handles GET /api/v1/swarm/cluster (Enterprise).

func (*SwarmHandler) HandleGetDashboard added in v1.2.0

func (h *SwarmHandler) HandleGetDashboard(w http.ResponseWriter, r *http.Request)

HandleGetDashboard handles GET /api/v1/swarm/dashboard (Enterprise).

func (*SwarmHandler) HandleGetInfo added in v1.2.0

func (h *SwarmHandler) HandleGetInfo(w http.ResponseWriter, r *http.Request)

HandleGetInfo handles GET /api/v1/swarm/info.

func (*SwarmHandler) HandleGetNodeDetail added in v1.2.0

func (h *SwarmHandler) HandleGetNodeDetail(w http.ResponseWriter, r *http.Request)

HandleGetNodeDetail handles GET /api/v1/swarm/nodes/{nodeID} (Enterprise).

func (*SwarmHandler) HandleGetService added in v1.2.0

func (h *SwarmHandler) HandleGetService(w http.ResponseWriter, r *http.Request)

HandleGetService handles GET /api/v1/swarm/services/{serviceID}.

func (*SwarmHandler) HandleGetServiceResources added in v1.2.0

func (h *SwarmHandler) HandleGetServiceResources(w http.ResponseWriter, r *http.Request)

HandleGetServiceResources handles GET /api/v1/swarm/services/{serviceID}/resources (Enterprise). Returns per-task CPU/RAM/network snapshots for a Swarm service.

func (*SwarmHandler) HandleGetUpdateStatus added in v1.2.0

func (h *SwarmHandler) HandleGetUpdateStatus(w http.ResponseWriter, r *http.Request)

HandleGetUpdateStatus handles GET /api/v1/swarm/services/{serviceID}/update-status (Enterprise).

func (*SwarmHandler) HandleListNodes added in v1.2.0

func (h *SwarmHandler) HandleListNodes(w http.ResponseWriter, r *http.Request)

HandleListNodes handles GET /api/v1/swarm/nodes (Enterprise).

func (*SwarmHandler) HandleListServices added in v1.2.0

func (h *SwarmHandler) HandleListServices(w http.ResponseWriter, r *http.Request)

HandleListServices handles GET /api/v1/swarm/services.

func (*SwarmHandler) HandleListTasks added in v1.2.0

func (h *SwarmHandler) HandleListTasks(w http.ResponseWriter, r *http.Request)

HandleListTasks handles GET /api/v1/swarm/tasks.

type TopConsumer

type TopConsumer struct {
	ContainerID   int64   `json:"container_id"`
	ContainerName string  `json:"container_name"`
	Value         float64 `json:"value"`
	Percent       float64 `json:"percent"`
	Rank          int     `json:"rank"`
}

TopConsumer represents a ranked container in the top consumers response.

type UpdateHandler

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

UpdateHandler handles update intelligence HTTP endpoints.

func NewUpdateHandler

func NewUpdateHandler(service *update.Service, store update.UpdateStore, containers ContainerInfoProvider) *UpdateHandler

NewUpdateHandler creates a new update handler.

func (*UpdateHandler) HandleCreateExclusion

func (h *UpdateHandler) HandleCreateExclusion(w http.ResponseWriter, r *http.Request)

HandleCreateExclusion handles POST /api/v1/updates/exclusions.

func (*UpdateHandler) HandleDeleteExclusion

func (h *UpdateHandler) HandleDeleteExclusion(w http.ResponseWriter, r *http.Request)

HandleDeleteExclusion handles DELETE /api/v1/updates/exclusions/{id}.

func (*UpdateHandler) HandleGetContainerUpdate

func (h *UpdateHandler) HandleGetContainerUpdate(w http.ResponseWriter, r *http.Request)

HandleGetContainerUpdate handles GET /api/v1/updates/{container_id}.

func (*UpdateHandler) HandleGetDryRun

func (h *UpdateHandler) HandleGetDryRun(w http.ResponseWriter, r *http.Request)

HandleGetDryRun handles GET /api/v1/updates/dry-run.

func (*UpdateHandler) HandleGetScanStatus

func (h *UpdateHandler) HandleGetScanStatus(w http.ResponseWriter, r *http.Request)

HandleGetScanStatus handles GET /api/v1/updates/scan/{scan_id}.

func (*UpdateHandler) HandleGetUpdateSummary

func (h *UpdateHandler) HandleGetUpdateSummary(w http.ResponseWriter, r *http.Request)

HandleGetUpdateSummary handles GET /api/v1/updates/summary.

func (*UpdateHandler) HandleListExclusions

func (h *UpdateHandler) HandleListExclusions(w http.ResponseWriter, r *http.Request)

HandleListExclusions handles GET /api/v1/updates/exclusions.

func (*UpdateHandler) HandleListUpdates

func (h *UpdateHandler) HandleListUpdates(w http.ResponseWriter, r *http.Request)

HandleListUpdates handles GET /api/v1/updates.

func (*UpdateHandler) HandlePinVersion

func (h *UpdateHandler) HandlePinVersion(w http.ResponseWriter, r *http.Request)

HandlePinVersion handles POST /api/v1/updates/{container_id}/pin.

func (*UpdateHandler) HandleTriggerScan

func (h *UpdateHandler) HandleTriggerScan(w http.ResponseWriter, r *http.Request)

HandleTriggerScan handles POST /api/v1/updates/scan.

func (*UpdateHandler) HandleUnpinVersion

func (h *UpdateHandler) HandleUnpinVersion(w http.ResponseWriter, r *http.Request)

HandleUnpinVersion handles DELETE /api/v1/updates/{container_id}/pin.

type UptimeDailyFetcher

type UptimeDailyFetcher interface {
	GetEndpointDailyUptime(ctx context.Context, endpointID int64, days int) ([]sqlite.DailyUptime, error)
	GetHeartbeatDailyUptime(ctx context.Context, heartbeatID int64, days int) ([]sqlite.DailyUptime, error)
}

UptimeDailyFetcher abstracts the daily uptime store for testing.

type UptimeDailyHandler

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

UptimeDailyHandler handles daily uptime aggregation endpoints.

func NewUptimeDailyHandler

func NewUptimeDailyHandler(store UptimeDailyFetcher) *UptimeDailyHandler

NewUptimeDailyHandler creates a new daily uptime handler.

func (*UptimeDailyHandler) HandleEndpointDailyUptime

func (h *UptimeDailyHandler) HandleEndpointDailyUptime(w http.ResponseWriter, r *http.Request)

HandleEndpointDailyUptime handles GET /api/v1/endpoints/{id}/uptime/daily.

func (*UptimeDailyHandler) HandleHeartbeatDailyUptime

func (h *UptimeDailyHandler) HandleHeartbeatDailyUptime(w http.ResponseWriter, r *http.Request)

HandleHeartbeatDailyUptime handles GET /api/v1/heartbeats/{id}/uptime/daily.

type WebhookHandler

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

WebhookHandler handles webhook subscription CRUD endpoints.

func NewWebhookHandler

func NewWebhookHandler(store webhook.WebhookSubscriptionStore, logger *slog.Logger, allowPrivateWebhooks bool) *WebhookHandler

NewWebhookHandler creates a new webhook handler.

func (*WebhookHandler) HandleCreateWebhook

func (h *WebhookHandler) HandleCreateWebhook(w http.ResponseWriter, r *http.Request)

HandleCreateWebhook handles POST /api/v1/webhooks.

func (*WebhookHandler) HandleDeleteWebhook

func (h *WebhookHandler) HandleDeleteWebhook(w http.ResponseWriter, r *http.Request)

HandleDeleteWebhook handles DELETE /api/v1/webhooks/{id}.

func (*WebhookHandler) HandleListWebhooks

func (h *WebhookHandler) HandleListWebhooks(w http.ResponseWriter, r *http.Request)

HandleListWebhooks handles GET /api/v1/webhooks.

func (*WebhookHandler) HandleTestWebhook

func (h *WebhookHandler) HandleTestWebhook(w http.ResponseWriter, r *http.Request)

HandleTestWebhook handles POST /api/v1/webhooks/{id}/test.

Jump to

Keyboard shortcuts

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