Documentation ¶
Index ¶
- Variables
- type Client
- func (c Client) CreateFilter(f filter.Filter, applyLabelsToOldEmails bool) error
- func (c Client) CreateLabelIfDoesNotExist(name string, m *label.LabelMap) (string, error)
- func (c Client) DeleteExistingFilters() error
- func (c Client) ExportExistingFilters(file string) error
- func (c Client) GetExistingFilters() ([]filter.Filter, error)
- func (c Client) GetLabels() (*label.LabelMap, error)
- type DryrunClient
- func (d DryrunClient) ApplyLabelsToOldEmails(f gmail.Filter) error
- func (d DryrunClient) CreateFilter(fltr *gmail.Filter) error
- func (d DryrunClient) CreateLabel(l *gmail.Label) (string, error)
- func (d DryrunClient) DeleteFilter(f string) error
- func (d DryrunClient) ListFilters() (*gmail.ListFiltersResponse, error)
- func (d DryrunClient) ListLabels() (*gmail.ListLabelsResponse, error)
- type GmailClient
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidOldEmailsModifyAction = fmt.Errorf("Invalid old email modification criteria")
)
API Errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { GmailClient GmailClient Labels *label.LabelMap }
Client is an api client
func (Client) CreateFilter ¶
func (Client) CreateLabelIfDoesNotExist ¶
func (Client) DeleteExistingFilters ¶
func (Client) ExportExistingFilters ¶
type DryrunClient ¶
type DryrunClient struct {
Inner gmailClient
}
DryrunClient is a read-only client and an implementationof GmailClient
func (DryrunClient) ApplyLabelsToOldEmails ¶
func (d DryrunClient) ApplyLabelsToOldEmails(f gmail.Filter) error
func (DryrunClient) CreateFilter ¶
func (d DryrunClient) CreateFilter(fltr *gmail.Filter) error
CreateFilter pretends to create a filter
func (DryrunClient) CreateLabel ¶
func (d DryrunClient) CreateLabel(l *gmail.Label) (string, error)
CreateLabel pretends to create a label
func (DryrunClient) DeleteFilter ¶
func (d DryrunClient) DeleteFilter(f string) error
DeleteFilter pretends to delete a filter
func (DryrunClient) ListFilters ¶
func (d DryrunClient) ListFilters() (*gmail.ListFiltersResponse, error)
ListFilters fetches a list of filters
func (DryrunClient) ListLabels ¶
func (d DryrunClient) ListLabels() (*gmail.ListLabelsResponse, error)
ListLabels fetches a list of labels
type GmailClient ¶
type GmailClient interface { ApplyLabelsToOldEmails(f gmail.Filter) error CreateFilter(*gmail.Filter) error CreateLabel(*gmail.Label) (string, error) DeleteFilter(string) error ListFilters() (*gmail.ListFiltersResponse, error) ListLabels() (*gmail.ListLabelsResponse, error) }
GmailClient is a client of the filters gmail API
Click to show internal directories.
Click to hide internal directories.