fix the Status command on imapclient.Conn

it needs at least 1 attribute.
also make types for those attributes, so its harder to get them wrong.
nothing was using this function.
This commit is contained in:
Mechiel Lukkien
2024-03-11 15:22:41 +01:00
parent 4dea2de343
commit bcf737cbec
9 changed files with 83 additions and 26 deletions

View File

@ -224,8 +224,25 @@ type UntaggedSearchModSeq struct {
}
type UntaggedStatus struct {
Mailbox string
Attrs map[string]int64 // Upper case status attributes. ../rfc/9051:7059
Attrs map[StatusAttr]int64 // Upper case status attributes.
}
// ../rfc/9051:7059 ../9208:712
type StatusAttr string
const (
StatusMessages StatusAttr = "MESSAGES"
StatusUIDNext StatusAttr = "UIDNEXT"
StatusUIDValidity StatusAttr = "UIDVALIDITY"
StatusUnseen StatusAttr = "UNSEEN"
StatusDeleted StatusAttr = "DELETED"
StatusSize StatusAttr = "SIZE"
StatusRecent StatusAttr = "RECENT"
StatusAppendLimit StatusAttr = "APPENDLIMIT"
StatusHighestModSeq StatusAttr = "HIGHESTMODSEQ"
StatusDeletedStorage StatusAttr = "DELETED-STORAGE"
)
type UntaggedNamespace struct {
Personal, Other, Shared []NamespaceDescr
}