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,omitempty"`
Rooms map[string][]json.RawMessage `json:"rooms,omitempty"`
}
Server response
func ProcessAccountData ¶
func ProcessAccountData(store *state.Storage, roomIDToTimeline map[string][]string, 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,omitempty"`
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, isInitial bool) (res *E2EEResponse)
func (*E2EEResponse) HasData ¶
func (r *E2EEResponse) HasData(isInitial bool) bool
type Handler ¶
type Handler struct {
Store *state.Storage
E2EEFetcher sync2.E2EEFetcher
GlobalCache *caches.GlobalCache
}
type HandlerInterface ¶
type ReceiptsRequest ¶
type ReceiptsRequest struct {
Enabled bool `json:"enabled"`
}
Client created request params
func (ReceiptsRequest) ApplyDelta ¶
func (r ReceiptsRequest) ApplyDelta(next *ReceiptsRequest) *ReceiptsRequest
type ReceiptsResponse ¶
type ReceiptsResponse struct {
// room_id -> m.receipt ephemeral event
Rooms map[string]json.RawMessage `json:"rooms,omitempty"`
}
Server response
func ProcessLiveReceipts ¶
func ProcessLiveReceipts(up caches.Update, updateWillReturnResponse bool, userID string, req *ReceiptsRequest) (res *ReceiptsResponse)
func ProcessReceipts ¶
func ProcessReceipts(store *state.Storage, roomIDToTimeline map[string][]string, userID string, isInitial bool, req *ReceiptsRequest) (res *ReceiptsResponse)
func (*ReceiptsResponse) HasData ¶
func (r *ReceiptsResponse) HasData(isInitial bool) bool
type Request ¶
type Request struct {
UserID string
DeviceID string
ToDevice *ToDeviceRequest `json:"to_device"`
E2EE *E2EERequest `json:"e2ee"`
AccountData *AccountDataRequest `json:"account_data"`
Typing *TypingRequest `json:"typing"`
Receipts *ReceiptsRequest `json:"receipts"`
}
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"`
Typing *TypingResponse `json:"typing,omitempty"`
Receipts *ReceiptsResponse `json:"receipts,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
type TypingRequest ¶
type TypingRequest struct {
Enabled bool `json:"enabled"`
}
Client created request params
func (TypingRequest) ApplyDelta ¶
func (r TypingRequest) ApplyDelta(next *TypingRequest) *TypingRequest
type TypingResponse ¶
type TypingResponse struct {
Rooms map[string]json.RawMessage `json:"rooms,omitempty"`
}
Server response
func ProcessLiveTyping ¶
func ProcessLiveTyping(up caches.Update, updateWillReturnResponse bool, userID string, req *TypingRequest) (res *TypingResponse)
func ProcessTyping ¶
func ProcessTyping(globalCache *caches.GlobalCache, roomIDToTimeline map[string][]string, userID string, isInitial bool, req *TypingRequest) (res *TypingResponse)
func (*TypingResponse) HasData ¶
func (r *TypingResponse) HasData(isInitial bool) bool
Click to show internal directories.
Click to hide internal directories.