Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProcessedAttachment ¶
type ProcessedAttachment struct { Body io.Reader Filename string // Original filename OriginalName string Headers []*gmail.MessagePartHeader }
ProcessedAttachment file contents read from the emails fetched
type ProcessedAttachments ¶
type ProcessedAttachments []*ProcessedAttachment
ProcessedAttachments a slice of ProcessAttachment
func (ProcessedAttachments) Close ¶
func (at ProcessedAttachments) Close() error
Close closes readers which also implement Closer interface
type Service ¶
type Service struct { UserID string // DefaultQ is provided when filtering messages Gmail search box style DefaultQ string WriterGenerator WriterGenerator // contains filtered or unexported fields }
Service encapsulates the needed configuration settings to make successful Gmail api calls The struct methods have not been optimized for concurrent use, create new instances for different goroutines
func NewService ¶
NewService instantiates a new service struct for API calls
func (*Service) GmailService ¶ added in v0.0.3
func (srv *Service) GmailService() *gmail.Service
GmailService returns the underlying gmail service
func (*Service) ListMessages ¶
ListMessages fetches messages from the specified userID
func (*Service) ProcessPDFAttachments ¶
func (srv *Service) ProcessPDFAttachments(markRead bool) (ProcessedAttachments, error)
ProcessPDFAttachments reads pdf attachments from the emails fetched
Click to show internal directories.
Click to hide internal directories.