routing

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTransactionFromRelay

func GetTransactionFromRelay(
	httpReq *http.Request,
	fedReq *gomatrixserverlib.FederationRequest,
	relayAPI api.RelayInternalAPI,
	userID gomatrixserverlib.UserID,
) util.JSONResponse

GetTransactionFromRelay implements GET /_matrix/federation/v1/relay_txn/{userID} This endpoint can be extracted into a separate relay server service.

func MakeRelayAPI

MakeRelayAPI makes an http.Handler that checks matrix relay authentication.

func SendTransactionToRelay

SendTransactionToRelay implements PUT /_matrix/federation/v1/send_relay/{txnID}/{userID} This endpoint can be extracted into a separate relay server service.

func Setup

Setup registers HTTP handlers with the given ServeMux. The provided publicAPIMux MUST have `UseEncodedPath()` enabled or else routes will incorrectly path unescape twice (once from the router, once from MakeRelayAPI). We need to have this enabled so we can decode paths like foo/bar%2Fbaz as [foo, bar/baz] - by default it will decode to [foo, bar, baz]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL