Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equivalent ¶
Equivalent returns true if two labels can be considered equal, despite a different ID.
Unspecified color is also ignored.
Types ¶
type Color ¶
Color is the color of a label.
See https://developers.google.com/gmail/api/v1/reference/users/labels for the list of possible colors.
type Labels ¶
type Labels []Label
Labels is a list of labels.
func FromConfig ¶
FromConfig creates labels from the config format.
type LabelsDiff ¶
type LabelsDiff struct { Modified []ModifiedLabel Added Labels Removed Labels }
LabelsDiff contains the diff of two lists of labels.
func Diff ¶
func Diff(upstream, local Labels) (LabelsDiff, error)
Diff computes the diff between two lists of labels.
To compute the diff, IDs are ignored, only the properties of the labels are actually considered.
func (LabelsDiff) String ¶
func (d LabelsDiff) String() string
type ModifiedLabel ¶
ModifiedLabel is a label in two versions, the old and the new.
Click to show internal directories.
Click to hide internal directories.