auth

package
v0.0.0-...-d7e1cbf Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CredsFile stores path to Gmail API credentials.
	CredsFile string
)

Functions

func GetToken

func GetToken() (err error)

GetToken requests an authorization token and stores it in `Token`.

func NewGmailService

func NewGmailService() (*gmail.Service, error)

NewGmailService creates a new `gmail.Service` using `Config` and `Token`.

func ReadCredentials

func ReadCredentials() error

ReadCredentials unmarshals `CredsFile` to `config`.

func ReadToken

func ReadToken(tokenFile string) error

ReadToken reads `tokenFile` to `Token`.

func SaveToken

func SaveToken(tokenPath string) error

SaveToken saves `Token` at `tokenPath`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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