Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) ApplyLabelToExistingEmail(ctx context.Context, filter Filter) error
- func (c *Client) CreateFilter(ctx context.Context, filter Filter) error
- func (c *Client) CreateLabel(ctx context.Context, label string) error
- func (c *Client) DeleteAllFilter(ctx context.Context) error
- func (c *Client) DeleteFilterByID(ctx context.Context, id string) error
- func (c *Client) ListFilters(ctx context.Context) ([]Filter, error)
- type Filter
- type FilterAction
- type FilterActionImportant
- type FilterCriteria
- type FilterResource
Constants ¶
View Source
const ResourceTypeFilter = "Filter"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a gmail configuration client with label id <=> name map cache.
func (*Client) ApplyLabelToExistingEmail ¶ added in v0.0.4
func (*Client) CreateFilter ¶
func (*Client) DeleteFilterByID ¶
type Filter ¶
type Filter struct { Criteria FilterCriteria `yaml:"criteria"` Action FilterAction `yaml:"action"` // contains filtered or unexported fields }
type FilterAction ¶
type FilterAction struct { Archive bool `yaml:"archive,omitempty"` MarkAsRead bool `yaml:"mark_as_read,omitempty"` Star bool `yaml:"star,omitempty"` AddLabel string `yaml:"add_label,omitempty"` ForwardTo string `yaml:"forward_to,omitempty"` Delete bool `yaml:"delete,omitempty"` NeverMarkAsSpam bool `yaml:"never_mark_as_spam,omitempty"` Important FilterActionImportant `yaml:"important,omitempty"` Category string `yaml:"category,omitempty"` }
func (FilterAction) String ¶
func (action FilterAction) String() string
type FilterActionImportant ¶
type FilterActionImportant string
const ( FilterActionImportantAlways FilterActionImportant = "always" FilterActionImportantNever FilterActionImportant = "never" )
type FilterCriteria ¶
type FilterCriteria struct { From string `yaml:"from,omitempty"` To string `yaml:"to,omitempty"` Subject string `yaml:"subject,omitempty"` Query string `yaml:"query,omitempty"` NegatedQuery string `yaml:"negated_query,omitempty"` LargerThan int64 `yaml:"larger_than,omitempty"` SmallerThan int64 `yaml:"smaller_than,omitempty"` HasAttachment bool `yaml:"has_attachment,omitempty"` ExcludeChats bool `yaml:"exclude_chats,omitempty"` }
func (FilterCriteria) String ¶
func (criteria FilterCriteria) String() string
type FilterResource ¶
type FilterResource struct {
Filters []Filter `yaml:"filters"`
}
Click to show internal directories.
Click to hide internal directories.