mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-22 10:22:21 +00:00
16 lines
598 B
Go
16 lines
598 B
Go
package events
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// Type is type of event
|
|
type Type string
|
|
|
|
// Event is the basic set of fields all events must have
|
|
// https://matrix.org/docs/spec/client_server/latest#event-fields
|
|
type Event struct {
|
|
Content json.RawMessage `json:"content"` // Required. The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body.
|
|
Type Type `json:"type"` // Required. The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'
|
|
}
|