Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDataRequest ¶
type AccountDataRequest struct {
Enabled bool `json:"enabled"`
}
Client created request params
func (AccountDataRequest) ApplyDelta ¶
func (r AccountDataRequest) ApplyDelta(next *AccountDataRequest) *AccountDataRequest
type AccountDataResponse ¶
type AccountDataResponse struct {
Global []json.RawMessage `json:"global"`
Rooms map[string][]json.RawMessage `json:"rooms"`
}
Server response
func ProcessAccountData ¶
func ProcessAccountData(store *state.Storage, listRoomIDs map[string]struct{}, userID string, isInitial bool, req *AccountDataRequest) (res *AccountDataResponse)
func ProcessLiveAccountData ¶
func ProcessLiveAccountData(up caches.Update, store *state.Storage, updateWillReturnResponse bool, userID string, req *AccountDataRequest) (res *AccountDataResponse)
func (*AccountDataResponse) HasData ¶
func (r *AccountDataResponse) HasData(isInitial bool) bool
type E2EEDeviceList ¶
type E2EERequest ¶
type E2EERequest struct {
Enabled bool `json:"enabled"`
}
Client created request params
func (E2EERequest) ApplyDelta ¶
func (r E2EERequest) ApplyDelta(next *E2EERequest) *E2EERequest
type E2EEResponse ¶
type E2EEResponse struct {
OTKCounts map[string]int `json:"device_one_time_keys_count"`
DeviceLists *E2EEDeviceList `json:"device_lists,omitempty"`
FallbackKeyTypes []string `json:"device_unused_fallback_key_types,omitempty"`
}
Server response
func ProcessE2EE ¶
func ProcessE2EE(fetcher sync2.E2EEFetcher, userID, deviceID string, req *E2EERequest) (res *E2EEResponse)
func (*E2EEResponse) HasData ¶
func (r *E2EEResponse) HasData(isInitial bool) bool
type Handler ¶
type Handler struct {
Store *state.Storage
E2EEFetcher sync2.E2EEFetcher
}
type HandlerInterface ¶
type Request ¶
type Request struct {
UserID string
DeviceID string
ToDevice *ToDeviceRequest `json:"to_device"`
E2EE *E2EERequest `json:"e2ee"`
AccountData *AccountDataRequest `json:"account_data"`
}
func (Request) ApplyDelta ¶
type Response ¶
type Response struct {
ToDevice *ToDeviceResponse `json:"to_device,omitempty"`
E2EE *E2EEResponse `json:"e2ee,omitempty"`
AccountData *AccountDataResponse `json:"account_data,omitempty"`
}
type ToDeviceRequest ¶
type ToDeviceRequest struct {
Enabled *bool `json:"enabled"`
Limit int `json:"limit"` // max number of to-device messages per response
Since string `json:"since"` // since token
}
Client created request params
func (ToDeviceRequest) ApplyDelta ¶
func (r ToDeviceRequest) ApplyDelta(next *ToDeviceRequest) *ToDeviceRequest
type ToDeviceResponse ¶
type ToDeviceResponse struct {
NextBatch string `json:"next_batch"`
Events []json.RawMessage `json:"events,omitempty"`
}
Server response
func ProcessToDevice ¶
func ProcessToDevice(store *state.Storage, userID, deviceID string, req *ToDeviceRequest) (res *ToDeviceResponse)
func (*ToDeviceResponse) HasData ¶
func (r *ToDeviceResponse) HasData(isInitial bool) bool
Click to show internal directories.
Click to hide internal directories.