Documentation
¶
Index ¶
- type NotificationHandler
- func (h *NotificationHandler) CreateTemplate(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) GetNotification(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) GetStats(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) GetTemplate(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) Health(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) ListNotifications(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) ListTemplates(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) PreviewTemplate(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) ReplayNotification(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) SendNotification(w http.ResponseWriter, r *http.Request)
- func (h *NotificationHandler) UpdateTemplate(w http.ResponseWriter, r *http.Request)
- type Router
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 ¶
func (h *NotificationHandler) Health(w http.ResponseWriter, r *http.Request)
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 ¶
SetupRoutes configures all routes for the notification service.