Documentation ¶
Overview ¶
gwi contains the email handler for interacting with gwi.
Index ¶
- type GWIHandler
- func (g GWIHandler) Mail(file string) (interfaces.Email, error)
- func (f GWIHandler) Mailboxes(folder string) ([]interfaces.Mailbox, error)
- func (f GWIHandler) Mails(folder string) ([]interfaces.Email, error)
- func (g GWIHandler) Save(email interfaces.Email) error
- func (g GWIHandler) Send(mail interfaces.Email) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GWIHandler ¶ added in v0.6.2
type GWIHandler struct { Commands map[string]func(email interfaces.Email) error // contains filtered or unexported fields }
GWIConfig is used to configure the GWI interface for dovel. Root is the same root as in GWI: the path to the repositories. Commands lets you add functions that will run for each received email, the key of the map specifies a trigger in the form "key!". That is, if the email body starts with key! then the command key is run.
func NewGWIHandler ¶ added in v0.6.2
func NewGWIHandler(c config.InboxConfig, vault interfaces.Vault) (GWIHandler, error)
func (GWIHandler) Mail ¶ added in v0.6.2
func (g GWIHandler) Mail(file string) (interfaces.Email, error)
func (GWIHandler) Mailboxes ¶ added in v0.6.2
func (f GWIHandler) Mailboxes(folder string) ([]interfaces.Mailbox, error)
func (GWIHandler) Mails ¶ added in v0.6.2
func (f GWIHandler) Mails(folder string) ([]interfaces.Email, error)
func (GWIHandler) Save ¶ added in v0.6.2
func (g GWIHandler) Save(email interfaces.Email) error
Save saves emails to the correct repo using the subject to separate them. Subject field must be of form "[%s] %s".
func (GWIHandler) Send ¶ added in v0.6.2
func (g GWIHandler) Send(mail interfaces.Email) error
Click to show internal directories.
Click to hide internal directories.