Documentation ¶
Overview ¶
Package gmail provides the transport implementation for gmail.
Index ¶
Constants ¶
const (
// Provider is the provider name for Gmail.
Provider = "gmail"
)
Variables ¶
This section is empty.
Functions ¶
func AutowireTransport ¶
AutowireTransport autowires gmail transport from the given config.
func NewTransport ¶
NewTransport initializes a gmail transport. Credentials must be provided, if GMAIL_CREDENTIALS environment variable is not set. If no scopes are provided, the gmail.MailGoogleComScope (https://mail.google.com/) scope is used.
Types ¶
type Option ¶
type Option func(*transport)
Option is a gmail transport option.
func ClientOptions ¶
func ClientOptions(options ...option.ClientOption) Option
ClientOptions adds custom option.ClientOption to the gmail service.
func Credentials ¶
func Credentials(creds *google.Credentials) Option
Credentials adds an option.ClientOption that authenticates API calls.
func CredentialsFile ¶
CredentialsFile adds an option.ClientOption that authenticates API calls with the given service account or refresh token JSON credentials file.
func CredentialsJSON ¶
CredentialsJSON adds an option.ClientOption that authenticates API calls with the given service account or refresh token JSON credentials.