Documentation ¶
Index ¶
Constants ¶
const (
// Provider is the provider name for Gmail.
Provider = "gmail"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Carrier ¶
type Carrier struct {
// contains filtered or unexported fields
}
Carrier is the gmail carrier. It is thread-safe.
func NewCarrier ¶
NewCarrier creates a new gmail carrier. 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.
type Option ¶
type Option func(*config)
Option is a gmail carrier 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.