Documentation ¶
Index ¶
- Variables
- func Credentials(file string) ([]byte, error)
- func DisplayMessages(srv *gmail.Service, r *gmail.ListMessagesResponse, userId string) error
- func FetchLabels(srv *gmail.Service) error
- func FetchMessages(srv *gmail.Service, userID, query string) (*gmail.ListMessagesResponse, error)
- func GmailService(client *http.Client) (*gmail.Service, error)
- func GoogleClient(credentials []byte, tokenFile string) (*http.Client, error)
- func MarkRead(srv *gmail.Service, r *gmail.ListMessagesResponse, userId string) error
- func SendMessages(srv *gmail.Service, r *gmail.ListMessagesResponse, ...) error
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 ¶
Credentials reads creadentials from file and returns it.
func DisplayMessages ¶
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 ¶
FetchMessages fetches user messages based on query and returns them.
func GmailService ¶
GmailService creates and returns new Gmail Service.
func GoogleClient ¶
GoogleClient creates new Google Client and returns it.
func SendMessages ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.