Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changes ¶
type Changes struct {
Account jmap.ID `json:"accountId,omitempty"`
SinceState string `json:"sinceState,omitempty"`
MaxChanges uint64 `json:"maxChanges,omitempty"`
}
Get mailbox changes for the whole account https://www.rfc-editor.org/rfc/rfc8621.html#section-2.2
type ChangesResponse ¶
type ChangesResponse struct {
Account jmap.ID `json:"accountId,omitempty"`
OldState string `json:"oldState,omitempty"`
NewState string `json:"newState,omitempty"`
HasMoreChanges bool `json:"hasMoreChanges,omitempty"`
Created []jmap.ID `json:"created,omitempty"`
Updated []jmap.ID `json:"updated,omitempty"`
Destroyed []jmap.ID `json:"destroyed,omitempty"`
UpdatedProperties []string `json:"updatedProperties,omitempty"`
}
type FilterCondition ¶
type FilterCondition struct {
ParentID jmap.ID `json:"parentId,omitempty"`
Name string `json:"name,omitempty"`
Role Role `json:"role,omitempty"`
HasAnyRole bool `json:"hasAnyRole,omitempty"`
IsSubscribed bool `json:"isSubscribed,omitempty"`
}
Filter criteria for mailbox queries https://www.rfc-editor.org/rfc/rfc8621.html#section-2.3
type FilterOperator ¶
type FilterOperator struct {
Operator jmap.Operator `json:"operator,omitempty"`
Conditions []Filter `json:"conditions,omitempty"`
}
type Get ¶
type Get struct {
Account jmap.ID `json:"accountId,omitempty"`
IDs []jmap.ID `json:"ids,omitempty"`
Properties []string `json:"properties,omitempty"`
ReferenceIDs *jmap.ResultReference `json:"#ids,omitempty"`
ReferenceProperties *jmap.ResultReference `json:"#properties,omitempty"`
}
Get mailbox details https://www.rfc-editor.org/rfc/rfc8621.html#section-2.1
type GetResponse ¶
type Mailbox ¶
type Mailbox struct {
ID jmap.ID `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ParentID jmap.ID `json:"parentId,omitempty"`
Role Role `json:"role,omitempty"`
SortOrder uint64 `json:"sortOrder,omitempty"`
TotalEmails uint64 `json:"totalEmails,omitempty"`
UnreadEmails uint64 `json:"unreadEmails,omitempty"`
TotalThreads uint64 `json:"totalThreads,omitempty"`
UnreadThreads uint64 `json:"unreadThreads,omitempty"`
Rights *Rights `json:"myRights,omitempty"`
IsSubscribed bool `json:"isSubscribed,omitempty"`
}
Named set of Email objects. Can be viewed as a folder or a label. An email must be part of at least one Mailbox. https://www.rfc-editor.org/rfc/rfc8621.html#section-2
type Query ¶
type Query struct {
Account jmap.ID `json:"accountId,omitempty"`
Filter Filter `json:"filter,omitempty"`
Sort []*SortComparator `json:"sort,omitempty"`
Position int64 `json:"position,omitempty"`
Anchor jmap.ID `json:"anchor,omitempty"`
AnchorOffset int64 `json:"anchorOffset,omitempty"`
Limit uint64 `json:"limit,omitempty"`
CalculateTotal bool `json:"calculateTotal,omitempty"`
SortAsTree bool `json:"sortAsTree,omitempty"`
FilterAsTree bool `json:"filterAsTree,omitempty"`
}
Get a list of mailbox IDs based on filter and sort criteria https://www.rfc-editor.org/rfc/rfc8621.html#section-2.3
type QueryChanges ¶
type QueryChanges struct {
Account jmap.ID `json:"accountId,omitempty"`
Filter Filter `json:"filter,omitempty"`
Sort []*SortComparator `json:"sort,omitempty"`
SinceQueryState string `json:"sinceQueryState,omitempty"`
MaxChanges uint64 `json:"maxChanges,omitempty"`
UpToID jmap.ID `json:"upToId,omitempty"`
CalculateTotal bool `json:"calculateTotal,omitempty"`
}
Get changes on a mailbox query https://www.rfc-editor.org/rfc/rfc8621.html#section-2.4
func (*QueryChanges) Name ¶
func (m *QueryChanges) Name() string
func (*QueryChanges) Requires ¶
func (m *QueryChanges) Requires() []jmap.URI
type QueryChangesResponse ¶
type QueryResponse ¶
type QueryResponse struct {
Account jmap.ID `json:"accountId,omitempty"`
QueryState string `json:"queryState,omitempty"`
CanCalculateChanges bool `json:"canCalculateChanges,omitempty"`
Position uint64 `json:"position,omitempty"`
IDs []jmap.ID `json:"ids,omitempty"`
Total int64 `json:"total,omitempty"`
Limit uint64 `json:"limit,omitempty"`
}
type Rights ¶
type Rights struct {
MayReadItems bool `json:"mayReadItems,omitempty"`
MayAddItems bool `json:"mayAddItems,omitempty"`
MayRemoveItems bool `json:"mayRemoveItems,omitempty"`
MaySetSeen bool `json:"maySetSeen,omitempty"`
MaySetKeywords bool `json:"maySetKeywords,omitempty"`
MayCreateChild bool `json:"mayCreateChild,omitempty"`
MayRename bool `json:"mayRename,omitempty"`
MayDelete bool `json:"mayDelete,omitempty"`
MaySubmit bool `json:"maySubmit,omitempty"`
}
Access Control Lists (ACLs)
type Role ¶
type Role string
Identifies Mailboxes that have a particular common purpose (e.g., the “inbox”), regardless of the name property (which may be localised).
const ( RoleAll Role = "all" RoleArchive Role = "archive" RoleDrafts Role = "drafts" RoleFlagged Role = "flagged" RoleHasChildren Role = "haschildren" RoleHasNoChildren Role = "hasnochildren" RoleImportant Role = "important" RoleInbox Role = "inbox" RoleJunk Role = "junk" RoleMarked Role = "marked" RoleNoInferiors Role = "noinferiors" RoleNonExistent Role = "nonexistent" RoleNoSelect Role = "noselect" RoleRemote Role = "remote" RoleSent Role = "sent" RoleSubscribed Role = "subscribed" RoleTrash Role = "trash" RoleUnmarked Role = "unmarked" )
type Set ¶
type Set struct {
Account jmap.ID `json:"accountId,omitempty"`
IfInState string `json:"ifInState,omitempty"`
Create map[jmap.ID]*Mailbox `json:"create,omitempty"`
Update map[jmap.ID]jmap.Patch `json:"update,omitempty"`
Destroy []jmap.ID `json:"destroy,omitempty"`
OnDestroyRemoveEmails bool `json:"onDestroyRemoveEmails,omitempty"`
}
Create, delete & modify mailboxes https://www.rfc-editor.org/rfc/rfc8621.html#section-2.5
type SetResponse ¶
type SetResponse struct {
Account jmap.ID `json:"accountId,omitempty"`
OldState string `json:"oldState,omitempty"`
NewState string `json:"newState,omitempty"`
Created map[jmap.ID]*Mailbox `json:"created,omitempty"`
Updated map[jmap.ID]*Mailbox `json:"updated,omitempty"`
Destroyed []jmap.ID `json:"destroyed,omitempty"`
NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"`
NotUpdated map[jmap.ID]*jmap.SetError `json:"notUpdated,omitempty"`
NotDestroyed map[jmap.ID]*jmap.SetError `json:"notDestroyed,omitempty"`
}
type SortComparator ¶
type SortComparator struct {
// The name of the property on the Mailbox objects to compare.
Property string `json:"property,omitempty"`
// If true, sort in ascending order.
IsAscending bool `json:"isAscending"`
// The identifier, as registered in the collation registry defined in
// RFC4790, for the algorithm to use when comparing the order of
// strings.
Collation jmap.CollationAlgo `json:"collation,omitempty"`
}