Versions in this module Expand all Collapse all v1 v1.0.1 Sep 9, 2024 v1.0.0 Sep 9, 2024 Changes in this version + const WellKnownMaxSize + func ParseAuthorization(header string) (scheme string, origin, destination spec.ServerName, ...) + type Client struct + func NewClient(options ...ClientOption) *Client + func (fc *Client) CreateMediaDownloadRequest(ctx context.Context, matrixServer spec.ServerName, mediaID string) (*http.Response, error) + func (fc *Client) DoHTTPRequest(ctx context.Context, req *http.Request) (*http.Response, error) + func (fc *Client) DoRequestAndParseResponse(ctx context.Context, req *http.Request, result interface{}) error + func (fc *Client) GetServerKeys(ctx context.Context, matrixServer spec.ServerName) (gomatrixserverlib.ServerKeys, error) + func (fc *Client) GetVersion(ctx context.Context, s spec.ServerName) (res Version, err error) + func (fc *Client) LookupServerKeys(ctx context.Context, matrixServer spec.ServerName, ...) ([]gomatrixserverlib.ServerKeys, error) + func (fc *Client) LookupUserInfo(ctx context.Context, matrixServer spec.ServerName, token string) (u UserInfo, err error) + func (fc *Client) SetUserAgent(ua string) + type ClientOption func(*clientOptions) + func WithDNSCache(cache *DNSCache) ClientOption + func WithKeepAlives(keepAlives bool) ClientOption + func WithSkipVerify(skipVerify bool) ClientOption + func WithTimeout(duration time.Duration) ClientOption + func WithTransport(transport http.RoundTripper) ClientOption + func WithUserAgent(userAgent string) ClientOption + func WithWellKnownSRVLookups(wellKnownSRV bool) ClientOption + type CrossSigningBody interface + type CrossSigningForKeyOrDevice struct + func (c *CrossSigningForKeyOrDevice) UnmarshalJSON(b []byte) error + func (c CrossSigningForKeyOrDevice) MarshalJSON() ([]byte, error) + type CrossSigningKey struct + Keys map[gomatrixserverlib.KeyID]spec.Base64Bytes + Signatures map[string]map[gomatrixserverlib.KeyID]spec.Base64Bytes + Usage []CrossSigningKeyPurpose + UserID string + type CrossSigningKeyPurpose string + const CrossSigningKeyPurposeMaster + const CrossSigningKeyPurposeSelfSigning + const CrossSigningKeyPurposeUserSigning + type CrossSigningKeys struct + MasterKey CrossSigningKey + SelfSigningKey CrossSigningKey + UserSigningKey CrossSigningKey + type DNSCache struct + func NewDNSCache(size int, duration time.Duration) *DNSCache + func (c *DNSCache) DialContext(ctx context.Context, network, address string) (net.Conn, error) + type DeviceKeys struct + Unsigned map[string]interface{} + func (s *DeviceKeys) Scan(src interface{}) error + func (s DeviceKeys) Value() (driver.Value, error) + type EmptyResp struct + type FederationClient interface + Backfill func(ctx context.Context, origin, s spec.ServerName, roomID string, limit int, ...) (res gomatrixserverlib.Transaction, err error) + ClaimKeys func(ctx context.Context, origin, s spec.ServerName, ...) (RespClaimKeys, error) + DoRequestAndParseResponse func(ctx context.Context, req *http.Request, result interface{}) error + ExchangeThirdPartyInvite func(ctx context.Context, origin, s spec.ServerName, ...) (err error) + GetEvent func(ctx context.Context, origin, s spec.ServerName, eventID string) (res gomatrixserverlib.Transaction, err error) + GetEventAuth func(ctx context.Context, origin, s spec.ServerName, ...) (res RespEventAuth, err error) + GetPublicRooms func(ctx context.Context, origin, s spec.ServerName, limit int, since string, ...) (res RespPublicRooms, err error) + GetPublicRoomsFiltered func(ctx context.Context, origin, s spec.ServerName, limit int, ...) (res RespPublicRooms, err error) + GetUserDevices func(ctx context.Context, origin, s spec.ServerName, userID string) (RespUserDevices, error) + LookupMissingEvents func(ctx context.Context, origin, s spec.ServerName, roomID string, ...) (res RespMissingEvents, err error) + LookupProfile func(ctx context.Context, origin, s spec.ServerName, userID string, field string) (res RespProfile, err error) + LookupRoomAlias func(ctx context.Context, origin, s spec.ServerName, roomAlias string) (res RespDirectory, err error) + LookupState func(ctx context.Context, origin, s spec.ServerName, roomID string, eventID string, ...) (res RespState, err error) + LookupStateIDs func(ctx context.Context, origin, s spec.ServerName, roomID string, eventID string) (res RespStateIDs, err error) + MSC2836EventRelationships func(ctx context.Context, origin, dst spec.ServerName, ...) (res MSC2836EventRelationshipsResponse, err error) + MakeJoin func(ctx context.Context, origin, s spec.ServerName, roomID, userID string) (res RespMakeJoin, err error) + MakeKnock func(ctx context.Context, origin, s spec.ServerName, roomID, userID string, ...) (res RespMakeKnock, err error) + MakeLeave func(ctx context.Context, origin, s spec.ServerName, roomID, userID string) (res RespMakeLeave, err error) + P2PGetTransactionFromRelay func(ctx context.Context, u spec.UserID, prev RelayEntry, ...) (res RespGetRelayTransaction, err error) + P2PSendTransactionToRelay func(ctx context.Context, u spec.UserID, t gomatrixserverlib.Transaction, ...) (res EmptyResp, err error) + Peek func(ctx context.Context, origin, s spec.ServerName, roomID, peekID string, ...) (res RespPeek, err error) + QueryKeys func(ctx context.Context, origin, s spec.ServerName, keys map[string][]string) (RespQueryKeys, error) + RoomHierarchy func(ctx context.Context, origin, dst spec.ServerName, roomID string, ...) (res RoomHierarchyResponse, err error) + SendInviteV2 func(ctx context.Context, origin, s spec.ServerName, request InviteV2Request) (res RespInviteV2, err error) + SendInviteV3 func(ctx context.Context, origin, s spec.ServerName, request InviteV3Request, ...) (res RespInviteV2, err error) + SendJoin func(ctx context.Context, origin, s spec.ServerName, event gomatrixserverlib.PDU) (res RespSendJoin, err error) + SendJoinPartialState func(ctx context.Context, origin, s spec.ServerName, event gomatrixserverlib.PDU) (res RespSendJoin, err error) + SendKnock func(ctx context.Context, origin, s spec.ServerName, event gomatrixserverlib.PDU) (res RespSendKnock, err error) + SendLeave func(ctx context.Context, origin, s spec.ServerName, event gomatrixserverlib.PDU) (err error) + SendTransaction func(ctx context.Context, t gomatrixserverlib.Transaction) (res RespSend, err error) + func NewFederationClient(identities []*SigningIdentity, options ...ClientOption) FederationClient + type FederationRequest struct + func NewFederationRequest(method string, origin, destination spec.ServerName, requestURI string) FederationRequest + func VerifyHTTPRequest(req *http.Request, now time.Time, destination spec.ServerName, ...) (*FederationRequest, util.JSONResponse) + func (r *FederationRequest) Content() []byte + func (r *FederationRequest) Destination() spec.ServerName + func (r *FederationRequest) HTTPRequest() (*http.Request, error) + func (r *FederationRequest) Method() string + func (r *FederationRequest) Origin() spec.ServerName + func (r *FederationRequest) RequestURI() string + func (r *FederationRequest) SetContent(content interface{}) error + func (r *FederationRequest) Sign(serverName spec.ServerName, keyID gomatrixserverlib.KeyID, ...) error + type InviteV2Request struct + func NewInviteV2Request(event gomatrixserverlib.PDU, state []gomatrixserverlib.InviteStrippedState) (request InviteV2Request, err error) + func (i *InviteV2Request) Event() gomatrixserverlib.PDU + func (i *InviteV2Request) InviteRoomState() []gomatrixserverlib.InviteStrippedState + func (i *InviteV2Request) RoomVersion() gomatrixserverlib.RoomVersion + func (i *InviteV2Request) UnmarshalJSON(data []byte) error + func (i InviteV2Request) MarshalJSON() ([]byte, error) + type InviteV3Request struct + func NewInviteV3Request(event gomatrixserverlib.ProtoEvent, version gomatrixserverlib.RoomVersion, ...) (request InviteV3Request, err error) + func (i *InviteV3Request) Event() gomatrixserverlib.ProtoEvent + func (i *InviteV3Request) InviteRoomState() []gomatrixserverlib.InviteStrippedState + func (i *InviteV3Request) RoomVersion() gomatrixserverlib.RoomVersion + func (i *InviteV3Request) UnmarshalJSON(data []byte) error + func (i InviteV3Request) MarshalJSON() ([]byte, error) + type MSC2836EventRelationshipsRequest struct + AutoJoin bool + Batch string + DepthFirst bool + Direction string + EventID string + IncludeChildren bool + IncludeParent bool + Limit int + MaxBreadth int + MaxDepth int + RecentFirst bool + func NewMSC2836EventRelationshipsRequest(body io.Reader) (*MSC2836EventRelationshipsRequest, error) + func (r *MSC2836EventRelationshipsRequest) Defaults() + type MSC2836EventRelationshipsResponse struct + AuthChain gomatrixserverlib.EventJSONs + Events gomatrixserverlib.EventJSONs + Limited bool + NextBatch string + type MissingEvents struct + EarliestEvents []string + LatestEvents []string + Limit int + MinDepth int + type PDUResult struct + Error string + type PublicRoom struct + Aliases []string + AvatarURL string + CanonicalAlias string + GuestCanJoin bool + JoinedMembersCount int + Name string + RoomID string + Topic string + WorldReadable bool + type RelayEntry struct + EntryID int64 + type RelayEvents struct + EDUs []gomatrixserverlib.EDU + PDUs []json.RawMessage + type ResolutionResult struct + Destination string + Host spec.ServerName + TLSServerName string + func ResolveServer(ctx context.Context, serverName spec.ServerName) (results []ResolutionResult, err error) + type RespClaimKeys struct + OneTimeKeys map[string]map[string]map[string]json.RawMessage + type RespDirectory struct + RoomID string + Servers []spec.ServerName + type RespEventAuth struct + AuthEvents gomatrixserverlib.EventJSONs + type RespGetRelayTransaction struct + EntriesQueued bool + EntryID int64 + Transaction gomatrixserverlib.Transaction + type RespInvite struct + Event spec.RawJSON + func (r *RespInvite) UnmarshalJSON(data []byte) error + func (r RespInvite) MarshalJSON() ([]byte, error) + type RespInviteV2 struct + Event spec.RawJSON + type RespMakeJoin struct + JoinEvent gomatrixserverlib.ProtoEvent + RoomVersion gomatrixserverlib.RoomVersion + func (r *RespMakeJoin) GetJoinEvent() gomatrixserverlib.ProtoEvent + func (r *RespMakeJoin) GetRoomVersion() gomatrixserverlib.RoomVersion + type RespMakeKnock struct + KnockEvent gomatrixserverlib.ProtoEvent + RoomVersion gomatrixserverlib.RoomVersion + type RespMakeLeave struct + LeaveEvent gomatrixserverlib.ProtoEvent + RoomVersion gomatrixserverlib.RoomVersion + type RespMissingEvents struct + Events gomatrixserverlib.EventJSONs + type RespPeek struct + AuthEvents gomatrixserverlib.EventJSONs + LatestEvent gomatrixserverlib.PDU + RenewalInterval int64 + RoomVersion gomatrixserverlib.RoomVersion + StateEvents gomatrixserverlib.EventJSONs + func (r *RespPeek) GetAuthEvents() gomatrixserverlib.EventJSONs + func (r *RespPeek) GetStateEvents() gomatrixserverlib.EventJSONs + func (r RespPeek) MarshalJSON() ([]byte, error) + type RespProfile struct + AvatarURL string + DisplayName string + type RespPublicRooms struct + Chunk []PublicRoom + NextBatch string + PrevBatch string + TotalRoomCountEstimate int + type RespQueryKeys struct + DeviceKeys map[string]map[string]DeviceKeys + MasterKeys map[string]CrossSigningKey + SelfSigningKeys map[string]CrossSigningKey + type RespSend struct + PDUs map[string]PDUResult + type RespSendJoin struct + AuthEvents gomatrixserverlib.EventJSONs + Event spec.RawJSON + MembersOmitted bool + Origin spec.ServerName + ServersInRoom []string + StateEvents gomatrixserverlib.EventJSONs + func (r *RespSendJoin) GetAuthEvents() gomatrixserverlib.EventJSONs + func (r *RespSendJoin) GetJoinEvent() spec.RawJSON + func (r *RespSendJoin) GetMembersOmitted() bool + func (r *RespSendJoin) GetOrigin() spec.ServerName + func (r *RespSendJoin) GetServersInRoom() []string + func (r *RespSendJoin) GetStateEvents() gomatrixserverlib.EventJSONs + func (r RespSendJoin) MarshalJSON() ([]byte, error) + type RespSendKnock struct + KnockRoomState []gomatrixserverlib.InviteStrippedState + type RespState struct + AuthEvents gomatrixserverlib.EventJSONs + StateEvents gomatrixserverlib.EventJSONs + func (r *RespState) GetAuthEvents() gomatrixserverlib.EventJSONs + func (r *RespState) GetStateEvents() gomatrixserverlib.EventJSONs + func (r RespState) MarshalJSON() ([]byte, error) + type RespStateIDs struct + AuthEventIDs []string + StateEventIDs []string + func (r RespStateIDs) GetAuthEventIDs() []string + func (r RespStateIDs) GetStateEventIDs() []string + type RespUserDevice struct + DeviceID string + DisplayName string + Keys RespUserDeviceKeys + type RespUserDeviceKeys struct + Algorithms []string + DeviceID string + Keys map[gomatrixserverlib.KeyID]spec.Base64Bytes + Signatures map[string]map[gomatrixserverlib.KeyID]spec.Base64Bytes + UserID string + type RespUserDevices struct + Devices []RespUserDevice + MasterKey *CrossSigningKey + SelfSigningKey *CrossSigningKey + StreamID int64 + UserID string + func (r *RespUserDevices) UnmarshalJSON(data []byte) error + type RoomHierarchyResponse struct + Children []RoomHierarchyRoom + InaccessibleChildren []string + Room RoomHierarchyRoom + type RoomHierarchyRoom struct + AllowedRoomIDs []string + ChildrenState []RoomHierarchyStrippedEvent + RoomType string + type RoomHierarchyStrippedEvent struct + Content json.RawMessage + OriginServerTS spec.Timestamp + Sender string + StateKey string + Type string + type SigningIdentity struct + KeyID gomatrixserverlib.KeyID + PrivateKey ed25519.PrivateKey + ServerName spec.ServerName + type UserInfo struct + Sub string + type Version struct + Server struct{ ... } + type WellKnownResult struct + CacheExpiresAt int64 + NewAddress spec.ServerName + func LookupWellKnown(ctx context.Context, serverNameType spec.ServerName) (*WellKnownResult, error)