task

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoLabelsFound = errors.New("no labels found")
)
View Source
var (
	ErrNoMessagesFound = errors.New("no messages found")
)

Functions

func Credentials

func Credentials(file string) ([]byte, error)

Credentials reads creadentials from file and returns it.

func DisplayMessages

func DisplayMessages(srv *gmail.Service, r *gmail.ListMessagesResponse, userId string) error

DisplayMessages reads user messages and prints them to output.

func FetchLabels

func FetchLabels(srv *gmail.Service) error

FetchLabels fetches user labels and prints them to output.

func FetchMessages

func FetchMessages(srv *gmail.Service, userID, query string) (*gmail.ListMessagesResponse, error)

FetchMessages fetches user messages based on query and returns them.

func GmailService

func GmailService(client *http.Client) (*gmail.Service, error)

GmailService creates and returns new Gmail Service.

func GoogleClient

func GoogleClient(credentials []byte, tokenFile string) (*http.Client, error)

GoogleClient creates new Google Client and returns it.

func MarkRead

func MarkRead(srv *gmail.Service, r *gmail.ListMessagesResponse, userId string) error

MarkRead marks given messages in the Gmail service as read.

func SendMessages

func SendMessages(srv *gmail.Service, r *gmail.ListMessagesResponse, pageAccessToken, gmailUserId, pageId string, recipients []string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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