handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationHandler

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

NotificationHandler handles notification HTTP requests.

func NewNotificationHandler

func NewNotificationHandler(notifService *service.NotificationService) *NotificationHandler

NewNotificationHandler creates a new notification handler.

func (*NotificationHandler) CreateTemplate

func (h *NotificationHandler) CreateTemplate(w http.ResponseWriter, r *http.Request)

CreateTemplate creates a new notification template. POST /v1/templates

func (*NotificationHandler) GetNotification

func (h *NotificationHandler) GetNotification(w http.ResponseWriter, r *http.Request)

GetNotification retrieves a notification by ID. GET /v1/notifications/{id}

func (*NotificationHandler) GetStats

func (h *NotificationHandler) GetStats(w http.ResponseWriter, r *http.Request)

GetStats retrieves notification statistics. GET /admin/notifications/stats

func (*NotificationHandler) GetTemplate

func (h *NotificationHandler) GetTemplate(w http.ResponseWriter, r *http.Request)

GetTemplate retrieves a template by ID. GET /v1/templates/{id}

func (*NotificationHandler) Health

Health check endpoint. GET /health

func (*NotificationHandler) ListNotifications

func (h *NotificationHandler) ListNotifications(w http.ResponseWriter, r *http.Request)

ListNotifications retrieves notifications with filters. GET /v1/notifications

func (*NotificationHandler) ListTemplates

func (h *NotificationHandler) ListTemplates(w http.ResponseWriter, r *http.Request)

ListTemplates retrieves all templates. GET /v1/templates

func (*NotificationHandler) PreviewTemplate

func (h *NotificationHandler) PreviewTemplate(w http.ResponseWriter, r *http.Request)

PreviewTemplate previews a template with variables. POST /v1/templates/{id}/preview

func (*NotificationHandler) ReplayNotification

func (h *NotificationHandler) ReplayNotification(w http.ResponseWriter, r *http.Request)

ReplayNotification re-queues a notification for replay/testing. POST /admin/notifications/{id}/replay

func (*NotificationHandler) SendNotification

func (h *NotificationHandler) SendNotification(w http.ResponseWriter, r *http.Request)

SendNotification handles sending a new notification. POST /v1/notifications/send

func (*NotificationHandler) UpdateTemplate

func (h *NotificationHandler) UpdateTemplate(w http.ResponseWriter, r *http.Request)

UpdateTemplate updates an existing template. PUT /v1/templates/{id}

type Router

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

Router handles HTTP routing for the notification service.

func NewRouter

func NewRouter(handler *NotificationHandler) *Router

NewRouter creates a new router.

func (*Router) SetupRoutes

func (ro *Router) SetupRoutes() http.Handler

SetupRoutes configures all routes for the notification service.

Jump to

Keyboard shortcuts

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