svc

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportMessages

func ExportMessages(msgs chan *gmail.Message, total int64, pui *ui.ProgressUI, saveMsgAttachments SaveMsgAttachments) *excelize.File

func GetClient

func GetClient(config *oauth2.Config, TokenFile string, BatchMode bool, NoBrowser bool, NoTokenSave bool) *http.Client

Retrieve a token, saves the token, then returns the generated client.

func GetGmailSrv

func GetGmailSrv(CredsFile string, TokenFile string, BatchMode bool, NoBrowser bool, NoTokenSave bool) (*gmail.Service, error)

func GetLabelsByIdOrName added in v0.0.2

func GetLabelsByIdOrName(srv *gmail.Service, user string, refs ...string) ([]*gmail.Label, error)

func GetMessages

func GetMessages(srv *gmail.Service, messagesLimit int, pui *ui.ProgressUI, user string, pageSize int64, pageLimit int64, labelRefs ...string) (chan *gmail.Message, int64)

func ListLabels

func ListLabels(srv *gmail.Service, user string) ([]*gmail.Label, error)

func RemoveNils added in v0.0.2

func RemoveNils[C any](s []*C) []*C

Types

type LocalAttachment

type LocalAttachment struct {
	Filename string
}

func SaveAttachments

func SaveAttachments(srv *gmail.Service, rateLimiter ratelimit.Limiter, AttachmentsDir string, AttachmentsSeed *[]int32, user string, message *gmail.Message) ([]*LocalAttachment, error)

type SaveMsgAttachments

type SaveMsgAttachments func(*gmail.Message) ([]*LocalAttachment, error)

Jump to

Keyboard shortcuts

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