Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API interface { AddLabels(lbs label.Labels) error AddFilters(fs filter.Filters) error UpdateLabels(lbs label.Labels) error DeleteFilters(ids []string) error DeleteLabels(ids []string) error }
API provides access to Gmail APIs.
type ConfigDiff ¶
type ConfigDiff struct { FiltersDiff filter.FiltersDiff LabelsDiff label.LabelsDiff LocalConfig GmailConfig }
ConfigDiff contains the difference between local and upstream configuration, including both labels and filters.
For validation purposes, the local config is also kept.
func Diff ¶
func Diff(local, upstream GmailConfig) (ConfigDiff, error)
Diff computes the diff between local and upstream configuration.
func (ConfigDiff) Empty ¶
func (d ConfigDiff) Empty() bool
Empty returns whether the diff contains no changes.
func (ConfigDiff) String ¶
func (d ConfigDiff) String() string
func (ConfigDiff) Validate ¶
func (d ConfigDiff) Validate() error
Validate returns whether the given diff is valid.
type ConfigParseRes ¶
type ConfigParseRes struct { GmailConfig Rules []parser.Rule }
ConfigParseRes represents the result of a config parse.
func FromConfig ¶
func FromConfig(cfg v1alpha3.Config) (ConfigParseRes, error)
FromConfig creates a GmailConfig from a parsed configuration file.
Click to show internal directories.
Click to hide internal directories.