Documentation
¶
Overview ¶
Package gmail implements a SourceConnector for Gmail and Google Drive, providing read-only tools for searching emails, reading threads, searching Drive files, and reading document contents.
Gmail and Drive share the same Google OAuth token. The Gmail OAuth scopes should include drive.readonly for Drive tools to work.
Index ¶
- type Connector
- func (c *Connector) Execute(ctx context.Context, tool string, params map[string]any, token []byte) (map[string]any, error)
- func (c *Connector) Provider() string
- func (c *Connector) Tools() []source.ToolDefinition
- func (c *Connector) WithClientOption(opt option.ClientOption) *Connector
- func (c *Connector) WithTokenEndpoint(tokenURL string) *Connector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector implements source.SourceConnector for Gmail.
func (*Connector) Tools ¶
func (c *Connector) Tools() []source.ToolDefinition
func (*Connector) WithClientOption ¶
func (c *Connector) WithClientOption(opt option.ClientOption) *Connector
WithClientOption returns a copy with a custom client option (for testing).
func (*Connector) WithTokenEndpoint ¶
WithTokenEndpoint returns a copy that uses the given URL for OAuth token refresh instead of Google's production endpoint. For testing only.
Click to show internal directories.
Click to hide internal directories.