Documentation
¶
Index ¶
- Constants
- func IpFromRequest(r *http.Request, trustProxy bool, position int) net.IP
- func QrCode(bridgeLines []string) ([]byte, error)
- func StartEmail(emailCfg *internal.EmailConfig, distCfg *internal.Config, ...)
- func StartWebServer(apiCfg *internal.WebApiConfig, distCfg *internal.Config, ...)
- type Attachment
- type IncomingEmailHandler
- type SendFunction
Constants ¶
View Source
const ( LastIP = iota FirstIP )
Variables ¶
This section is empty.
Functions ¶
func StartEmail ¶
func StartEmail(emailCfg *internal.EmailConfig, distCfg *internal.Config, dist distributors.Distributor, incomingHandler IncomingEmailHandler)
func StartWebServer ¶
func StartWebServer(apiCfg *internal.WebApiConfig, distCfg *internal.Config, dist distributors.Distributor, handlers map[string]http.HandlerFunc)
StartWebServer helps distributor frontends start a Web server and configure handlers. This function does not return until it receives a SIGINT or SIGTERM. When that happens, the function calls the distributor's Shutdown method and shuts down the Web server.
Types ¶
type IncomingEmailHandler ¶
type IncomingEmailHandler func(msg *mail.Message, send SendFunction) error
type SendFunction ¶
type SendFunction func(subject, body string, attachments ...*Attachment) error
Click to show internal directories.
Click to hide internal directories.