Documentation
¶
Overview ¶
Package fake provides an in-memory mail.Provider for tests and offline development, so UI behavior can be exercised without network access.
Index ¶
- type Provider
- func (p *Provider) Account() string
- func (p *Provider) Attachment(context.Context, string, string) ([]byte, error)
- func (p *Provider) Labels(context.Context) ([]mail.Label, error)
- func (p *Provider) Modify(_ context.Context, threadIDs []string, add, remove []string) error
- func (p *Provider) Name() string
- func (p *Provider) Send(_ context.Context, d mail.Draft) error
- func (p *Provider) Thread(_ context.Context, id string) ([]mail.Message, error)
- func (p *Provider) Threads(_ 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 Provider ¶
type Provider struct {
AccountAddr string
LabelList []mail.Label
ThreadList []mail.Thread
Messages map[string][]mail.Message
// Sent records everything delivered through Send, for assertions.
Sent []mail.Draft
// Err, when set, is returned by every call.
Err error
// contains filtered or unexported fields
}
Provider is an in-memory implementation of mail.Provider.
func (*Provider) Attachment ¶
func (*Provider) Threads ¶
func (p *Provider) Threads(_ context.Context, q mail.ThreadQuery) (mail.ThreadPage, error)
Click to show internal directories.
Click to hide internal directories.