Documentation
¶
Overview ¶
Package matrix allows interfacing with a matrix server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTP ¶ added in v0.0.3
func HTTP( ctx context.Context, homeserver, token, method, path string, request, response interface{}, ) error
HTTP performs a http exchangewith a matrix server. It takes the homeserver url, the client token, the http method, the path including the query and pointers to request and response payload as arguments. Request payload may be nil. Token may be empty to send an unauthenticated request.
Types ¶
type Client ¶ added in v0.0.3
type Client struct {
// contains filtered or unexported fields
}
Client to interface with a matrix server.
func New ¶
New creates a new matrix client. It takes the homeserver url to contact and the client token to use as an argument. It does a whoami request to get user ID and device ID of the token. Returns an error if that fails.
func (Client) HTTP ¶ added in v0.0.3
HTTP performs a http exchange with the matrix server. It takes the http method, the path including the query and pointers to request and response payload as arguments. Request payload may be nil.
Directories
¶
Path | Synopsis |
---|---|
Package event defines the basic event type for interacting with matrix servers.
|
Package event defines the basic event type for interacting with matrix servers. |
Package filter allows creating sync filters.
|
Package filter allows creating sync filters. |
Package login allows logging in with a matrix server.
|
Package login allows logging in with a matrix server. |
Package room handles matrix rooms.
|
Package room handles matrix rooms. |