Documentation ¶
Index ¶
- func GetTransactionFromRelay(httpReq *http.Request, fedReq *fclient.FederationRequest, ...) util.JSONResponse
- func MakeRelayAPI(metricsName string, serverName spec.ServerName, ...) http.Handler
- func SendTransactionToRelay(httpReq *http.Request, fedReq *fclient.FederationRequest, ...) util.JSONResponse
- func Setup(fedMux *mux.Router, cfg *config.FederationAPI, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTransactionFromRelay ¶
func GetTransactionFromRelay( httpReq *http.Request, fedReq *fclient.FederationRequest, relayAPI api.RelayInternalAPI, userID spec.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 ¶
func MakeRelayAPI( metricsName string, serverName spec.ServerName, isLocalServerName func(spec.ServerName) bool, keyRing gomatrixserverlib.JSONVerifier, f func(*http.Request, *fclient.FederationRequest, map[string]string) util.JSONResponse, ) http.Handler
MakeRelayAPI makes an http.Handler that checks matrix relay authentication.
func SendTransactionToRelay ¶
func SendTransactionToRelay( httpReq *http.Request, fedReq *fclient.FederationRequest, relayAPI api.RelayInternalAPI, txnID gomatrixserverlib.TransactionID, userID spec.UserID, ) util.JSONResponse
SendTransactionToRelay implements PUT /_matrix/federation/v1/send_relay/{txnID}/{userID} This endpoint can be extracted into a separate relay server service.
func Setup ¶
func Setup( fedMux *mux.Router, cfg *config.FederationAPI, relayAPI *relayInternal.RelayInternalAPI, keys gomatrixserverlib.JSONVerifier, )
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.