Documentation
¶
Overview ¶
Package gmail implements mail.Provider against the Gmail API.
Index ¶
- type Client
- func (c *Client) Account() string
- func (c *Client) Attachment(ctx context.Context, msgID, attachmentID string) ([]byte, error)
- func (c *Client) Labels(ctx context.Context) ([]mail.Label, error)
- func (c *Client) Modify(ctx context.Context, threadIDs []string, add, remove []string) error
- func (c *Client) Name() string
- func (c *Client) Send(ctx context.Context, d mail.Draft) error
- func (c *Client) Thread(ctx context.Context, id string) ([]mail.Message, error)
- func (c *Client) Threads(ctx context.Context, q mail.ThreadQuery) (mail.ThreadPage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Gmail-backed mail.Provider.
func New ¶
New builds a client from a refreshing token source and resolves the authenticated address.
func (*Client) Attachment ¶
Attachment fetches attachment content on demand.
func (*Client) Labels ¶
Labels lists mailboxes and tags with their unread counts. The list endpoint omits counts, so each label is fetched concurrently to fill them in.
func (*Client) Threads ¶
func (c *Client) Threads(ctx context.Context, q mail.ThreadQuery) (mail.ThreadPage, error)
Threads returns one page of conversation summaries.
Click to show internal directories.
Click to hide internal directories.