gmail

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 3 Imported by: 0

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).

type Provider

type Provider = omnigmail.Provider

Provider is an alias for the Gmail provider.

func New

func New(config Config) (*Provider, error)

New creates a new Gmail provider.

Jump to

Keyboard shortcuts

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