Documentation
¶
Overview ¶
Stores data in memory.
Index ¶
- func NewAddresses() backend.AddressesBackend
- func NewAttachments() backend.AttachmentsBackend
- func NewContacts() backend.ContactsBackend
- func NewConversations(messages *Messages) backend.ConversationsBackend
- func NewDomains() backend.DomainsBackend
- func NewEvents() backend.EventsBackend
- func NewKeys() backend.KeysBackend
- func NewLabels() backend.LabelsBackend
- func NewMessages(attachments *Attachments) backend.MessagesBackend
- func Populate(b *backend.Backend) (err error)
- func Use(bkd *backend.Backend)
- type Addresses
- func (b *Addresses) DeleteAddress(user, id string) (err error)
- func (b *Addresses) GetAddress(user, id string) (address *backend.Address, err error)
- func (b *Addresses) InsertAddress(user string, addr *backend.Address) (*backend.Address, error)
- func (b *Addresses) ListAddresses(user string) (addrs []*backend.Address, err error)
- func (b *Addresses) UpdateAddress(user string, update *backend.AddressUpdate) (addr *backend.Address, err error)
- type Attachments
- func (b *Attachments) DeleteAttachment(user, id string) (err error)
- func (b *Attachments) InsertAttachment(user string, att *backend.Attachment, contents []byte) (*backend.Attachment, error)
- func (b *Attachments) ListAttachments(user, msgId string) (atts []*backend.Attachment, err error)
- func (b *Attachments) ReadAttachment(user, id string) (*backend.Attachment, []byte, error)
- func (b *Attachments) UpdateAttachmentMessage(user, id, msgId string) error
- type Contacts
- func (b *Contacts) DeleteAllContacts(user string) error
- func (b *Contacts) DeleteContact(user, id string) error
- func (b *Contacts) InsertContact(user string, contact *backend.Contact) (*backend.Contact, error)
- func (b *Contacts) ListContacts(user string) (contacts []*backend.Contact, err error)
- func (b *Contacts) UpdateContact(user string, update *backend.ContactUpdate) (*backend.Contact, error)
- type Conversations
- func (b *Conversations) CountConversations(user string) (counts []*backend.MessagesCount, err error)
- func (b *Conversations) DeleteConversation(user, id string) (err error)
- func (b *Conversations) GetConversation(user, id string) (conv *backend.Conversation, err error)
- func (b *Conversations) InsertMessage(user string, msg *backend.Message) (*backend.Message, error)
- func (b *Conversations) ListConversationMessages(user, id string) (msgs []*backend.Message, err error)
- func (b *Conversations) ListConversations(user string, filter *backend.MessagesFilter) (convs []*backend.Conversation, total int, err error)
- type Domains
- type Events
- type Keys
- func (b *Keys) GetKeypair(email string) (*backend.Keypair, error)
- func (b *Keys) GetPublicKey(email string) (string, error)
- func (b *Keys) InsertKeypair(email string, keypair *backend.Keypair) (inserted *backend.Keypair, err error)
- func (b *Keys) UpdateKeypair(email string, keypair *backend.Keypair) (updated *backend.Keypair, err error)
- type Labels
- func (b *Labels) DeleteLabel(user, id string) error
- func (b *Labels) InsertLabel(user string, label *backend.Label) (*backend.Label, error)
- func (b *Labels) ListLabels(user string) (labels []*backend.Label, err error)
- func (b *Labels) UpdateLabel(user string, update *backend.LabelUpdate) (*backend.Label, error)
- type Messages
- func (b *Messages) CountMessages(user string) (counts []*backend.MessagesCount, err error)
- func (b *Messages) DeleteMessage(user, id string) error
- func (b *Messages) GetMessage(user, id string) (msg *backend.Message, err error)
- func (b *Messages) InsertMessage(user string, msg *backend.Message) (*backend.Message, error)
- func (b *Messages) ListMessages(user string, filter *backend.MessagesFilter) (msgs []*backend.Message, total int, 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) 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 ¶
func NewAddresses ¶
func NewAddresses() backend.AddressesBackend
func NewAttachments ¶
func NewAttachments() backend.AttachmentsBackend
func NewContacts ¶
func NewContacts() backend.ContactsBackend
func NewConversations ¶
func NewConversations(messages *Messages) backend.ConversationsBackend
func NewDomains ¶
func NewDomains() backend.DomainsBackend
func NewEvents ¶
func NewEvents() backend.EventsBackend
func NewKeys ¶
func NewKeys() backend.KeysBackend
func NewLabels ¶
func NewLabels() backend.LabelsBackend
func NewMessages ¶
func NewMessages(attachments *Attachments) backend.MessagesBackend
Types ¶
type Addresses ¶
type Addresses struct {
// contains filtered or unexported fields
}
func (*Addresses) DeleteAddress ¶
func (*Addresses) GetAddress ¶
func (*Addresses) InsertAddress ¶
func (*Addresses) ListAddresses ¶
func (*Addresses) UpdateAddress ¶
type Attachments ¶
type Attachments struct {
// contains filtered or unexported fields
}
func (*Attachments) DeleteAttachment ¶
func (b *Attachments) DeleteAttachment(user, id string) (err error)
func (*Attachments) InsertAttachment ¶
func (b *Attachments) InsertAttachment(user string, att *backend.Attachment, contents []byte) (*backend.Attachment, error)
func (*Attachments) ListAttachments ¶
func (b *Attachments) ListAttachments(user, msgId string) (atts []*backend.Attachment, err error)
func (*Attachments) ReadAttachment ¶
func (b *Attachments) ReadAttachment(user, id string) (*backend.Attachment, []byte, error)
func (*Attachments) UpdateAttachmentMessage ¶
func (b *Attachments) UpdateAttachmentMessage(user, id, msgId string) error
Additional function needed for imap.Messages backend
type Contacts ¶
type Contacts struct {
// contains filtered or unexported fields
}
func (*Contacts) DeleteAllContacts ¶
func (*Contacts) DeleteContact ¶
func (*Contacts) InsertContact ¶
func (*Contacts) ListContacts ¶
func (*Contacts) UpdateContact ¶
type Conversations ¶
type Conversations struct {
*Messages
}
func (*Conversations) CountConversations ¶
func (b *Conversations) CountConversations(user string) (counts []*backend.MessagesCount, err error)
func (*Conversations) DeleteConversation ¶
func (b *Conversations) DeleteConversation(user, id string) (err error)
func (*Conversations) GetConversation ¶
func (b *Conversations) GetConversation(user, id string) (conv *backend.Conversation, err error)
func (*Conversations) InsertMessage ¶
func (*Conversations) ListConversationMessages ¶
func (b *Conversations) ListConversationMessages(user, id string) (msgs []*backend.Message, err error)
func (*Conversations) ListConversations ¶
func (b *Conversations) ListConversations(user string, filter *backend.MessagesFilter) (convs []*backend.Conversation, total int, err error)
type Domains ¶
type Domains struct {
// contains filtered or unexported fields
}
func (*Domains) GetDomainByName ¶
func (*Domains) InsertDomain ¶
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
func (*Events) DeleteAllEvents ¶
func (*Events) GetEventsAfter ¶
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
func (*Keys) InsertKeypair ¶
type Labels ¶
type Labels struct {
// contains filtered or unexported fields
}
func (*Labels) DeleteLabel ¶
func (*Labels) InsertLabel ¶
func (*Labels) ListLabels ¶
func (*Labels) UpdateLabel ¶
type Messages ¶
type Messages struct { *Attachments // contains filtered or unexported fields }
func (*Messages) CountMessages ¶
func (b *Messages) CountMessages(user string) (counts []*backend.MessagesCount, err error)
func (*Messages) DeleteMessage ¶
func (*Messages) GetMessage ¶
func (*Messages) InsertMessage ¶
func (*Messages) ListMessages ¶
func (*Messages) UpdateMessage ¶
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
func (*Users) InsertUser ¶
func (*Users) IsUsernameAvailable ¶
func (*Users) UpdateUser ¶
func (b *Users) UpdateUser(update *backend.UserUpdate) error
func (*Users) UpdateUserPassword ¶
Click to show internal directories.
Click to hide internal directories.