dispatch
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
Functions¶
This section is empty.
Types¶
typeDeliveryFunc¶
DeliveryFunc delivers the notification.The first return param indicates whether a retry can be attempted (i.e. a temporary error), and the second returnsany error that may have arisen.If (false, nil) is returned, that is considered a successful dispatch.
typeInboxHandler¶added inv2.21.0
type InboxHandler struct {// contains filtered or unexported fields}
InboxHandler is responsible for dispatching notification messages to the Coder Inbox.
funcNewInboxHandler¶added inv2.21.0
func NewInboxHandler(logslog.Logger, storeInboxStore, pspubsub.Pubsub) *InboxHandler
func (*InboxHandler)Dispatcher¶added inv2.21.0
func (s *InboxHandler) Dispatcher(payloadtypes.MessagePayload, titleTmpl, bodyTmplstring, _template.FuncMap) (DeliveryFunc,error)
typeInboxStore¶added inv2.21.0
type InboxStore interface {InsertInboxNotification(ctxcontext.Context, argdatabase.InsertInboxNotificationParams) (database.InboxNotification,error)}
typeSMTPHandler¶
type SMTPHandler struct {// contains filtered or unexported fields}
SMTPHandler is responsible for dispatching notification messages via SMTP.NOTE: auth and TLS is currently *not* enabled in this initial thin slice.TODO: implement DKIM/SPF/DMARC?https://github.com/emersion/go-msgauth
funcNewSMTPHandler¶
func NewSMTPHandler(cfgcodersdk.NotificationsEmailConfig, logslog.Logger) *SMTPHandler
func (*SMTPHandler)Dispatcher¶
func (s *SMTPHandler) Dispatcher(payloadtypes.MessagePayload, titleTmpl, bodyTmplstring, helperstemplate.FuncMap) (DeliveryFunc,error)
typeWebhookHandler¶
type WebhookHandler struct {// contains filtered or unexported fields}
WebhookHandler dispatches notification messages via an HTTP POST webhook.
funcNewWebhookHandler¶
func NewWebhookHandler(cfgcodersdk.NotificationsWebhookConfig, logslog.Logger) *WebhookHandler
func (*WebhookHandler)Dispatcher¶
func (w *WebhookHandler) Dispatcher(payloadtypes.MessagePayload, titleMarkdown, bodyMarkdownstring, _template.FuncMap) (DeliveryFunc,error)
typeWebhookPayload¶
type WebhookPayload struct {Versionstring `json:"_version"`MsgIDuuid.UUID `json:"msg_id"`Payloadtypes.MessagePayload `json:"payload"`Titlestring `json:"title"`TitleMarkdownstring `json:"title_markdown"`Bodystring `json:"body"`BodyMarkdownstring `json:"body_markdown"`}
WebhookPayload describes the JSON payload to be delivered to the configured webhook endpoint.