handler

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevBoxHandler

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

DevBoxHandler provides REST API endpoints for the development inbox.

func NewDevBoxHandler

func NewDevBoxHandler(store *memory.Store, mailpitCfg memory.MailpitConfig) *DevBoxHandler

NewDevBoxHandler creates a new devbox handler.

func (*DevBoxHandler) BroadcastNewChat

func (h *DevBoxHandler) BroadcastNewChat(id string)

BroadcastNewChat broadcasts a new chat message event.

func (*DevBoxHandler) BroadcastNewEmail

func (h *DevBoxHandler) BroadcastNewEmail(id string)

BroadcastNewEmail broadcasts a new email event.

func (*DevBoxHandler) BroadcastNewPush

func (h *DevBoxHandler) BroadcastNewPush(id string)

BroadcastNewPush broadcasts a new push notification event.

func (*DevBoxHandler) BroadcastNewSMS

func (h *DevBoxHandler) BroadcastNewSMS(id string)

BroadcastNewSMS broadcasts a new SMS event.

func (*DevBoxHandler) HandleClearAll

func (h *DevBoxHandler) HandleClearAll(w http.ResponseWriter, r *http.Request)

HandleClearAll removes all stored messages.

func (*DevBoxHandler) HandleDeleteChatByID

func (h *DevBoxHandler) HandleDeleteChatByID(w http.ResponseWriter, r *http.Request)

HandleDeleteChatByID deletes a single chat message by ID.

func (*DevBoxHandler) HandleDeleteEmailByID

func (h *DevBoxHandler) HandleDeleteEmailByID(w http.ResponseWriter, r *http.Request)

HandleDeleteEmailByID deletes a single email by ID.

func (*DevBoxHandler) HandleDeletePushByID

func (h *DevBoxHandler) HandleDeletePushByID(w http.ResponseWriter, r *http.Request)

HandleDeletePushByID deletes a single push notification by ID.

func (*DevBoxHandler) HandleDeleteSMSByID

func (h *DevBoxHandler) HandleDeleteSMSByID(w http.ResponseWriter, r *http.Request)

HandleDeleteSMSByID deletes a single SMS by ID.

func (*DevBoxHandler) HandleGetChat

func (h *DevBoxHandler) HandleGetChat(w http.ResponseWriter, r *http.Request)

HandleGetChat returns all stored chat messages.

func (*DevBoxHandler) HandleGetChatByID

func (h *DevBoxHandler) HandleGetChatByID(w http.ResponseWriter, r *http.Request)

HandleGetChatByID returns a single chat message by ID.

func (*DevBoxHandler) HandleGetEmailByID

func (h *DevBoxHandler) HandleGetEmailByID(w http.ResponseWriter, r *http.Request)

HandleGetEmailByID returns a single email by ID.

func (*DevBoxHandler) HandleGetEmails

func (h *DevBoxHandler) HandleGetEmails(w http.ResponseWriter, r *http.Request)

HandleGetEmails returns all stored emails.

func (*DevBoxHandler) HandleGetPush

func (h *DevBoxHandler) HandleGetPush(w http.ResponseWriter, r *http.Request)

HandleGetPush returns all stored push notifications.

func (*DevBoxHandler) HandleGetPushByID

func (h *DevBoxHandler) HandleGetPushByID(w http.ResponseWriter, r *http.Request)

HandleGetPushByID returns a single push notification by ID.

func (*DevBoxHandler) HandleGetSMS

func (h *DevBoxHandler) HandleGetSMS(w http.ResponseWriter, r *http.Request)

HandleGetSMS returns all stored SMS messages.

func (*DevBoxHandler) HandleGetSMSByID

func (h *DevBoxHandler) HandleGetSMSByID(w http.ResponseWriter, r *http.Request)

HandleGetSMSByID returns a single SMS by ID.

func (*DevBoxHandler) HandleIngestChat

func (h *DevBoxHandler) HandleIngestChat(w http.ResponseWriter, r *http.Request)

HandleIngestChat receives a chat message from external sources.

func (*DevBoxHandler) HandleIngestEmail

func (h *DevBoxHandler) HandleIngestEmail(w http.ResponseWriter, r *http.Request)

HandleIngestEmail receives an email from external sources.

func (*DevBoxHandler) HandleIngestPush

func (h *DevBoxHandler) HandleIngestPush(w http.ResponseWriter, r *http.Request)

HandleIngestPush receives a push notification from external sources.

func (*DevBoxHandler) HandleIngestSMS

func (h *DevBoxHandler) HandleIngestSMS(w http.ResponseWriter, r *http.Request)

HandleIngestSMS receives an SMS from external sources.

func (*DevBoxHandler) HandleSSE

func (h *DevBoxHandler) HandleSSE(w http.ResponseWriter, r *http.Request)

HandleSSE handles Server-Sent Events connections.

func (*DevBoxHandler) HandleStats

func (h *DevBoxHandler) HandleStats(w http.ResponseWriter, r *http.Request)

HandleStats returns message counts by type.

func (*DevBoxHandler) Store

func (h *DevBoxHandler) Store() *memory.Store

Store returns the underlying memory store.

type GatewayHandler

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

GatewayHandler handles message sending API endpoints.

func NewGatewayHandler

func NewGatewayHandler(svc *service.GatewayService, store *memory.Store) *GatewayHandler

NewGatewayHandler creates a new gateway handler.

func (*GatewayHandler) HandleClearInbox

func (h *GatewayHandler) HandleClearInbox(w http.ResponseWriter, r *http.Request)

HandleClearInbox handles DELETE /v1/inbox

func (*GatewayHandler) HandleGetInbox

func (h *GatewayHandler) HandleGetInbox(w http.ResponseWriter, r *http.Request)

HandleGetInbox handles GET /v1/inbox

func (*GatewayHandler) HandleSendChat

func (h *GatewayHandler) HandleSendChat(w http.ResponseWriter, r *http.Request)

HandleSendChat handles POST /v1/chat

func (*GatewayHandler) HandleSendEmail

func (h *GatewayHandler) HandleSendEmail(w http.ResponseWriter, r *http.Request)

HandleSendEmail handles POST /v1/email

func (*GatewayHandler) HandleSendPush

func (h *GatewayHandler) HandleSendPush(w http.ResponseWriter, r *http.Request)

HandleSendPush handles POST /v1/push

func (*GatewayHandler) HandleSendSMS

func (h *GatewayHandler) HandleSendSMS(w http.ResponseWriter, r *http.Request)

HandleSendSMS handles POST /v1/sms

Jump to

Keyboard shortcuts

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