Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController() (*Controller, error)
func (*Controller) GenerateConfirmID ¶
func (c *Controller) GenerateConfirmID(req *Request) string
func (*Controller) GenerateId ¶
func (c *Controller) GenerateId(hash string) string
GenerateId generates a Message-ID for this newsletter using the given hash.
func (*Controller) GetHashFromId ¶
func (c *Controller) GetHashFromId(messageID string) (string, error)
GetHashFromId retrieves the hash from the given messageID of the form: `USER-HASH@SERVER`
func (*Controller) HashWithSecret ¶
func (c *Controller) HashWithSecret(s string) string
type Request ¶
Request is an email received by the controller.
It is a very basic wrapper around letters.Email that parses some additional header fields that we always want to be valid. It is used to pass the context of a single request to the different routes. Its logger Log can be used for contextualised logging.
type SyslogHandler ¶
type SyslogHandler struct {
// contains filtered or unexported fields
}
SyslogHandler is a basic shim between slog.Handler and syslog.Writer.
func NewSyslogHandler ¶
func NewSyslogHandler(writer Writer) *SyslogHandler
NewSyslogHandler creates a new SyslogHandler using the given writer.
func (*SyslogHandler) Enabled ¶
Enabled reports whether the handler handles records at the given level.