forked from rockorager/go-jmap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatechange.go
More file actions
25 lines (20 loc) · 878 Bytes
/
statechange.go
File metadata and controls
25 lines (20 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package jmap
// An EventType is the name of a Type provided by a capability which may be
// subscribed to using a PushSubscription or an EventSource connection. Each
// specification may define their own types and events
//
// EventType is the type of object the Event is for ("Mailbox", "Email")
type EventType string
// Subscribe to all events
const AllEvents EventType = "*"
// A StateChange object is sent to the client via Push mechanisms. It
// communicates when a change has occurred
type StateChange struct {
// This MUST be the string "StateChange"
Type string `json:"@type"`
// Map of AccountID to TypeState. Only changed values will be in the map
Changed map[ID]TypeState `json:"changed"`
}
// TypeState is a map of Foo object names ("Mailbox", "Email", etc) to state
// property which would be returned by a call to Foo/get
type TypeState map[string]string