Documentation
¶
Overview ¶
Package gmail provides a Gmail email provider for omnichat.
This package wraps github.com/plexusone/omni-google/omnichat/gmail to provide a consistent interface with other omnichat providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// CredentialsJSON is the Google OAuth credentials JSON (client_secret.json contents).
// This is the application credentials, not the user token.
CredentialsJSON []byte
// TokenFile is the path to store/load the OAuth token.
// If empty, defaults to ~/.omnichat/gmail_token.json
TokenFile string
// FromAddress is the email address to send from.
// Use "me" to send from the authenticated user's address.
FromAddress string
// Scopes defines the OAuth scopes to request.
// If empty, defaults to gmail.GmailSendScope.
Scopes []string
// Logger is the logger instance.
Logger *slog.Logger
// ForceNewToken forces re-authentication even if a token exists.
ForceNewToken bool
}
Config configures the Gmail provider.
type IncomingEmail ¶
type IncomingEmail = omnigmail.IncomingEmail
IncomingEmail is an alias for email data (for future Watch API support).
Click to show internal directories.
Click to hide internal directories.