Documentation ¶
Index ¶
- Constants
- type AddressGroup
- type BodyPart
- type BodyValue
- type Changes
- type ChangesResponse
- type Copy
- type CopyResponse
- type Email
- type EmailImport
- type Filter
- type FilterCondition
- type FilterOperator
- type Get
- type GetResponse
- type Header
- type Import
- type ImportResponse
- type Parse
- type ParseResponse
- type Query
- type QueryChanges
- type QueryChangesResponse
- type QueryResponse
- type Set
- type SetResponse
- type SortComparator
Constants ¶
const SMIMEVerify jmap.URI = "urn:ietf:params:jmap:smimeverify"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressGroup ¶
type BodyPart ¶
type BodyPart struct { PartID string `json:"partId,omitempty"` BlobID jmap.ID `json:"blobId,omitempty"` Size uint64 `json:"size,omitempty"` Headers []*Header `json:"headers,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Charset string `json:"charset,omitempty"` Disposition string `json:"disposition,omitempty"` CID string `json:"cid,omitempty"` Language []string `json:"language,omitempty"` Location string `json:"location,omitempty"` SubParts []*BodyPart `json:"subParts,omitempty"` }
type Changes ¶
type Changes struct { Account jmap.ID `json:"accountId,omitempty"` SinceState string `json:"sinceState,omitempty"` MaxChanges uint64 `json:"maxChanges,omitempty"` }
Get changes to emails on the whole account since a given state https://www.rfc-editor.org/rfc/rfc8621.html#section-4.3
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"` }
type Copy ¶
type Copy struct { FromAccount jmap.ID `json:"fromAccountId,omitempty"` IfFromInState string `json:"ifFromInState,omitempty"` Account jmap.ID `json:"accountId,omitempty"` IfInState string `json:"ifInState,omitempty"` Create map[jmap.ID]*Email `json:"create,omitempty"` OnSuccessDestroyOriginal bool `json:"onSuccessDestroyOriginal,omitempty"` DestroyFromIfInState string `json:"destroyFromIfInState,omitempty"` }
Copy messages from one account to another https://www.rfc-editor.org/rfc/rfc8621.html#section-4.7
type CopyResponse ¶
type CopyResponse struct { FromAccount jmap.ID `json:"fromAccountId,omitempty"` Account jmap.ID `json:"accountId,omitempty"` OldState string `json:"oldState,omitempty"` NewState string `json:"newState,omitempty"` Created map[jmap.ID]*Email `json:"created,omitempty"` NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"` }
type Email ¶
type Email struct { ID jmap.ID `json:"id,omitempty"` BlobID jmap.ID `json:"blobId,omitempty"` ThreadID jmap.ID `json:"threadId,omitempty"` MailboxIDs map[jmap.ID]bool `json:"mailboxIds,omitempty"` Keywords map[string]bool `json:"keywords,omitempty"` Size uint64 `json:"size,omitempty"` ReceivedAt *time.Time `json:"receivedAt,omitempty"` Headers []*Header `json:"headers,omitempty"` MessageID []string `json:"messageId,omitempty"` InReplyTo []string `json:"inReplyTo,omitempty"` References []string `json:"references,omitempty"` Sender []*mail.Address `json:"sender,omitempty"` From []*mail.Address `json:"from,omitempty"` To []*mail.Address `json:"to,omitempty"` CC []*mail.Address `json:"cc,omitempty"` BCC []*mail.Address `json:"bcc,omitempty"` ReplyTo []*mail.Address `json:"replyTo,omitempty"` Subject string `json:"subject,omitempty"` SentAt *time.Time `json:"sentAt,omitempty"` BodyStructure *BodyPart `json:"bodyStructure,omitempty"` BodyValues map[string]*BodyValue `json:"bodyValues,omitempty"` TextBody []*BodyPart `json:"textBody,omitempty"` HTMLBody []*BodyPart `json:"htmlBody,omitempty"` Attachments []*BodyPart `json:"attachments,omitempty"` HasAttachment bool `json:"hasAttachment,omitempty"` Preview string `json:"preview,omitempty"` SMIMEStatus string `json:"smimeStatus,omitempty"` SMIMEStatusAtDelivery string `json:"smimeStatusAtDelivery,omitempty"` SMIMEErrors []string `json:"smimeErrors,omitempty"` SMIMEVerifiedAt *time.Time `json:"smimeVerifiedAt,omitempty"` }
Representation of an RFC5322 message https://www.rfc-editor.org/rfc/rfc8621.html#section-4
type EmailImport ¶
type FilterCondition ¶
type FilterCondition struct { InMailbox jmap.ID `json:"inMailbox,omitempty"` InMailboxOtherThan []jmap.ID `json:"inMailboxOtherThan,omitempty"` Before *time.Time `json:"before,omitempty"` After *time.Time `json:"after,omitempty"` MinSize uint64 `json:"minSize,omitempty"` MaxSize uint64 `json:"maxSize,omitempty"` AllInThreadHaveKeyword string `json:"allInThreadHaveKeyword,omitempty"` SomeInThreadHaveKeyword string `json:"someInThreadHaveKeyword,omitempty"` NoneInThreadHaveKeyword string `json:"noneInThreadHaveKeyword,omitempty"` HasKeyword string `json:"hasKeyword,omitempty"` NotKeyword string `json:"notKeyword,omitempty"` HasAttachment bool `json:"hasAttachment,omitempty"` Text string `json:"text,omitempty"` From string `json:"from,omitempty"` To string `json:"to,omitempty"` Cc string `json:"cc,omitempty"` Bcc string `json:"bcc,omitempty"` Subject string `json:"subject,omitempty"` Body string `json:"body,omitempty"` Header []string `json:"header,omitempty"` HasSMIME bool `json:"hasSmime,omitempty"` HasVerifiedSMIME bool `json:"hasVerifiedSmime,omitempty"` HasVerifiedSMIMEAtDelivery bool `json:"hasVerifiedSmimeAtDelivery,omitempty"` }
Email query condition that can be compounded with FilterOperator https://www.rfc-editor.org/rfc/rfc8621.html#section-4.4.1
func (*FilterCondition) MarshalJSON ¶ added in v0.4.2
func (fc *FilterCondition) MarshalJSON() ([]byte, error)
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"` BodyProperties []string `json:"bodyProperties,omitempty"` FetchTextBodyValues bool `json:"fetchTextBodyValues,omitempty"` FetchHTMLBodyValues bool `json:"fetchHTMLBodyValues,omitempty"` FetchAllBodyValues bool `json:"fetchAllBodyValues,omitempty"` MaxBodyValueBytes uint64 `json:"maxBodyValueBytes,omitempty"` ReferenceIDs *jmap.ResultReference `json:"#ids,omitempty"` ReferenceProperties *jmap.ResultReference `json:"#properties,omitempty"` }
Get email details https://www.rfc-editor.org/rfc/rfc8621.html#section-4.2
type GetResponse ¶
type Import ¶
type Import struct { Account jmap.ID `json:"accountId,omitempty"` IfInState string `json:"ifInState,omitempty"` Emails map[string]*EmailImport `json:"emails,omitempty"` }
Import email from binary blobs https://www.rfc-editor.org/rfc/rfc8621.html#section-4.8
type ImportResponse ¶
type Parse ¶
type Parse struct { Account jmap.ID `json:"accountId,omitempty"` BlobIDs []jmap.ID `json:"blobIds,omitempty"` Properties []string `json:"properties,omitempty"` BodyProperties []string `json:"bodyProperties,omitempty"` FetchTextBodyValues bool `json:"fetchTextBodyValues,omitempty"` FetchHTMLBodyValues bool `json:"fetchHTMLBodyValues,omitempty"` FetchAllBodyValues bool `json:"fetchAllBodyValues,omitempty"` MaxBodyValueBytes uint64 `json:"maxBodyValueBytes,omitempty"` }
Parse binary blobs as RFC5322 messages https://www.rfc-editor.org/rfc/rfc8621.html#section-4.9
type ParseResponse ¶
type ParseResponse struct { Account jmap.ID `json:"accountId,omitempty"` Parsed map[jmap.ID]*Email `json:"parsed,omitempty"` NotParsable []jmap.ID `json:"notParsable,omitempty"` NotFound []jmap.ID `json:"notFound,omitempty"` }
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"` CollapseThreads bool `json:"collapseThreads,omitempty"` }
Get list of email IDs based on filter and sort criteria https://www.rfc-editor.org/rfc/rfc8621.html#section-4.4
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"` CollapseThreads bool `json:"collapseThreads,omitempty"` }
Get changes to an email query since a given state https://www.rfc-editor.org/rfc/rfc8621.html#section-4.5
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 uint64 `json:"total,omitempty"` Limit uint64 `json:"limit,omitempty"` }
type Set ¶
type Set struct { Account jmap.ID `json:"accountId,omitempty"` IfInState string `json:"ifInState,omitempty"` Create map[jmap.ID]*Email `json:"create,omitempty"` Update map[jmap.ID]jmap.Patch `json:"update,omitempty"` Destroy []jmap.ID `json:"destroy,omitempty"` }
Create, delete or update emails https://www.rfc-editor.org/rfc/rfc8621.html#section-4.6
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]*Email `json:"created,omitempty"` Updated map[jmap.ID]*Email `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 { Property string `json:"property,omitempty"` Keyword string `json:"keyword,omitempty"` IsAscending bool `json:"isAscending"` Collation jmap.CollationAlgo `json:"collation,omitempty"` }
Email sort criteria https://www.rfc-editor.org/rfc/rfc8621.html#section-4.4.2