gwi

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: LGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

gwi contains the email handler for interacting with gwi.

Index

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

Jump to

Keyboard shortcuts

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