Documentation ¶
Index ¶
- func AddCompletedSessionStage(sessionID string, stage authtypes.LoginType)
- func AuthFallback(w http.ResponseWriter, req *http.Request, authType string, ...) *util.JSONResponse
- func CheckAndSave3PIDAssociation(req *http.Request, accountDB accounts.Database, device *api.Device, ...) util.JSONResponse
- func ClaimKeys(req *http.Request, keyAPI api.KeyInternalAPI) util.JSONResponse
- func CreateRoom(req *http.Request, device *api.Device, cfg *config.ClientAPI, ...) util.JSONResponse
- func Deactivate(req *http.Request, userInteractiveAuth *auth.UserInteractive, ...) util.JSONResponse
- func DeleteDeviceById(req *http.Request, userInteractiveAuth *auth.UserInteractive, ...) util.JSONResponse
- func DeleteDevices(req *http.Request, userAPI api.UserInternalAPI, device *api.Device) util.JSONResponse
- func DeleteTag(req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func DirectoryRoom(req *http.Request, roomAlias string, ...) util.JSONResponse
- func Forget3PID(req *http.Request, accountDB accounts.Database) util.JSONResponse
- func GetAccountData(req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func GetAdminWhois(req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func GetAssociated3PIDs(req *http.Request, accountDB accounts.Database, device *api.Device) util.JSONResponse
- func GetAvatarURL(req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI, ...) util.JSONResponse
- func GetCapabilities(req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI) util.JSONResponse
- func GetDeviceByID(req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func GetDevicesByLocalpart(req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device) util.JSONResponse
- func GetDisplayName(req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI, ...) util.JSONResponse
- func GetEvent(req *http.Request, device *userapi.Device, roomID string, eventID string, ...) util.JSONResponse
- func GetJoinedRooms(req *http.Request, device *userapi.Device, rsAPI api.RoomserverInternalAPI) util.JSONResponse
- func GetMemberships(req *http.Request, device *userapi.Device, roomID string, joinedOnly bool, ...) util.JSONResponse
- func GetPostPublicRooms(req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, ...) util.JSONResponse
- func GetProfile(req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI, ...) util.JSONResponse
- func GetTags(req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func GetVisibility(req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, roomID string) util.JSONResponse
- func JoinRoomByIDOrAlias(req *http.Request, device *api.Device, ...) util.JSONResponse
- func LeaveRoomByID(req *http.Request, device *api.Device, ...) util.JSONResponse
- func LegacyRegister(req *http.Request, userAPI userapi.UserInternalAPI, cfg *config.ClientAPI) util.JSONResponse
- func Login(req *http.Request, accountDB accounts.Database, ...) util.JSONResponse
- func Logout(req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device) util.JSONResponse
- func LogoutAll(req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device) util.JSONResponse
- func OnIncomingStateRequest(ctx context.Context, device *userapi.Device, rsAPI api.RoomserverInternalAPI, ...) util.JSONResponse
- func OnIncomingStateTypeRequest(ctx context.Context, device *userapi.Device, rsAPI api.RoomserverInternalAPI, ...) util.JSONResponse
- func Password(req *http.Request, userAPI userapi.UserInternalAPI, ...) util.JSONResponse
- func PeekRoomByIDOrAlias(req *http.Request, device *api.Device, ...) util.JSONResponse
- func PutTag(req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func QueryKeys(req *http.Request, keyAPI api.KeyInternalAPI) util.JSONResponse
- func Register(req *http.Request, userAPI userapi.UserInternalAPI, ...) util.JSONResponse
- func RegisterAvailable(req *http.Request, cfg *config.ClientAPI, accountDB accounts.Database) util.JSONResponse
- func RemoveLocalAlias(req *http.Request, device *api.Device, alias string, ...) util.JSONResponse
- func RequestEmailToken(req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI) util.JSONResponse
- func RequestTurnServer(req *http.Request, device *api.Device, cfg *config.ClientAPI) util.JSONResponse
- func SaveAccountData(req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func SaveReadMarker(req *http.Request, userAPI api.UserInternalAPI, ...) util.JSONResponse
- func SearchUserDirectory(ctx context.Context, device *userapi.Device, userAPI userapi.UserInternalAPI, ...) *util.JSONResponse
- func SendBan(req *http.Request, accountDB accounts.Database, device *userapi.Device, ...) util.JSONResponse
- func SendEvent(req *http.Request, device *userapi.Device, roomID, eventType string, ...) util.JSONResponse
- func SendForget(req *http.Request, device *userapi.Device, roomID string, ...) util.JSONResponse
- func SendInvite(req *http.Request, accountDB accounts.Database, device *userapi.Device, ...) util.JSONResponse
- func SendKick(req *http.Request, accountDB accounts.Database, device *userapi.Device, ...) util.JSONResponse
- func SendRedaction(req *http.Request, device *userapi.Device, roomID, eventID string, ...) util.JSONResponse
- func SendToDevice(req *http.Request, device *userapi.Device, eduAPI api.EDUServerInputAPI, ...) util.JSONResponse
- func SendTyping(req *http.Request, device *userapi.Device, roomID string, userID string, ...) util.JSONResponse
- func SendUnban(req *http.Request, accountDB accounts.Database, device *userapi.Device, ...) util.JSONResponse
- func SetAvatarURL(req *http.Request, accountDB accounts.Database, device *userapi.Device, ...) util.JSONResponse
- func SetDisplayName(req *http.Request, accountDB accounts.Database, device *userapi.Device, ...) util.JSONResponse
- func SetLocalAlias(req *http.Request, device *api.Device, alias string, cfg *config.ClientAPI, ...) util.JSONResponse
- func SetReceipt(req *http.Request, eduAPI api.EDUServerInputAPI, device *userapi.Device, ...) util.JSONResponse
- func SetVisibility(req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, ...) util.JSONResponse
- func Setup(publicAPIMux *mux.Router, cfg *config.ClientAPI, ...)
- func UpdateDeviceByID(req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ...) util.JSONResponse
- func UploadKeys(req *http.Request, keyAPI api.KeyInternalAPI, device *userapi.Device) util.JSONResponse
- func UserIDIsWithinApplicationServiceNamespace(cfg *config.ClientAPI, userID string, appservice *config.ApplicationService) bool
- func UsernameMatchesExclusiveNamespaces(cfg *config.ClientAPI, username string) bool
- func UsernameMatchesMultipleExclusiveNamespaces(cfg *config.ClientAPI, username string) bool
- func Whoami(req *http.Request, device *api.Device) util.JSONResponse
- type PublicRoomReq
- type UserDirectoryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCompletedSessionStage ¶
AddCompletedSessionStage records that a session has completed an auth stage.
func AuthFallback ¶
func AuthFallback( w http.ResponseWriter, req *http.Request, authType string, cfg *config.ClientAPI, ) *util.JSONResponse
AuthFallback implements GET and POST /auth/{authType}/fallback/web?session={sessionID}
func CheckAndSave3PIDAssociation ¶
func CheckAndSave3PIDAssociation( req *http.Request, accountDB accounts.Database, device *api.Device, cfg *config.ClientAPI, ) util.JSONResponse
CheckAndSave3PIDAssociation implements POST /account/3pid
func ClaimKeys ¶
func ClaimKeys(req *http.Request, keyAPI api.KeyInternalAPI) util.JSONResponse
func CreateRoom ¶
func CreateRoom( req *http.Request, device *api.Device, cfg *config.ClientAPI, accountDB accounts.Database, rsAPI roomserverAPI.RoomserverInternalAPI, asAPI appserviceAPI.AppServiceQueryAPI, ) util.JSONResponse
CreateRoom implements /createRoom
func Deactivate ¶
func Deactivate( req *http.Request, userInteractiveAuth *auth.UserInteractive, userAPI api.UserInternalAPI, deviceAPI *api.Device, ) util.JSONResponse
Deactivate handles POST requests to /account/deactivate
func DeleteDeviceById ¶
func DeleteDeviceById( req *http.Request, userInteractiveAuth *auth.UserInteractive, userAPI api.UserInternalAPI, device *api.Device, deviceID string, ) util.JSONResponse
DeleteDeviceById handles DELETE requests to /devices/{deviceId}
func DeleteDevices ¶
func DeleteDevices( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, ) util.JSONResponse
DeleteDevices handles POST requests to /delete_devices
func DeleteTag ¶
func DeleteTag( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, userID string, roomID string, tag string, syncProducer *producers.SyncAPIProducer, ) util.JSONResponse
DeleteTag implements DELETE /_matrix/client/r0/user/{userID}/rooms/{roomID}/tags/{tag} Delete functionality works by obtaining the saved tags, removing the intended tag from the "map" and then saving the new "map" in the DB
func DirectoryRoom ¶
func DirectoryRoom( req *http.Request, roomAlias string, federation *gomatrixserverlib.FederationClient, cfg *config.ClientAPI, rsAPI roomserverAPI.RoomserverInternalAPI, fedSenderAPI federationSenderAPI.FederationSenderInternalAPI, ) util.JSONResponse
DirectoryRoom looks up a room alias
func Forget3PID ¶
Forget3PID implements POST /account/3pid/delete
func GetAccountData ¶
func GetAccountData( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, userID string, roomID string, dataType string, ) util.JSONResponse
GetAccountData implements GET /user/{userId}/[rooms/{roomid}/]account_data/{type}
func GetAdminWhois ¶ added in v0.3.1
func GetAdminWhois( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, userID string, ) util.JSONResponse
GetAdminWhois implements GET /admin/whois/{userId}
func GetAssociated3PIDs ¶
func GetAssociated3PIDs( req *http.Request, accountDB accounts.Database, device *api.Device, ) util.JSONResponse
GetAssociated3PIDs implements GET /account/3pid
func GetAvatarURL ¶
func GetAvatarURL( req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI, userID string, asAPI appserviceAPI.AppServiceQueryAPI, federation *gomatrixserverlib.FederationClient, ) util.JSONResponse
GetAvatarURL implements GET /profile/{userID}/avatar_url
func GetCapabilities ¶
func GetCapabilities( req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, ) util.JSONResponse
GetCapabilities returns information about the server's supported feature set and other relevant capabilities to an authenticated user.
func GetDeviceByID ¶
func GetDeviceByID( req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device, deviceID string, ) util.JSONResponse
GetDeviceByID handles /devices/{deviceID}
func GetDevicesByLocalpart ¶
func GetDevicesByLocalpart( req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device, ) util.JSONResponse
GetDevicesByLocalpart handles /devices
func GetDisplayName ¶
func GetDisplayName( req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI, userID string, asAPI appserviceAPI.AppServiceQueryAPI, federation *gomatrixserverlib.FederationClient, ) util.JSONResponse
GetDisplayName implements GET /profile/{userID}/displayname
func GetEvent ¶
func GetEvent( req *http.Request, device *userapi.Device, roomID string, eventID string, cfg *config.ClientAPI, rsAPI api.RoomserverInternalAPI, federation *gomatrixserverlib.FederationClient, ) util.JSONResponse
GetEvent implements GET /_matrix/client/r0/rooms/{roomId}/event/{eventId} https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-rooms-roomid-event-eventid
func GetJoinedRooms ¶
func GetJoinedRooms( req *http.Request, device *userapi.Device, rsAPI api.RoomserverInternalAPI, ) util.JSONResponse
func GetMemberships ¶
func GetMemberships( req *http.Request, device *userapi.Device, roomID string, joinedOnly bool, _ *config.ClientAPI, rsAPI api.RoomserverInternalAPI, ) util.JSONResponse
GetMemberships implements GET /rooms/{roomId}/members
func GetPostPublicRooms ¶
func GetPostPublicRooms( req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, extRoomsProvider api.ExtraPublicRoomsProvider, federation *gomatrixserverlib.FederationClient, cfg *config.ClientAPI, ) util.JSONResponse
GetPostPublicRooms implements GET and POST /publicRooms
func GetProfile ¶
func GetProfile( req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI, userID string, asAPI appserviceAPI.AppServiceQueryAPI, federation *gomatrixserverlib.FederationClient, ) util.JSONResponse
GetProfile implements GET /profile/{userID}
func GetTags ¶
func GetTags( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, userID string, roomID string, syncProducer *producers.SyncAPIProducer, ) util.JSONResponse
GetTags implements GET /_matrix/client/r0/user/{userID}/rooms/{roomID}/tags
func GetVisibility ¶
func GetVisibility( req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, roomID string, ) util.JSONResponse
GetVisibility implements GET /directory/list/room/{roomID}
func JoinRoomByIDOrAlias ¶
func JoinRoomByIDOrAlias( req *http.Request, device *api.Device, rsAPI roomserverAPI.RoomserverInternalAPI, accountDB accounts.Database, roomIDOrAlias string, ) util.JSONResponse
func LeaveRoomByID ¶
func LeaveRoomByID( req *http.Request, device *api.Device, rsAPI roomserverAPI.RoomserverInternalAPI, roomID string, ) util.JSONResponse
func LegacyRegister ¶
func LegacyRegister( req *http.Request, userAPI userapi.UserInternalAPI, cfg *config.ClientAPI, ) util.JSONResponse
LegacyRegister process register requests from the legacy v1 API
func Login ¶
func Login( req *http.Request, accountDB accounts.Database, userAPI userapi.UserInternalAPI, cfg *config.ClientAPI, ) util.JSONResponse
Login implements GET and POST /login
func Logout ¶
func Logout( req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device, ) util.JSONResponse
Logout handles POST /logout
func LogoutAll ¶
func LogoutAll( req *http.Request, userAPI userapi.UserInternalAPI, device *api.Device, ) util.JSONResponse
LogoutAll handles POST /logout/all
func OnIncomingStateRequest ¶
func OnIncomingStateRequest(ctx context.Context, device *userapi.Device, rsAPI api.RoomserverInternalAPI, roomID string) util.JSONResponse
OnIncomingStateRequest is called when a client makes a /rooms/{roomID}/state request. It will fetch all the state events from the specified room and will append the necessary keys to them if applicable before returning them. Returns an error if something went wrong in the process. TODO: Check if the user is in the room. If not, check if the room's history is publicly visible. Current behaviour is returning an empty array if the user cannot see the room's history.
func OnIncomingStateTypeRequest ¶
func OnIncomingStateTypeRequest( ctx context.Context, device *userapi.Device, rsAPI api.RoomserverInternalAPI, roomID, evType, stateKey string, eventFormat bool, ) util.JSONResponse
OnIncomingStateTypeRequest is called when a client makes a /rooms/{roomID}/state/{type}/{statekey} request. It will look in current state to see if there is an event with that type and state key, if there is then (by default) we return the content, otherwise a 404. If eventFormat=true, sends the whole event else just the content. nolint:gocyclo
func PeekRoomByIDOrAlias ¶
func PeekRoomByIDOrAlias( req *http.Request, device *api.Device, rsAPI roomserverAPI.RoomserverInternalAPI, accountDB accounts.Database, roomIDOrAlias string, ) util.JSONResponse
func PutTag ¶
func PutTag( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, userID string, roomID string, tag string, syncProducer *producers.SyncAPIProducer, ) util.JSONResponse
PutTag implements PUT /_matrix/client/r0/user/{userID}/rooms/{roomID}/tags/{tag} Put functionality works by getting existing data from the DB (if any), adding the tag to the "map" and saving the new "map" to the DB
func QueryKeys ¶
func QueryKeys(req *http.Request, keyAPI api.KeyInternalAPI) util.JSONResponse
func Register ¶
func Register( req *http.Request, userAPI userapi.UserInternalAPI, accountDB accounts.Database, cfg *config.ClientAPI, ) util.JSONResponse
Register processes a /register request. http://matrix.org/speculator/spec/HEAD/client_server/unstable.html#post-matrix-client-unstable-register
func RegisterAvailable ¶
func RegisterAvailable( req *http.Request, cfg *config.ClientAPI, accountDB accounts.Database, ) util.JSONResponse
RegisterAvailable checks if the username is already taken or invalid.
func RemoveLocalAlias ¶
func RemoveLocalAlias( req *http.Request, device *api.Device, alias string, aliasAPI roomserverAPI.RoomserverInternalAPI, ) util.JSONResponse
RemoveLocalAlias implements DELETE /directory/room/{roomAlias}
func RequestEmailToken ¶
func RequestEmailToken(req *http.Request, accountDB accounts.Database, cfg *config.ClientAPI) util.JSONResponse
RequestEmailToken implements:
POST /account/3pid/email/requestToken POST /register/email/requestToken
func RequestTurnServer ¶
func RequestTurnServer(req *http.Request, device *api.Device, cfg *config.ClientAPI) util.JSONResponse
RequestTurnServer implements:
GET /voip/turnServer
func SaveAccountData ¶
func SaveAccountData( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, userID string, roomID string, dataType string, syncProducer *producers.SyncAPIProducer, ) util.JSONResponse
SaveAccountData implements PUT /user/{userId}/[rooms/{roomId}/]account_data/{type}
func SaveReadMarker ¶ added in v0.2.0
func SaveReadMarker( req *http.Request, userAPI api.UserInternalAPI, rsAPI roomserverAPI.RoomserverInternalAPI, eduAPI eduserverAPI.EDUServerInputAPI, syncProducer *producers.SyncAPIProducer, device *api.Device, roomID string, ) util.JSONResponse
SaveReadMarker implements POST /rooms/{roomId}/read_markers
func SearchUserDirectory ¶
func SearchUserDirectory( ctx context.Context, device *userapi.Device, userAPI userapi.UserInternalAPI, rsAPI api.RoomserverInternalAPI, serverName gomatrixserverlib.ServerName, searchString string, limit int, ) *util.JSONResponse
func SendBan ¶
func SendBan( req *http.Request, accountDB accounts.Database, device *userapi.Device, roomID string, cfg *config.ClientAPI, rsAPI roomserverAPI.RoomserverInternalAPI, asAPI appserviceAPI.AppServiceQueryAPI, ) util.JSONResponse
func SendEvent ¶
func SendEvent( req *http.Request, device *userapi.Device, roomID, eventType string, txnID, stateKey *string, cfg *config.ClientAPI, rsAPI api.RoomserverInternalAPI, txnCache *transactions.Cache, ) util.JSONResponse
SendEvent implements:
/rooms/{roomID}/send/{eventType} /rooms/{roomID}/send/{eventType}/{txnID} /rooms/{roomID}/state/{eventType}/{stateKey}
func SendForget ¶ added in v0.3.0
func SendForget( req *http.Request, device *userapi.Device, roomID string, rsAPI roomserverAPI.RoomserverInternalAPI, ) util.JSONResponse
func SendInvite ¶
func SendInvite( req *http.Request, accountDB accounts.Database, device *userapi.Device, roomID string, cfg *config.ClientAPI, rsAPI roomserverAPI.RoomserverInternalAPI, asAPI appserviceAPI.AppServiceQueryAPI, ) util.JSONResponse
func SendKick ¶
func SendKick( req *http.Request, accountDB accounts.Database, device *userapi.Device, roomID string, cfg *config.ClientAPI, rsAPI roomserverAPI.RoomserverInternalAPI, asAPI appserviceAPI.AppServiceQueryAPI, ) util.JSONResponse
func SendRedaction ¶
func SendRedaction( req *http.Request, device *userapi.Device, roomID, eventID string, cfg *config.ClientAPI, rsAPI roomserverAPI.RoomserverInternalAPI, ) util.JSONResponse
func SendToDevice ¶
func SendToDevice( req *http.Request, device *userapi.Device, eduAPI api.EDUServerInputAPI, txnCache *transactions.Cache, eventType string, txnID *string, ) util.JSONResponse
SendToDevice handles PUT /_matrix/client/r0/sendToDevice/{eventType}/{txnId} sends the device events to the EDU Server
func SendTyping ¶
func SendTyping( req *http.Request, device *userapi.Device, roomID string, userID string, accountDB accounts.Database, eduAPI api.EDUServerInputAPI, rsAPI roomserverAPI.RoomserverInternalAPI, ) util.JSONResponse
SendTyping handles PUT /rooms/{roomID}/typing/{userID} sends the typing events to client API typingProducer
func SendUnban ¶
func SendUnban( req *http.Request, accountDB accounts.Database, device *userapi.Device, roomID string, cfg *config.ClientAPI, rsAPI roomserverAPI.RoomserverInternalAPI, asAPI appserviceAPI.AppServiceQueryAPI, ) util.JSONResponse
func SetAvatarURL ¶
func SetAvatarURL( req *http.Request, accountDB accounts.Database, device *userapi.Device, userID string, cfg *config.ClientAPI, rsAPI api.RoomserverInternalAPI, ) util.JSONResponse
SetAvatarURL implements PUT /profile/{userID}/avatar_url nolint:gocyclo
func SetDisplayName ¶
func SetDisplayName( req *http.Request, accountDB accounts.Database, device *userapi.Device, userID string, cfg *config.ClientAPI, rsAPI api.RoomserverInternalAPI, ) util.JSONResponse
SetDisplayName implements PUT /profile/{userID}/displayname nolint:gocyclo
func SetLocalAlias ¶
func SetLocalAlias( req *http.Request, device *api.Device, alias string, cfg *config.ClientAPI, aliasAPI roomserverAPI.RoomserverInternalAPI, ) util.JSONResponse
SetLocalAlias implements PUT /directory/room/{roomAlias} TODO: Check if the user has the power level to set an alias
func SetReceipt ¶ added in v0.3.0
func SetReceipt(req *http.Request, eduAPI api.EDUServerInputAPI, device *userapi.Device, roomId, receiptType, eventId string) util.JSONResponse
func SetVisibility ¶
func SetVisibility( req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, dev *userapi.Device, roomID string, ) util.JSONResponse
SetVisibility implements PUT /directory/list/room/{roomID} TODO: Allow admin users to edit the room visibility
func Setup ¶
func Setup( publicAPIMux *mux.Router, cfg *config.ClientAPI, eduAPI eduServerAPI.EDUServerInputAPI, rsAPI roomserverAPI.RoomserverInternalAPI, asAPI appserviceAPI.AppServiceQueryAPI, accountDB accounts.Database, userAPI userapi.UserInternalAPI, federation *gomatrixserverlib.FederationClient, syncProducer *producers.SyncAPIProducer, transactionsCache *transactions.Cache, federationSender federationSenderAPI.FederationSenderInternalAPI, keyAPI keyserverAPI.KeyInternalAPI, extRoomsProvider api.ExtraPublicRoomsProvider, )
Setup registers HTTP handlers with the given ServeMux. It also supplies the given http.Client to clients which need to make outbound HTTP requests.
Due to Setup being used to call many other functions, a gocyclo nolint is applied: nolint: gocyclo
func UpdateDeviceByID ¶
func UpdateDeviceByID( req *http.Request, userAPI api.UserInternalAPI, device *api.Device, deviceID string, ) util.JSONResponse
UpdateDeviceByID handles PUT on /devices/{deviceID}
func UploadKeys ¶
func UploadKeys(req *http.Request, keyAPI api.KeyInternalAPI, device *userapi.Device) util.JSONResponse
func UserIDIsWithinApplicationServiceNamespace ¶
func UserIDIsWithinApplicationServiceNamespace( cfg *config.ClientAPI, userID string, appservice *config.ApplicationService, ) bool
UserIDIsWithinApplicationServiceNamespace checks to see if a given userID falls within any of the namespaces of a given Application Service. If no Application Service is given, it will check to see if it matches any Application Service's namespace.
func UsernameMatchesExclusiveNamespaces ¶
UsernameMatchesExclusiveNamespaces will check if a given username matches any application service's exclusive users namespace
func UsernameMatchesMultipleExclusiveNamespaces ¶
UsernameMatchesMultipleExclusiveNamespaces will check if a given username matches more than one exclusive namespace. More than one is not allowed
func Whoami ¶
Whoami implements `/account/whoami` which enables client to query their account user id. https://matrix.org/docs/spec/client_server/r0.3.0.html#get-matrix-client-r0-account-whoami
Types ¶
type PublicRoomReq ¶
type UserDirectoryResponse ¶
type UserDirectoryResponse struct { Results []authtypes.FullyQualifiedProfile `json:"results"` Limited bool `json:"limited"` }
Source Files ¶
- account_data.go
- admin_whois.go
- auth_fallback.go
- capabilities.go
- createroom.go
- deactivate.go
- device.go
- directory.go
- directory_public.go
- getevent.go
- joinroom.go
- keys.go
- leaveroom.go
- login.go
- logout.go
- membership.go
- memberships.go
- password.go
- peekroom.go
- profile.go
- rate_limiting.go
- receipt.go
- redaction.go
- register.go
- room_tagging.go
- routing.go
- sendevent.go
- sendtodevice.go
- sendtyping.go
- state.go
- threepid.go
- userdirectory.go
- voip.go
- whoami.go