Documentation ¶
Index ¶
- func Context(req *http.Request, device *userapi.Device, rsAPI roomserver.SyncRoomserverAPI, ...) util.JSONResponse
- func GetEvent(req *http.Request, device *userapi.Device, roomID string, eventID string, ...) util.JSONResponse
- func GetFilter(req *http.Request, device *api.Device, syncDB storage.Database, userID string, ...) util.JSONResponse
- func GetMemberships(req *http.Request, device *userapi.Device, roomID string, ...) util.JSONResponse
- func OnIncomingMessagesRequest(req *http.Request, db storage.Database, roomID string, device *userapi.Device, ...) util.JSONResponse
- func PutFilter(req *http.Request, device *api.Device, syncDB storage.Database, userID string) util.JSONResponse
- func Relations(req *http.Request, device *userapi.Device, syncDB storage.Database, ...) util.JSONResponse
- func Search(req *http.Request, device *api.Device, syncDB storage.Database, ...) util.JSONResponse
- func Setup(csMux *mux.Router, srp *sync.RequestPool, syncDB storage.Database, ...)
- type ContextRespsonse
- type Groups
- type ProfileInfo
- type RelationsResponse
- type Result
- type RoomEvents
- type RoomResult
- type SearchCategories
- type SearchContextResponse
- type SearchRequest
- type SearchResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Context ¶ added in v0.6.4
func Context( req *http.Request, device *userapi.Device, rsAPI roomserver.SyncRoomserverAPI, syncDB storage.Database, roomID, eventID string, lazyLoadCache caching.LazyLoadCache, ) util.JSONResponse
func GetEvent ¶ added in v0.10.3
func GetEvent( req *http.Request, device *userapi.Device, roomID string, eventID string, cfg *config.SyncAPI, syncDB storage.Database, rsAPI api.SyncRoomserverAPI, ) util.JSONResponse
GetEvent implements
GET /_matrix/client/r0/rooms/{roomId}/event/{eventId}
https://spec.matrix.org/v1.4/client-server-api/#get_matrixclientv3roomsroomideventeventid
func GetFilter ¶
func GetFilter( req *http.Request, device *api.Device, syncDB storage.Database, userID string, filterID string, ) util.JSONResponse
GetFilter implements GET /_matrix/client/r0/user/{userId}/filter/{filterId}
func GetMemberships ¶ added in v0.10.5
func GetMemberships( req *http.Request, device *userapi.Device, roomID string, syncDB storage.Database, rsAPI api.SyncRoomserverAPI, joinedOnly bool, membership, notMembership *string, at string, ) util.JSONResponse
GetMemberships implements
GET /rooms/{roomId}/members GET /rooms/{roomId}/joined_members
func OnIncomingMessagesRequest ¶
func OnIncomingMessagesRequest( req *http.Request, db storage.Database, roomID string, device *userapi.Device, rsAPI api.SyncRoomserverAPI, cfg *config.SyncAPI, srp *sync.RequestPool, lazyLoadCache caching.LazyLoadCache, ) util.JSONResponse
OnIncomingMessagesRequest implements the /messages endpoint from the client-server API. See: https://matrix.org/docs/spec/client_server/latest.html#get-matrix-client-r0-rooms-roomid-messages
func PutFilter ¶
func PutFilter( req *http.Request, device *api.Device, syncDB storage.Database, userID string, ) util.JSONResponse
PutFilter implements
POST /_matrix/client/r0/user/{userId}/filter
func Relations ¶ added in v0.10.3
func Relations( req *http.Request, device *userapi.Device, syncDB storage.Database, rsAPI api.SyncRoomserverAPI, roomID, eventID, relType, eventType string, ) util.JSONResponse
nolint:gocyclo
func Search ¶ added in v0.10.0
func Search(req *http.Request, device *api.Device, syncDB storage.Database, fts *fulltext.Search, from *string) util.JSONResponse
nolint:gocyclo
func Setup ¶
func Setup( csMux *mux.Router, srp *sync.RequestPool, syncDB storage.Database, userAPI userapi.SyncUserAPI, rsAPI api.SyncRoomserverAPI, cfg *config.SyncAPI, lazyLoadCache caching.LazyLoadCache, fts *fulltext.Search, )
Setup configures the given mux with sync-server listeners
Due to Setup being used to call many other functions, a gocyclo nolint is applied: nolint: gocyclo
Types ¶
type ContextRespsonse ¶ added in v0.6.4
type ContextRespsonse struct { End string `json:"end"` Event *gomatrixserverlib.ClientEvent `json:"event,omitempty"` EventsAfter []gomatrixserverlib.ClientEvent `json:"events_after,omitempty"` EventsBefore []gomatrixserverlib.ClientEvent `json:"events_before,omitempty"` Start string `json:"start"` State []gomatrixserverlib.ClientEvent `json:"state,omitempty"` }
type Groups ¶ added in v0.10.0
type Groups struct {
RoomID map[string]RoomResult `json:"room_id"`
}
type ProfileInfo ¶ added in v0.10.0
type RelationsResponse ¶ added in v0.10.3
type RelationsResponse struct { Chunk []gomatrixserverlib.ClientEvent `json:"chunk"` NextBatch string `json:"next_batch,omitempty"` PrevBatch string `json:"prev_batch,omitempty"` }
type Result ¶ added in v0.10.0
type Result struct { Context SearchContextResponse `json:"context"` Rank float64 `json:"rank"` Result gomatrixserverlib.ClientEvent `json:"result"` }
type RoomEvents ¶ added in v0.10.0
type RoomEvents struct { Count int `json:"count"` Groups Groups `json:"groups"` Highlights []string `json:"highlights"` NextBatch *string `json:"next_batch,omitempty"` Results []Result `json:"results"` State map[string][]gomatrixserverlib.ClientEvent `json:"state,omitempty"` }
type RoomResult ¶ added in v0.10.0
type SearchCategories ¶ added in v0.10.0
type SearchCategories struct {
RoomEvents RoomEvents `json:"room_events"`
}
type SearchContextResponse ¶ added in v0.10.0
type SearchContextResponse struct { End string `json:"end"` EventsAfter []gomatrixserverlib.ClientEvent `json:"events_after"` EventsBefore []gomatrixserverlib.ClientEvent `json:"events_before"` Start string `json:"start"` ProfileInfo map[string]ProfileInfo `json:"profile_info"` }
type SearchRequest ¶ added in v0.10.0
type SearchRequest struct { SearchCategories struct { RoomEvents struct { EventContext struct { AfterLimit int `json:"after_limit,omitempty"` BeforeLimit int `json:"before_limit,omitempty"` IncludeProfile bool `json:"include_profile,omitempty"` } `json:"event_context"` Filter gomatrixserverlib.StateFilter `json:"filter"` Groupings struct { GroupBy []struct { Key string `json:"key"` } `json:"group_by"` } `json:"groupings"` IncludeState bool `json:"include_state"` Keys []string `json:"keys"` OrderBy string `json:"order_by"` SearchTerm string `json:"search_term"` } `json:"room_events"` } `json:"search_categories"` }
type SearchResponse ¶ added in v0.10.0
type SearchResponse struct {
SearchCategories SearchCategories `json:"search_categories"`
}
Click to show internal directories.
Click to hide internal directories.