utils

package
v0.0.0-...-a22f0a5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BaseGmaiMessageURL used for generating link to the message
	BaseGmailMessageURL = "https://mail.google.com/mail/u/0/#inbox/%MESSAGE_ID%"
	User                = "me"
	DateTimeFormat      = "02 Jan 06 15:04:05 MST"
	NotificationsLimit  = 5
	Timeout             = 10
)

Variables

This section is empty.

Functions

func GetClient

func GetClient(ctx context.Context, config *oauth2.Config) *http.Client

GetClient uses a Context and Config to retrieve a Token then generate a Client. It returns the generated Client.

func NotifyMessage

func NotifyMessage(message models.Message)

NotifyMessage - triggers an notification

func ProcessMessages

func ProcessMessages(
	mResponseMessages []*gmail.Message,
	gmailClient *gmail.Service,
	queue []models.Message,
	processedQueue map[string]bool,
	pushToQueue bool,
	lastProcessedTimestamp int64) ([]models.Message, map[string]bool, bool, int64)

ProcessMessages - process unread messages

func SystemNotification

func SystemNotification(text string)

SystemNotification used for system notifications

Types

This section is empty.

Jump to

Keyboard shortcuts

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