cmdglib

package
v0.0.0-...-4809f3f Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2016 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Inbox     = "INBOX"
	Unread    = "UNREAD"
	Draft     = "DRAFT"
	Important = "IMPORTANT"
	Spam      = "SPAM"
	Starred   = "STARRED"
	Trash     = "TRASH"
	Sent      = "SENT"
)

Well known labels.

Variables

This section is empty.

Functions

func FromString

func FromString(m *gmail.Message, inSent bool) string

FromString gets the source address, unless mail is sent, in which case get destination.

func GetHeader

func GetHeader(m *gmail.Message, header string) string

GetHeader gets the value for a given header from a Message.

func GetHeaderPart

func GetHeaderPart(p *gmail.MessagePart, header string) string

GetHeaderPart gets the value for a given header from a MessagePart.

func HasLabel

func HasLabel(labels []string, needle string) bool

HasLabel checks if the given label is in the slice.

func ParseTime

func ParseTime(s string) (time.Time, error)

ParseTime tries a few time formats and returns the one that works.

func TimeString

func TimeString(m *gmail.Message) string

TimeString returns "Date" header as a useful string. (e.g. mail from today shows hours)

Types

This section is empty.

Jump to

Keyboard shortcuts

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