Documentation
¶
Index ¶
- type EmailAddress
- type EventStorer
- type Link
- type MessageFilter
- type Module
- func (m *Module) Name() string
- func (m *Module) OnEventStored(ev event.Event)
- func (m *Module) OnEventsDeleted(uuids []string)
- func (m *Module) PreviewMapper() event.PreviewMapper
- func (m *Module) RegisterProtectedRoutes(mux *http.ServeMux, protect func(http.Handler) http.Handler)
- func (m *Module) RegisterRoutes(_ *http.ServeMux, store event.Store)
- func (m *Module) SetEventService(es EventStorer)
- func (m *Module) TCPServers() []tcp.ServerConfig
- func (m *Module) Type() string
- type ParsedEmail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailAddress ¶
EmailAddress represents an email address.
type EventStorer ¶
type Link ¶
type Link struct {
URL string `json:"url"`
Text string `json:"text,omitempty"`
Source string `json:"source"` // "html" or "text"
}
Link represents a URL extracted from a message.
type MessageFilter ¶
type MessageFilter struct {
To string
From string
Cc string
Subject string
SubjectContains string
SubjectRegex string
BodyContains string
Project string
Since float64 // unix timestamp (seconds)
Until float64 // unix timestamp (seconds)
Limit int
Offset int
Order string // "asc" or "desc"
}
MessageFilter holds filter criteria for SMTP message queries.
type Module ¶
type Module struct {
module.BaseModule
// contains filtered or unexported fields
}
func (*Module) OnEventStored ¶
OnEventStored notifies any long-poll waiters when a new SMTP event arrives.
func (*Module) OnEventsDeleted ¶
OnEventsDeleted removes the attachment rows of deleted events.
func (*Module) PreviewMapper ¶
func (m *Module) PreviewMapper() event.PreviewMapper
func (*Module) RegisterProtectedRoutes ¶
func (m *Module) RegisterProtectedRoutes(mux *http.ServeMux, protect func(http.Handler) http.Handler)
RegisterProtectedRoutes adds the SMTP testing API behind the API auth.
func (*Module) RegisterRoutes ¶
RegisterRoutes keeps the store for the SMTP testing API; the routes themselves go behind the API auth in RegisterProtectedRoutes.
func (*Module) SetEventService ¶
func (m *Module) SetEventService(es EventStorer)
func (*Module) TCPServers ¶
func (m *Module) TCPServers() []tcp.ServerConfig
type ParsedEmail ¶
type ParsedEmail struct {
ID *string `json:"id"`
Subject string `json:"subject"`
From []EmailAddress `json:"from"`
To []EmailAddress `json:"to"`
Cc []EmailAddress `json:"cc"`
Bcc []string `json:"bcc"`
ReplyTo []EmailAddress `json:"reply_to"`
Text string `json:"text"`
HTML string `json:"html"`
Raw string `json:"raw"`
}
ParsedEmail is the structure stored as event payload. Field names match the original PHP Buggregator Message::jsonSerialize().