Documentation ¶
Index ¶
- Constants
- func BodyText(msg gmail.Message, mimeType string) string
- func Download(d Downloader) []*store.Label
- func DownloadFullMessage(d Downloader, id string)
- func DownloadFullMessages(d Downloader)
- func DownloadLabels(d Downloader) []*store.Label
- func ExtractHeader(gmail gmail.Message, field string) string
- func GetBodyPartByMimeType(msg gmail.Message, mimeType string) string
- func GetPartByMimeType(parts []*gmail.MessagePart, mimeType string) string
- func GmailToMessage(gmail gmail.Message, inboxUrl string, downloaded time.Time) (store.Message, error)
- func HasMatchingHeader(excludeHeaders map[string][]string, message gmail.Message) (string, string)
- func SearchMessages(d Downloader)
- type Downloader
- type Options
Constants ¶
View Source
const RetryWaitInterval = 60
number of seconds to wait before retrying (multiplied by number of retries)
10s was too short for API rate limiting to recover, 60s may be longer than needed
Variables ¶
This section is empty.
Functions ¶
func Download ¶
func Download(d Downloader) []*store.Label
Download everything that is requested in calliope generic Message format
func DownloadFullMessage ¶
func DownloadFullMessage(d Downloader, id string)
func DownloadFullMessages ¶
func DownloadFullMessages(d Downloader)
func DownloadLabels ¶
func DownloadLabels(d Downloader) []*store.Label
func ExtractHeader ¶
func GetBodyPartByMimeType ¶
func GetPartByMimeType ¶
func GmailToMessage ¶
func HasMatchingHeader ¶
func SearchMessages ¶
func SearchMessages(d Downloader)
SearchMessages gets list of message and thread IDs (not full message content)
Types ¶
type Downloader ¶
type Downloader struct { SearchChan chan *gmail.Message MessageChan chan *store.Message M2 chan *store.Message WorkersQueue chan bool MaxWorkers int Svc *gmail.Service Options Options DoListLabels func(*gmail.UsersLabelsListCall) GmailToMessage func(gmail.Message, string, time.Time) (store.Message, error) StartedAt time.Time // contains filtered or unexported fields }
func New ¶
func New(svc *gmail.Service, options Options, maxWorkers int) Downloader
func (*Downloader) DoGetWrapper ¶
func (d *Downloader) DoGetWrapper(id string) (*gmail.Message, error)
func (Downloader) NoNewWorkers ¶
func (d Downloader) NoNewWorkers()
Click to show internal directories.
Click to hide internal directories.