SDK
SDK Golang v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

Notifications #

The Realtime.Subscribe method takes a channel for types.NotificationResult objects, whose content depend on the type of notification received.

Document & messages #

These notifications represent documents changes & messages.

Property Type Description
Action string API controller's action
Collection string Data collection
Controller string API controller
Index string Data index
Protocol string Network protocol used to modify the document
Result *types.NotificationResult Notification content
RoomId string Subscription channel identifier. Can be used to link a notification to its corresponding subscription
Scope string in: document enters (or stays) in the scope
out: document leaves the scope
Timestamp int Timestamp of the event, in Epoch-millis format
Type string document: the notification type
Volatile json.RawMessage Request volatile data

The Result property has the following structure for document notifications & messages:

Property Type Description
id string Document unique ID
null if the notification is from a real-time message
content json.RawMessage A JSON String message or full document content. Not present if the event is about a document deletion

User #

These notifications represent user events.

Property Type Description
Action string API controller's action
Collection string Data collection
Controller string API controller
Index string Data index
Protocol string Network protocol used by the entering/leaving user
Result *types.NotificationResult Notification content
RoomId string Subscription channel identifier. Can be used to link a notification to its corresponding subscription
Timestamp int Timestamp of the event, in Epoch-millis format
Type string user: the notification type
User string in: a new user has subscribed to the same filters
out: a user cancelled a shared subscription
Volatile json.RawMessage Request volatile data

The Result property has the following structure for user events:

Property Type Description
count int Updated users count sharing that same subscription