Movatterモバイル変換


[0]ホーム

URL:


dispatch

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:35Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (ErrValidationNoFromAddress =xerrors.New("'from' address not defined")ErrValidationNoToAddress   =xerrors.New("'to' address(es) not defined")ErrValidationNoSmarthost   =xerrors.New("'smarthost' address not defined")ErrValidationNoHello       =xerrors.New("'hello' not defined"))

Functions

This section is empty.

Types

typeDeliveryFunc

type DeliveryFunc func(ctxcontext.Context, msgIDuuid.UUID) (retryablebool, errerror)

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.

typeInboxHandleradded inv2.21.0

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

InboxHandler is responsible for dispatching notification messages to the Coder Inbox.

funcNewInboxHandleradded inv2.21.0

func NewInboxHandler(logslog.Logger, storeInboxStore, pspubsub.Pubsub) *InboxHandler

func (*InboxHandler)Dispatcheradded inv2.21.0

func (s *InboxHandler) Dispatcher(payloadtypes.MessagePayload, titleTmpl, bodyTmplstring, _template.FuncMap) (DeliveryFunc,error)

typeInboxStoreadded 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

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.

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.

Source Files

View all Source files

Directories

PathSynopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp