Documentation ¶
Overview ¶
Stores messages on an IMAP server.
Index ¶
- func Use(bkd *backend.Backend, config *Config) *conns
- type Config
- type Events
- type Labels
- func (b *Labels) DeleteLabel(user, id string) error
- func (b Labels) GetPassword(user string) (string, error)
- func (b *Labels) InsertLabel(user string, label *backend.Label) (inserted *backend.Label, err error)
- func (b *Labels) ListLabels(user string) (labels []*backend.Label, err error)
- func (b *Labels) UpdateLabel(user string, update *backend.LabelUpdate) (label *backend.Label, err error)
- type Messages
- func (b *Messages) CountMessages(user string) (counts []*backend.MessagesCount, err error)
- func (b *Messages) DeleteAttachment(user, id string) error
- func (b *Messages) DeleteMessage(user, id string) (err error)
- func (be *Messages) GetMessage(user, id string) (msg *backend.Message, err error)
- func (b Messages) GetPassword(user string) (string, error)
- func (b *Messages) InsertAttachment(user string, attachment *backend.Attachment, data []byte) (*backend.Attachment, error)
- func (b *Messages) InsertMessage(user string, msg *backend.Message) (inserted *backend.Message, err error)
- func (b *Messages) ListAttachments(user, msg string) ([]*backend.Attachment, error)
- func (b *Messages) ListMessages(user string, filter *backend.MessagesFilter) (msgs []*backend.Message, total int, err error)
- func (b *Messages) ReadAttachment(user, id string) (att *backend.Attachment, out []byte, err error)
- func (b *Messages) UpdateMessage(user string, update *backend.MessageUpdate) (msg *backend.Message, err error)
- type Users
- func (b *Users) Auth(username, password string) (user *backend.User, err error)
- func (b Users) GetPassword(user string) (string, error)
- func (b *Users) GetUser(id string) (user *backend.User, err error)
- func (b *Users) InsertUser(u *backend.User, password string) (*backend.User, error)
- func (b *Users) IsUsernameAvailable(username string) (bool, error)
- func (b *Users) UpdateUser(update *backend.UserUpdate) error
- func (b *Users) UpdateUserPassword(id, current, new string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Events ¶
type Events struct { backend.EventsBackend // contains filtered or unexported fields }
func (*Events) DeleteAllEvents ¶
type Labels ¶
type Labels struct {
// contains filtered or unexported fields
}
func (*Labels) DeleteLabel ¶
func (Labels) GetPassword ¶
Allow other backends (e.g. a SMTP backend) to access users' password.
func (*Labels) InsertLabel ¶
func (*Labels) ListLabels ¶
func (*Labels) UpdateLabel ¶
type Messages ¶
type Messages struct {
// contains filtered or unexported fields
}
func (*Messages) CountMessages ¶
func (b *Messages) CountMessages(user string) (counts []*backend.MessagesCount, err error)
func (*Messages) DeleteAttachment ¶
func (*Messages) DeleteMessage ¶
func (*Messages) GetMessage ¶
func (Messages) GetPassword ¶
Allow other backends (e.g. a SMTP backend) to access users' password.
func (*Messages) InsertAttachment ¶
func (b *Messages) InsertAttachment(user string, attachment *backend.Attachment, data []byte) (*backend.Attachment, error)
func (*Messages) InsertMessage ¶
func (*Messages) ListAttachments ¶
func (b *Messages) ListAttachments(user, msg string) ([]*backend.Attachment, error)
func (*Messages) ListMessages ¶
func (*Messages) ReadAttachment ¶
func (*Messages) UpdateMessage ¶
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
IMAP backend cannot upate users, so when requesting to update it will just return silently. When inserting a new user, it will just check that the user already exist on the IMAP server.
func (Users) GetPassword ¶
Allow other backends (e.g. a SMTP backend) to access users' password.
func (*Users) InsertUser ¶
func (*Users) IsUsernameAvailable ¶
Cannot check if a username is available, always return true
func (*Users) UpdateUser ¶
func (b *Users) UpdateUser(update *backend.UserUpdate) error
func (*Users) UpdateUserPassword ¶
Click to show internal directories.
Click to hide internal directories.