mirror of
https://github.com/neilalexander/yggmail.git
synced 2026-04-24 19:06:29 +03:00
Single user refactor
This commit is contained in:
@@ -5,24 +5,24 @@ import "time"
|
||||
type Storage interface {
|
||||
ConfigGet(key string) (string, error)
|
||||
ConfigSet(key, value string) error
|
||||
ConfigSetPassword(password string) error
|
||||
ConfigTryPassword(password string) (bool, error)
|
||||
|
||||
TryAuthenticate(username, password string) (bool, error)
|
||||
MailboxSelect(mailbox string) (bool, error)
|
||||
MailNextID(mailbox string) (int, error)
|
||||
MailIDForSeq(mailbox string, id int) (int, error)
|
||||
MailUnseen(mailbox string) (int, error)
|
||||
MailboxList(onlySubscribed bool) ([]string, error)
|
||||
MailboxCreate(name string) error
|
||||
MailboxRename(old, new string) error
|
||||
MailboxDelete(name string) error
|
||||
MailboxSubscribe(name string, subscribed bool) error
|
||||
|
||||
MailboxSelect(user, mailbox string) (bool, error)
|
||||
MailNextID(user, mailbox string) (int, error)
|
||||
MailIDForSeq(user, mailbox string, id int) (int, error)
|
||||
MailUnseen(user, mailbox string) (int, error)
|
||||
MailboxList(user string, onlySubscribed bool) ([]string, error)
|
||||
MailboxCreate(user, name string) error
|
||||
MailboxRename(user, old, new string) error
|
||||
MailboxDelete(user, name string) error
|
||||
MailboxSubscribe(user, name string, subscribed bool) error
|
||||
|
||||
MailCreate(user, mailbox string, data []byte) (int, error)
|
||||
MailSelect(user, mailbox string, id int) (int, int, []byte, bool, bool, bool, bool, time.Time, error)
|
||||
MailSearch(user, mailbox string) ([]uint32, error)
|
||||
MailUpdateFlags(user, mailbox string, id int, seen, answered, flagged, deleted bool) error
|
||||
MailDelete(user, mailbox, id string) error
|
||||
MailExpunge(user, mailbox string) error
|
||||
MailCount(user, mailbox string) (int, error)
|
||||
MailCreate(mailbox string, data []byte) (int, error)
|
||||
MailSelect(mailbox string, id int) (int, int, []byte, bool, bool, bool, bool, time.Time, error)
|
||||
MailSearch(mailbox string) ([]uint32, error)
|
||||
MailUpdateFlags(mailbox string, id int, seen, answered, flagged, deleted bool) error
|
||||
MailDelete(mailbox, id string) error
|
||||
MailExpunge(mailbox string) error
|
||||
MailCount(mailbox string) (int, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user