modulepackage
0.19.0-mod-2
Repository: https://github.com/element-hq/mautrix-go.git
Documentation: pkg.go.dev
# README
Element fork
The Element fork includes the following changes:
Some changes that appear here may get upstreamed to https://github.com/mautrix/go, and will be removed from the list when they appear in both versions.
Tagged versions will appear as v{UPSTREAM-VERSION}-mod-{VERSION}
E.g. The third modification release to 1.0 of the upstream release would be v1.0-mod-3
.
mautrix-go
A Golang Matrix framework. Used by gomuks, go-neb, mautrix-whatsapp and others.
Matrix room: #go:maunium.net
This project is based on matrix-org/gomatrix. The original project is licensed under Apache 2.0.
In addition to the basic client API features the original project has, this framework also has:
- Appservice support (Intent API like mautrix-python, room state storage, etc)
- End-to-end encryption support (incl. interactive SAS verification)
- High-level module for building puppeting bridges
- High-level module for building chat clients
- Wrapper functions for the Synapse admin API
- Structs for parsing event content
- Helpers for parsing and generating Matrix HTML
- Helpers for handling push rules
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package format contains utilities for working with Matrix HTML, specifically methods to parse Markdown into HTML and to parse Matrix HTML into text or markdown.
Package hicli contains a highly opinionated high-level framework for developing instant messaging clients on Matrix.
No description provided by the author
No description provided by the author
Package pushrules contains utilities to parse push notification rules.
No description provided by the author
No description provided by the author
# Functions
BuildURL builds a URL with the given path parts.
DefaultFilter returns the default filter used by the Matrix server if no filter is provided in the request.
DefaultFilterPart returns the default filter part used by the Matrix server if no filter is provided in the request.
DiscoverClientAPI resolves the client API URL from a Matrix server name.
No description provided by the author
NewAccountDataStore returns a new AccountDataStore, which stores the next_batch token as a custom event in account data in the homeserver.
NewClient creates a new Matrix Client ready for syncing.
NewDefaultSyncer returns an instantiated DefaultSyncer.
No description provided by the author
NewMemorySyncStore constructs a new MemorySyncStore.
NewRoom creates a new Room with the given ID.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Request contained valid JSON, but it was malformed in some way, e.g.
The state change requested cannot be performed, such as attempting to unban a user who is not banned.
Common error codes from https://matrix.org/docs/spec/client_server/latest#api-standards
Can be used with errors.Is() to check the response code without casting the error:
err := client.Sync() if errors.Is(err, MUnknownToken) { // logout }.
Common error codes from https://matrix.org/docs/spec/client_server/latest#api-standards
Can be used with errors.Is() to check the response code without casting the error:
err := client.Sync() if errors.Is(err, MUnknownToken) { // logout }.
Common error codes from https://matrix.org/docs/spec/client_server/latest#api-standards
Can be used with errors.Is() to check the response code without casting the error:
err := client.Sync() if errors.Is(err, MUnknownToken) { // logout }.
The resource being requested is reserved by an application service, or the application service making the request has not created the resource.
Forbidden access, e.g.
The client attempted to join a room that has a version the server does not support.
The client specified a parameter that has the wrong value.
Encountered when trying to register a user ID which is not valid.
Too many requests have been sent in a short period of time.
No access token was specified for the request.
No resource was found for this request.
Request did not contain valid JSON.
Sent when the room alias given to the createRoom API is already in use.
The request or entity was too large.
The access token specified was not recognised.
Unrecognized request, e.g.
The client's request to create a room used a room version that the server does not support.
Common error codes from https://matrix.org/docs/spec/client_server/latest#api-standards
Can be used with errors.Is() to check the response code without casting the error:
err := client.Sync() if errors.Is(err, MUnknownToken) { // logout }.
The user ID associated with the request has been deactivated.
Encountered when trying to register a user ID which has been taken.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AccountDataStore uses account data to store the next batch token, and stores the filter ID in memory (as filters can be safely recreated every startup).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Client represents a Matrix client.
No description provided by the author
No description provided by the author
DefaultSyncer is the default syncing implementation.
No description provided by the author
No description provided by the author
Filter is used by clients to specify how the server should filter responses to e.g.
FilterPart is used to define filtering rules for specific categories of events.
No description provided by the author
No description provided by the author
HTTPError An HTTP Error response, which may wrap an underlying native Go Error.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MemorySyncStore implements the Storer interface.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReqBanUser is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidban.
Deprecated: MSC2716 was abandoned.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReqCreateRoom is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3createroom.
ReqDeleteDevice is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#delete_matrixclientv3devicesdeviceid.
ReqDeleteDevices is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3delete_devices.
ReqDeviceInfo is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3devicesdeviceid.
ReqHierarchy contains the parameters for https://spec.matrix.org/v1.4/client-server-api/#get_matrixclientv1roomsroomidhierarchy
As it's a GET method, there is no JSON body, so this is only query parameters.
ReqInvite3PID is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidinvite-1 It is also a JSON object used in https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3createroom.
ReqInviteUser is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidinvite.
No description provided by the author
No description provided by the author
No description provided by the author
ReqKickUser is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidkick.
No description provided by the author
ReqLogin is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3login.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReqRedact is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3roomsroomidredacteventidtxnid.
ReqRegister is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3register.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReqTyping is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3roomsroomidtypinguserid.
No description provided by the author
No description provided by the author
ReqUnbanUser is the JSON request for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidunban.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RespBanUser is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidban.
Deprecated: MSC2716 was abandoned.
No description provided by the author
No description provided by the author
RespCapabilities is the JSON response for https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3capabilities.
No description provided by the author
RespContext is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3roomsroomidcontexteventid.
RespCreateFilter is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3useruseridfilter.
RespCreateMXC is the JSON response for https://spec.matrix.org/v1.7/client-server-api/#post_matrixmediav1create.
RespCreateRoom is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3createroom.
RespDeviceInfo is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3devicesdeviceid.
RespDevicesInfo is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3devices.
RespError is the standard JSON error response from Homeservers.
RespForgetRoom is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidforget.
RespHierarchy is the JSON response for https://spec.matrix.org/v1.4/client-server-api/#get_matrixclientv1roomsroomidhierarchy.
RespInviteUser is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidinvite.
RespJoinedMembers is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3roomsroomidjoined_members.
RespJoinedRooms is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3joined_rooms.
RespJoinRoom is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidjoin.
No description provided by the author
No description provided by the author
RespKickUser is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidkick.
RespLeaveRoom is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidleave.
RespLogin is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3login.
RespLoginFlows is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3login.
RespLogout is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3logout.
RespMediaConfig is the JSON response for https://spec.matrix.org/v1.4/client-server-api/#get_matrixmediav3config.
RespMediaUpload is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixmediav3upload.
No description provided by the author
RespMessages is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3roomsroomidmessages.
RespPresence is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3presenceuseridstatus.
No description provided by the author
RespRegister is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3register.
RespRegisterAvailable is the JSON response for https://spec.matrix.org/v1.4/client-server-api/#get_matrixclientv3registeravailable.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RespSendEvent is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3roomsroomidsendeventtypetxnid.
No description provided by the author
RespSync is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3sync.
No description provided by the author
No description provided by the author
No description provided by the author
RespTyping is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3roomsroomidtypinguserid.
RespUnbanUser is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidunban.
No description provided by the author
No description provided by the author
RespUserDisplayName is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3profileuseriddisplayname.
RespUserInteractive is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#user-interactive-authentication-api.
No description provided by the author
RespVersions is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientversions.
RespWhoami is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3accountwhoami.
Room represents a single Matrix room.
RoomFilter is used to define filtering rules for room events.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StateStore is an interface for storing basic room state information.
No description provided by the author
Syncer is an interface that must be satisfied in order to do /sync requests on a client.
SyncStore is an interface which must be satisfied to store client data.
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EventHandler handles a single event from a sync response.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RespPreviewURL is the JSON response for https://spec.matrix.org/v1.2/client-server-api/#get_matrixmediav3preview_url.
No description provided by the author
No description provided by the author
Deprecated: renamed to SyncStore.
No description provided by the author
SyncHandler handles a whole sync response.
No description provided by the author