handler

package
v0.0.0-...-d0c72dd Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SmtpHandler

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

func CreateSmtpHandler

func CreateSmtpHandler(mailStore store.MailStore) SmtpHandler

func (*SmtpHandler) Handle

func (handler *SmtpHandler) Handle(_ net.Addr, from string, to []string, data []byte)

Handle incoming emails. Parses the incoming mail into instances.Mail and then writes the mail into the mailStore with the key format from_to_2006-01-02T15:04:05Z07:00

type SpaHandler

type SpaHandler struct {
	Dist  fs.FS
	Index string
}

func NewSpaHandler

func NewSpaHandler(dist fs.FS, index string) *SpaHandler

func (SpaHandler) ServeHTTP

func (h SpaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles incoming http requests. Always responds with the index.html if the request resource does not exist

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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