Versions in this module Expand all Collapse all v0 v0.14.1 Jan 16, 2025 v0.14.0 Dec 18, 2024 Changes in this version + const DoNotSendToOtherServers + func GetEvent(ctx context.Context, rsAPI QueryEventsAPI, roomID, eventID string) *types.HeaderedEvent + func GetStateEvent(ctx context.Context, rsAPI QueryEventsAPI, roomID string, ...) *types.HeaderedEvent + func IsServerBannedFromRoom(ctx context.Context, rsAPI FederationRoomserverAPI, roomID string, ...) bool + func PopulatePublicRooms(ctx context.Context, roomIDs []string, rsAPI QueryBulkStateContentAPI) ([]fclient.PublicRoom, error) + func SendEventWithState(ctx context.Context, rsAPI InputRoomEventsAPI, virtualHost spec.ServerName, ...) error + func SendEvents(ctx context.Context, rsAPI InputRoomEventsAPI, kind Kind, ...) error + func SendInputRoomEvents(ctx context.Context, rsAPI InputRoomEventsAPI, virtualHost spec.ServerName, ...) error + type AliasEvent struct + Alias string + AltAliases []string + func (a AliasEvent) Valid() bool + type AppserviceRoomserverAPI interface + GetAliasesForRoomID func(ctx context.Context, req *GetAliasesForRoomIDRequest, ...) error + QueryEventsByID func(ctx context.Context, req *QueryEventsByIDRequest, res *QueryEventsByIDResponse) error + QueryMembershipsForRoom func(ctx context.Context, req *QueryMembershipsForRoomRequest, ...) error + type ClientRoomserverAPI interface + GetAliasesForRoomID func(ctx context.Context, req *GetAliasesForRoomIDRequest, ...) error + GetRoomIDForAlias func(ctx context.Context, req *GetRoomIDForAliasRequest, ...) error + InsertReportedEvent func(ctx context.Context, roomID, eventID, reportingUserID, reason string, ...) (int64, error) + PerformAdminDeleteEventReport func(ctx context.Context, reportID uint64) error + PerformAdminDownloadState func(ctx context.Context, roomID, userID string, serverName spec.ServerName) error + PerformAdminEvacuateRoom func(ctx context.Context, roomID string) (affected []string, err error) + PerformAdminEvacuateUser func(ctx context.Context, userID string) (affected []string, err error) + PerformAdminPurgeRoom func(ctx context.Context, roomID string) error + PerformCreateRoom func(ctx context.Context, userID spec.UserID, roomID spec.RoomID, ...) (string, *util.JSONResponse) + PerformForget func(ctx context.Context, req *PerformForgetRequest, resp *PerformForgetResponse) error + PerformInvite func(ctx context.Context, req *PerformInviteRequest) error + PerformJoin func(ctx context.Context, req *PerformJoinRequest) (roomID string, joinedVia spec.ServerName, err error) + PerformLeave func(ctx context.Context, req *PerformLeaveRequest, res *PerformLeaveResponse) error + PerformPeek func(ctx context.Context, req *PerformPeekRequest) (roomID string, err error) + PerformPublish func(ctx context.Context, req *PerformPublishRequest) error + PerformRoomUpgrade func(ctx context.Context, roomID string, userID spec.UserID, ...) (newRoomID string, err error) + PerformUnpeek func(ctx context.Context, roomID, userID, deviceID string) error + QueryAdminEventReport func(ctx context.Context, reportID uint64) (QueryAdminEventReportResponse, error) + QueryAdminEventReports func(ctx context.Context, from, limit uint64, backwards bool, userID, roomID string) ([]QueryAdminEventReportsResponse, int64, error) + QueryKnownUsers func(ctx context.Context, req *QueryKnownUsersRequest, res *QueryKnownUsersResponse) error + QueryMembershipForUser func(ctx context.Context, req *QueryMembershipForUserRequest, ...) error + QueryMembershipsForRoom func(ctx context.Context, req *QueryMembershipsForRoomRequest, ...) error + QueryPublishedRooms func(ctx context.Context, req *QueryPublishedRoomsRequest, ...) error + QueryRoomVersionForRoom func(ctx context.Context, roomID string) (gomatrixserverlib.RoomVersion, error) + QueryRoomsForUser func(ctx context.Context, userID spec.UserID, desiredMembership string) ([]spec.RoomID, error) + QueryStateAfterEvents func(ctx context.Context, req *QueryStateAfterEventsRequest, ...) error + RemoveRoomAlias func(ctx context.Context, senderID spec.SenderID, alias string) (aliasFound bool, aliasRemoved bool, err error) + SetRoomAlias func(ctx context.Context, senderID spec.SenderID, roomID spec.RoomID, alias string) (aliasAlreadyExists bool, err error) + SigningIdentityFor func(ctx context.Context, roomID spec.RoomID, senderID spec.UserID) (fclient.SigningIdentity, error) + type DefaultRoomVersionAPI interface + DefaultRoomVersion func() gomatrixserverlib.RoomVersion + type ErrInvalidID struct + Err error + func (e ErrInvalidID) Error() string + type ErrNotAllowed struct + Err error + func (e ErrNotAllowed) Error() string + type ErrRoomUnknownOrNotAllowed struct + Err error + func (e ErrRoomUnknownOrNotAllowed) Error() string + type FederationRoomserverAPI interface + AssignRoomNID func(ctx context.Context, roomID spec.RoomID, ...) (roomNID types.RoomNID, err error) + GetRoomIDForAlias func(ctx context.Context, req *GetRoomIDForAliasRequest, ...) error + HandleInvite func(ctx context.Context, event *types.HeaderedEvent) error + IsKnownRoom func(ctx context.Context, roomID spec.RoomID) (bool, error) + PerformBackfill func(ctx context.Context, req *PerformBackfillRequest, res *PerformBackfillResponse) error + PerformInboundPeek func(ctx context.Context, req *PerformInboundPeekRequest, ...) error + PerformInvite func(ctx context.Context, req *PerformInviteRequest) error + QueryEventsByID func(ctx context.Context, req *QueryEventsByIDRequest, res *QueryEventsByIDResponse) error + QueryMissingEvents func(ctx context.Context, req *QueryMissingEventsRequest, ...) error + QueryPublishedRooms func(ctx context.Context, req *QueryPublishedRoomsRequest, ...) error + QueryRestrictedJoinAllowed func(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (string, error) + QueryRoomsForUser func(ctx context.Context, userID spec.UserID, desiredMembership string) ([]spec.RoomID, error) + QueryServerAllowedToSeeEvent func(ctx context.Context, serverName spec.ServerName, eventID string, roomID string) (allowed bool, err error) + QueryServerBannedFromRoom func(ctx context.Context, req *QueryServerBannedFromRoomRequest, ...) error + QueryStateAndAuthChain func(ctx context.Context, req *QueryStateAndAuthChainRequest, ...) error + SigningIdentityFor func(ctx context.Context, roomID spec.RoomID, senderID spec.UserID) (fclient.SigningIdentity, error) + StateQuerier func() gomatrixserverlib.StateQuerier + type GetAliasesForRoomIDRequest struct + RoomID string + type GetAliasesForRoomIDResponse struct + Aliases []string + type GetRoomIDForAliasRequest struct + Alias string + IncludeAppservices bool + type GetRoomIDForAliasResponse struct + RoomID string + type InputRoomEvent struct + Event *types.HeaderedEvent + HasState bool + Kind Kind + Origin spec.ServerName + SendAsServer string + StateEventIDs []string + TransactionID *TransactionID + type InputRoomEventsAPI interface + InputRoomEvents func(ctx context.Context, req *InputRoomEventsRequest, res *InputRoomEventsResponse) + type InputRoomEventsRequest struct + Asynchronous bool + InputRoomEvents []InputRoomEvent + VirtualHost spec.ServerName + type InputRoomEventsResponse struct + ErrMsg string + NotAllowed bool + func (r *InputRoomEventsResponse) Err() error + type InviteInput struct + EventTime time.Time + Invitee spec.UserID + Inviter spec.UserID + IsDirect bool + KeyID gomatrixserverlib.KeyID + PrivateKey ed25519.PrivateKey + Reason string + RoomID spec.RoomID + type JoinRoomQuerier struct + Roomserver RestrictedJoinAPI + func (rq *JoinRoomQuerier) CurrentStateEvent(ctx context.Context, roomID spec.RoomID, eventType string, stateKey string) (gomatrixserverlib.PDU, error) + func (rq *JoinRoomQuerier) InvitePending(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (bool, error) + func (rq *JoinRoomQuerier) RestrictedRoomJoinInfo(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID, ...) (*gomatrixserverlib.RestrictedRoomJoinInfo, error) + type KeyserverRoomserverAPI interface + QueryLeftUsers func(ctx context.Context, req *QueryLeftUsersRequest, res *QueryLeftUsersResponse) error + type Kind int + const KindNew + const KindOld + const KindOutlier + func (k Kind) String() string + type MembershipQuerier struct + Roomserver FederationRoomserverAPI + func (mq *MembershipQuerier) CurrentMembership(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (string, error) + type OutputEvent struct + NewInboundPeek *OutputNewInboundPeek + NewInviteEvent *OutputNewInviteEvent + NewPeek *OutputNewPeek + NewRoomEvent *OutputNewRoomEvent + OldRoomEvent *OutputOldRoomEvent + PurgeRoom *OutputPurgeRoom + RedactedEvent *OutputRedactedEvent + RetireInviteEvent *OutputRetireInviteEvent + RetirePeek *OutputRetirePeek + Type OutputType + type OutputNewInboundPeek struct + LatestEventID string + PeekID string + RenewalInterval int64 + RoomID string + ServerName spec.ServerName + type OutputNewInviteEvent struct + Event *types.HeaderedEvent + RoomVersion gomatrixserverlib.RoomVersion + type OutputNewPeek struct + DeviceID string + RoomID string + UserID string + type OutputNewRoomEvent struct + AddsStateEventIDs []string + Event *types.HeaderedEvent + HistoryVisibility gomatrixserverlib.HistoryVisibility + LastSentEventID string + LatestEventIDs []string + RemovesStateEventIDs []string + RewritesState bool + SendAsServer string + StateBeforeAddsEventIDs []string + StateBeforeRemovesEventIDs []string + TransactionID *TransactionID + func (o *OutputNewRoomEvent) NeededStateEventIDs() ([]*types.HeaderedEvent, []string) + type OutputOldRoomEvent struct + Event *types.HeaderedEvent + HistoryVisibility gomatrixserverlib.HistoryVisibility + type OutputPurgeRoom struct + RoomID string + type OutputRedactedEvent struct + RedactedBecause *types.HeaderedEvent + RedactedEventID string + type OutputRetireInviteEvent struct + EventID string + Membership string + RetiredByEventID string + RoomID string + TargetSenderID spec.SenderID + type OutputRetirePeek struct + DeviceID string + RoomID string + UserID string + type OutputRoomEventType int + const OutputRoomState + const OutputRoomTimeline + type OutputType string + const OutputTypeNewInboundPeek + const OutputTypeNewInviteEvent + const OutputTypeNewPeek + const OutputTypeNewRoomEvent + const OutputTypeOldRoomEvent + const OutputTypePurgeRoom + const OutputTypeRedactedEvent + const OutputTypeRetireInviteEvent + const OutputTypeRetirePeek + type PerformBackfillRequest struct + BackwardsExtremities map[string][]string + Limit int + RoomID string + ServerName spec.ServerName + VirtualHost spec.ServerName + func (r *PerformBackfillRequest) PrevEventIDs() []string + type PerformBackfillResponse struct + Events []*types.HeaderedEvent + HistoryVisibility gomatrixserverlib.HistoryVisibility + type PerformCreateRoomRequest struct + CreationContent json.RawMessage + EventTime time.Time + InitialState []gomatrixserverlib.FledglingEvent + InvitedUsers []string + IsDirect bool + KeyID gomatrixserverlib.KeyID + PowerLevelContentOverride json.RawMessage + PrivateKey ed25519.PrivateKey + RoomAliasName string + RoomName string + RoomVersion gomatrixserverlib.RoomVersion + StatePreset string + Topic string + UserAvatarURL string + UserDisplayName string + Visibility string + type PerformForgetRequest struct + RoomID string + UserID string + type PerformForgetResponse struct + type PerformInboundPeekRequest struct + PeekID string + RenewalInterval int64 + RoomID string + ServerName spec.ServerName + UserID string + type PerformInboundPeekResponse struct + AuthChainEvents []*types.HeaderedEvent + LatestEvent *types.HeaderedEvent + RoomExists bool + RoomVersion gomatrixserverlib.RoomVersion + StateEvents []*types.HeaderedEvent + type PerformInviteRequest struct + InviteInput InviteInput + InviteRoomState []gomatrixserverlib.InviteStrippedState + SendAsServer string + TransactionID *TransactionID + type PerformJoinRequest struct + Content map[string]interface{} + IsGuest bool + RoomIDOrAlias string + ServerNames []spec.ServerName + Unsigned map[string]interface{} + UserID string + type PerformLeaveRequest struct + Leaver spec.UserID + RoomID string + type PerformLeaveResponse struct + Code int + Message interface{} + type PerformPeekRequest struct + DeviceID string + RoomIDOrAlias string + ServerNames []spec.ServerName + UserID string + type PerformPublishRequest struct + AppserviceID string + NetworkID string + RoomID string + Visibility string + type QueryAdminEventReportResponse struct + EventJSON json.RawMessage + type QueryAdminEventReportsResponse struct + CanonicalAlias string + EventID string + EventNID types.EventNID + ID int64 + Reason string + ReceivedTS spec.Timestamp + ReportingUserNID types.EventStateKeyNID + RoomID string + RoomNID types.RoomNID + RoomName string + Score int64 + Sender string + SenderNID types.EventStateKeyNID + UserID string + type QueryAuthChainRequest struct + EventIDs []string + type QueryAuthChainResponse struct + AuthChain []*types.HeaderedEvent + type QueryBulkStateContentAPI interface + QueryBulkStateContent func(ctx context.Context, req *QueryBulkStateContentRequest, ...) error + type QueryBulkStateContentRequest struct + AllowWildcards bool + RoomIDs []string + StateTuples []gomatrixserverlib.StateKeyTuple + type QueryBulkStateContentResponse struct + Rooms map[string]map[gomatrixserverlib.StateKeyTuple]string + func (r *QueryBulkStateContentResponse) MarshalJSON() ([]byte, error) + func (r *QueryBulkStateContentResponse) UnmarshalJSON(data []byte) error + type QueryCurrentStateRequest struct + AllowWildcards bool + RoomID string + StateTuples []gomatrixserverlib.StateKeyTuple + type QueryCurrentStateResponse struct + StateEvents map[gomatrixserverlib.StateKeyTuple]*types.HeaderedEvent + func (r *QueryCurrentStateResponse) MarshalJSON() ([]byte, error) + func (r *QueryCurrentStateResponse) UnmarshalJSON(data []byte) error + type QueryEventsAPI interface + QueryCurrentState func(ctx context.Context, req *QueryCurrentStateRequest, ...) error + QueryEventsByID func(ctx context.Context, req *QueryEventsByIDRequest, res *QueryEventsByIDResponse) error + type QueryEventsByIDRequest struct + EventIDs []string + RoomID string + type QueryEventsByIDResponse struct + Events []*types.HeaderedEvent + type QueryKnownUsersRequest struct + Limit int + SearchString string + UserID string + type QueryKnownUsersResponse struct + Users []authtypes.FullyQualifiedProfile + type QueryLatestEventsAndStateAPI interface + QueryLatestEventsAndState func(ctx context.Context, req *QueryLatestEventsAndStateRequest, ...) error + type QueryLatestEventsAndStateRequest struct + RoomID string + StateToFetch []gomatrixserverlib.StateKeyTuple + type QueryLatestEventsAndStateResponse struct + Depth int64 + LatestEvents []string + RoomExists bool + RoomVersion gomatrixserverlib.RoomVersion + StateEvents []*types.HeaderedEvent + type QueryLeftUsersRequest struct + StaleDeviceListUsers []string + type QueryLeftUsersResponse struct + LeftUsers []string + type QueryMembershipAPI interface + QueryMembershipAtEvent func(ctx context.Context, roomID spec.RoomID, eventIDs []string, ...) (map[string]*types.HeaderedEvent, error) + QueryMembershipForSenderID func(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID, ...) error + QueryMembershipForUser func(ctx context.Context, req *QueryMembershipForUserRequest, ...) error + QueryMembershipsForRoom func(ctx context.Context, req *QueryMembershipsForRoomRequest, ...) error + QueryRoomVersionForRoom func(ctx context.Context, roomID string) (gomatrixserverlib.RoomVersion, error) + type QueryMembershipForUserRequest struct + RoomID string + UserID spec.UserID + type QueryMembershipForUserResponse struct + EventID string + HasBeenInRoom bool + IsInRoom bool + IsRoomForgotten bool + Membership string + RoomExists bool + SenderID *spec.SenderID + type QueryMembershipsForRoomRequest struct + JoinedOnly bool + LocalOnly bool + RoomID string + SenderID spec.SenderID + type QueryMembershipsForRoomResponse struct + HasBeenInRoom bool + IsRoomForgotten bool + JoinEvents []synctypes.ClientEvent + type QueryMissingEventsRequest struct + EarliestEvents []string + LatestEvents []string + Limit int + ServerName spec.ServerName + type QueryMissingEventsResponse struct + Events []*types.HeaderedEvent + type QueryPublishedRoomsRequest struct + IncludeAllNetworks bool + NetworkID string + RoomID string + type QueryPublishedRoomsResponse struct + RoomIDs []string + type QueryRoomHierarchyAPI interface + QueryNextRoomHierarchyPage func(ctx context.Context, walker RoomHierarchyWalker, limit int) (hierarchyRooms []fclient.RoomHierarchyRoom, inaccessibleRooms []string, ...) + type QueryRoomHierarchyRequest struct + From int + Limit int + MaxDepth int + SuggestedOnly bool + type QueryRoomVersionForRoomRequest struct + RoomID string + type QueryRoomVersionForRoomResponse struct + RoomVersion gomatrixserverlib.RoomVersion + type QuerySenderIDAPI interface + QuerySenderIDForUser func(ctx context.Context, roomID spec.RoomID, userID spec.UserID) (*spec.SenderID, error) + QueryUserIDForSender func(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (*spec.UserID, error) + type QueryServerAllowedToSeeEventRequest struct + EventID string + ServerName spec.ServerName + type QueryServerAllowedToSeeEventResponse struct + AllowedToSeeEvent bool + type QueryServerBannedFromRoomRequest struct + RoomID string + ServerName spec.ServerName + type QueryServerBannedFromRoomResponse struct + Banned bool + type QueryServerJoinedToRoomRequest struct + RoomID string + ServerName spec.ServerName + type QueryServerJoinedToRoomResponse struct + IsInRoom bool + RoomExists bool + RoomVersion gomatrixserverlib.RoomVersion + type QuerySharedUsersRequest struct + ExcludeRoomIDs []string + IncludeRoomIDs []string + LocalOnly bool + OtherUserIDs []string + UserID string + type QuerySharedUsersResponse struct + UserIDsToCount map[string]int + type QueryStateAfterEventsRequest struct + PrevEventIDs []string + RoomID string + StateToFetch []gomatrixserverlib.StateKeyTuple + type QueryStateAfterEventsResponse struct + PrevEventsExist bool + RoomExists bool + RoomVersion gomatrixserverlib.RoomVersion + StateEvents []*types.HeaderedEvent + type QueryStateAndAuthChainRequest struct + AuthEventIDs []string + OnlyFetchAuthChain bool + PrevEventIDs []string + ResolveState bool + RoomID string + type QueryStateAndAuthChainResponse struct + AuthChainEvents []*types.HeaderedEvent + IsRejected bool + PrevEventsExist bool + RoomExists bool + RoomVersion gomatrixserverlib.RoomVersion + StateEvents []*types.HeaderedEvent + StateKnown bool + type RestrictedJoinAPI interface + CurrentStateEvent func(ctx context.Context, roomID spec.RoomID, eventType string, stateKey string) (gomatrixserverlib.PDU, error) + InvitePending func(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (bool, error) + LocallyJoinedUsers func(ctx context.Context, roomVersion gomatrixserverlib.RoomVersion, ...) ([]gomatrixserverlib.PDU, error) + QueryRoomInfo func(ctx context.Context, roomID spec.RoomID) (*types.RoomInfo, error) + QueryServerJoinedToRoom func(ctx context.Context, req *QueryServerJoinedToRoomRequest, ...) error + RestrictedRoomJoinInfo func(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID, ...) (*gomatrixserverlib.RestrictedRoomJoinInfo, error) + UserJoinedToRoom func(ctx context.Context, roomID types.RoomNID, senderID spec.SenderID) (bool, error) + type RoomHierarchyWalker struct + Caller types.DeviceOrServerName + MaxDepth int + Processed RoomSet + RootRoomID spec.RoomID + SuggestedOnly bool + Unvisited []RoomHierarchyWalkerQueuedRoom + func NewRoomHierarchyWalker(caller types.DeviceOrServerName, roomID spec.RoomID, suggestedOnly bool, ...) RoomHierarchyWalker + type RoomHierarchyWalkerQueuedRoom struct + Depth int + ParentRoomID *spec.RoomID + RoomID spec.RoomID + Vias []string + type RoomSet map[spec.RoomID]struct + func NewRoomSet() RoomSet + func (s RoomSet) Add(val spec.RoomID) + func (s RoomSet) Contains(val spec.RoomID) bool + func (s RoomSet) Copy() RoomSet + type RoomserverInternalAPI interface + QueryAuthChain func(ctx context.Context, req *QueryAuthChainRequest, res *QueryAuthChainResponse) error + RoomsWithACLs func(ctx context.Context) ([]string, error) + SetAppserviceAPI func(asAPI asAPI.AppServiceInternalAPI) + SetFederationAPI func(fsAPI fsAPI.RoomserverFederationAPI, keyRing *gomatrixserverlib.KeyRing) + SetUserAPI func(userAPI userapi.RoomserverUserAPI) + type SyncRoomserverAPI interface + PerformBackfill func(ctx context.Context, req *PerformBackfillRequest, res *PerformBackfillResponse) error + QueryEventsByID func(ctx context.Context, req *QueryEventsByIDRequest, res *QueryEventsByIDResponse) error + QuerySharedUsers func(ctx context.Context, req *QuerySharedUsersRequest, ...) error + QueryStateAfterEvents func(ctx context.Context, req *QueryStateAfterEventsRequest, ...) error + type TransactionID struct + SessionID int64 + TransactionID string + type UserRoomPrivateKeyCreator interface + GetOrCreateUserRoomPrivateKey func(ctx context.Context, userID spec.UserID, roomID spec.RoomID) (ed25519.PrivateKey, error) + StoreUserRoomPublicKey func(ctx context.Context, senderID spec.SenderID, userID spec.UserID, ...) error + type UserRoomserverAPI interface + JoinedUserCount func(ctx context.Context, roomID string) (int, error) + PerformAdminEvacuateUser func(ctx context.Context, userID string) (affected []string, err error) + PerformJoin func(ctx context.Context, req *PerformJoinRequest) (roomID string, joinedVia spec.ServerName, err error) + QueryCurrentState func(ctx context.Context, req *QueryCurrentStateRequest, ...) error + QueryMembershipsForRoom func(ctx context.Context, req *QueryMembershipsForRoomRequest, ...) error