Documentation ¶
Index ¶
- Constants
- type Server
- func (s *Server) Authorize(serverName, method, uri string, body any) ([]string, error)
- func (s *Server) GetClientDirectory(ctx context.Context, alias string) (statusCode int, respb []byte)
- func (s *Server) GetClientMediaThumbnail(ctx context.Context, serverName, mediaID string, params url.Values) (content io.Reader, contentType string)
- func (s *Server) GetClientRoomSummary(ctx context.Context, aliasOrID string) (statusCode int, resp []byte)
- func (s *Server) GetClientRoomVisibility(ctx context.Context, id string) (statusCode int, resp []byte)
- func (s *Server) GetClientVersion() []byte
- func (s *Server) GetClientWellKnown() []byte
- func (s *Server) GetKeyServer(ctx context.Context) []byte
- func (s *Server) GetServerVersion() []byte
- func (s *Server) GetServerWellKnown() []byte
- func (s *Server) GetSupportWellKnown() []byte
- func (s *Server) PublicRooms(ctx context.Context, req *http.Request, rdReq *model.RoomDirectoryRequest) (statusCode int, resp []byte)
- func (s *Server) QueryCSURL(ctx context.Context, serverName string) string
- func (s *Server) QueryDirectory(ctx context.Context, req *http.Request, alias string) (statusCode int, respb []byte)
- func (s *Server) QueryPublicRooms(ctx context.Context, serverName, limit, since string) (*model.RoomDirectoryResponse, error)
- func (s *Server) QueryServerName(ctx context.Context, serverName string) (string, error)
- func (s *Server) QueryVersion(ctx context.Context, serverName string) (server, serverVersion string, err error)
- func (s *Server) SetDiscover(discover func(context.Context, string) int)
- func (s *Server) ValidateAuth(ctx context.Context, r *http.Request) (serverName string, err error)
Constants ¶
const (
MatrixSearchLimit = 100 // default matrix (!) search limit
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server server
func (*Server) GetClientDirectory ¶
func (s *Server) GetClientDirectory(ctx context.Context, alias string) (statusCode int, respb []byte)
GetClientDirectory is /_matrix/client/v3/directory/room/{roomAlias}
func (*Server) GetClientMediaThumbnail ¶
func (s *Server) GetClientMediaThumbnail(ctx context.Context, serverName, mediaID string, params url.Values) (content io.Reader, contentType string)
GetClientMediaThumbnail is /_matrix/media/v3/thumbnail/{serverName}/{mediaID}
func (*Server) GetClientRoomSummary ¶
func (s *Server) GetClientRoomSummary(ctx context.Context, aliasOrID string) (statusCode int, resp []byte)
GetClientRoomSummary is /_matrix/client/unstable/is.nheko.summary/summary/{roomIdOrAlias}
func (*Server) GetClientRoomVisibility ¶
func (s *Server) GetClientRoomVisibility(ctx context.Context, id string) (statusCode int, resp []byte)
GetClientRoomVisibility is /_matrix/client/v3/directory/list/room/{roomID}
func (*Server) GetClientVersion ¶
GetClientVersion returns json-eligible response for /_matrix/client/versions
func (*Server) GetClientWellKnown ¶
GetClientWellKnown returns json-eligible response for /.well-known/matrix/client
func (*Server) GetKeyServer ¶
GetKeyServer returns jsonblob-eligible response for /_matrix/key/v2/server
func (*Server) GetServerVersion ¶
GetServerVersion returns json-eligible response for /_matrix/federation/v1/version
func (*Server) GetServerWellKnown ¶
GetServerWellKnown returns json-eligible response for /.well-known/matrix/server
func (*Server) GetSupportWellKnown ¶
GetSupportWellKnown returns json-eligible response for /.well-known/matrix/support
func (*Server) PublicRooms ¶
func (s *Server) PublicRooms(ctx context.Context, req *http.Request, rdReq *model.RoomDirectoryRequest) (statusCode int, resp []byte)
PublicRooms returns /_matrix/federation/v1/publicRooms response
func (*Server) QueryCSURL ¶
QueryCSURL returns URL of Matrix CS API server
func (*Server) QueryDirectory ¶
func (s *Server) QueryDirectory(ctx context.Context, req *http.Request, alias string) (statusCode int, respb []byte)
QueryDirectory is /_matrix/federation/v1/query/directory?room_alias={roomAlias}
func (*Server) QueryPublicRooms ¶
func (s *Server) QueryPublicRooms(ctx context.Context, serverName, limit, since string) (*model.RoomDirectoryResponse, error)
QueryPublicRooms over federation
func (*Server) QueryServerName ¶
QueryServerName finds server name on the /_matrix/key/v2/server page
func (*Server) QueryVersion ¶
func (s *Server) QueryVersion(ctx context.Context, serverName string) (server, serverVersion string, err error)
QueryVersion from /_matrix/federation/v1/version
func (*Server) SetDiscover ¶
SetDiscover func