gmailclient

package
v0.0.0-...-2fdebc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabelIds

func GetLabelIds(labelNames []string) (map[string]string, error)

Make a list of label IDs from their names

func MarkAsRead

func MarkAsRead(messageIds []string, archive bool) error

Types

type ParsedMessage

type ParsedMessage struct {
	Id       string
	Sender   string
	Subject  string
	Body     string
	LabelIds []string
}

func ListUnreadMessages

func ListUnreadMessages(labelIds []string) ([]ParsedMessage, error)

func (ParsedMessage) HasLabel

func (m ParsedMessage) HasLabel(labelId string) bool

type TokenSource

type TokenSource struct {
	// contains filtered or unexported fields
}

func NewTokenSource

func NewTokenSource(secretFile string, tokenFile string, scopes ...string) *TokenSource

func (*TokenSource) Token

func (t *TokenSource) Token() (*oauth2.Token, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL