Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLabelMap ¶
type DefaultLabelMap struct {
// contains filtered or unexported fields
}
DefaultLabelMap implements the LabelMap interface with a regular map of strings
func NewDefaultLabelMap ¶
func NewDefaultLabelMap(idNameMap map[string]string) DefaultLabelMap
NewDefaultLabelMap creates a new DefaultLabelMap, given mapping between IDs to label names.
func (DefaultLabelMap) AddLabel ¶
func (m DefaultLabelMap) AddLabel(id, name string)
AddLabel adds a label to the mapping
type Exporter ¶
type Exporter interface {
// Export exports Gmail filters into Gmail API objects
Export(filters filter.Filters, lmap LabelMap) ([]*gmailv1.Filter, error)
}
Exporter exports Gmail filters into Gmail API objects
func DefaulExporter ¶
func DefaulExporter() Exporter
DefaulExporter returns a default implementation of a Gmail API filter exporter.
type Importer ¶
type Importer interface {
// Import exports Gmail filters into Gmail API objects.
//
// If some filter is invalid, the import skips it and returns only the
// valid ones, but records and returns the error in the end.
Import(filters []*gmailv1.Filter, lmap LabelMap) (filter.Filters, error)
}
Importer imports Gmail API objects into filters
func DefaulImporter ¶
func DefaulImporter() Importer
DefaulImporter returns a default implementation of a Gmail API filter exporter.
Click to show internal directories.
Click to hide internal directories.