hook

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventEmail     = "email"
	ActionReceived = "received"
)

Variables

This section is empty.

Functions

func SendSQS

func SendSQS(ctx context.Context, api api.SQSSendMessageAPI, input EmailReceipt) error

SendSQS sends an email receipt to SQS, if SQS is enabled. Otherwise, it does nothing.

func SendWebhook

func SendWebhook(ctx context.Context, data *Hook) error

SendWebhook sends a webhook to the configured URL, if webhook is enabled. Otherwise, it does nothing.

Types

type Email

type Email struct {
	ID string `json:"id"` // message id
}

type EmailReceipt

type EmailReceipt struct {
	MessageID string
	Timestamp string
}

EmailReceipt contains information needed for an email receipt

type Hook added in v1.8.0

type Hook struct {
	Event     string `json:"event"`
	Action    string `json:"action"`
	Timestamp string `json:"timestamp"`
	Email     Email
}

Jump to

Keyboard shortcuts

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