gmailfunctions

package
v0.0.0-...-345f94a Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMail

func CheckMail() map[int]string

CheckMail - This function is to check the email account for emails in the inbox this function will return a map/list of the messsages in the inbox and their ID for use in the selection process

func Createclient

func Createclient() *gmail.Service

Createclient : This function returns a gmail.service/Client that can then be used to interact with the gmail api.

Types

type Mail

type Mail struct {
	MessageID      string
	From           string
	AttachmentID   string
	AttachmentData string
}

Mail is the gathering of all the data needed to download the attachments from an email

func GetAttachmentData

func GetAttachmentData(selectedmail []Mail) []Mail

GetAttachmentData : This function accesses the gmail api with a token and downloads the attachment file data.

func SelectMail

func SelectMail() []Mail

SelectMail will select the appropriate mail from the gmail account based on set requirements. This function will then be passed onto getattachment to download the file data.

Jump to

Keyboard shortcuts

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