http

package
v0.0.0-...-8922687 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerClosed = http.ErrServerClosed
)

Functions

func New

func New(address string, queue chan daemon.Message) *http.Server

New creates a new HTTP server

Types

type CommonRequest

type CommonRequest struct {
	From    string         `json:"from"`
	Subject string         `json:"subject"`
	Body    string         `json:"body"`
	Format  *daemon.Format `json:"format,omitempty"`
	ReplyTo *string        `json:"replyTo,omitempty"`
}

CommonRequest contains all the shared fields between the different sending types

type SendBatchRequest

type SendBatchRequest struct {
	// To is a list of recipient emails
	To []string `json:"to"`
	CommonRequest
}

type SendRequest

type SendRequest struct {
	// To is a single recipient email
	To string `json:"to"`
	CommonRequest
}

type SendTemplateRequest

type SendTemplateRequest struct {
	// To is a map of all the recipient emails to their context data
	To map[string]map[string]string `json:"to"`
	CommonRequest
}

Jump to

Keyboard shortcuts

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