Documentation ¶
Index ¶
- func GetAuthChain(ctx context.Context, fn eventsFromIDs, roomInfo *types.RoomInfo, ...) ([]gomatrixserverlib.PDU, error)
- type Queryer
- func (r *Queryer) CurrentStateEvent(ctx context.Context, roomID spec.RoomID, eventType string, stateKey string) (gomatrixserverlib.PDU, error)
- func (r *Queryer) InvitePending(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (bool, error)
- func (r *Queryer) JoinedUserCount(ctx context.Context, roomID string) (int, error)
- func (r *Queryer) LocallyJoinedUsers(ctx context.Context, roomVersion gomatrixserverlib.RoomVersion, ...) ([]gomatrixserverlib.PDU, error)
- func (r *Queryer) QueryAdminEventReport(ctx context.Context, reportID uint64) (api.QueryAdminEventReportResponse, error)
- func (r *Queryer) QueryAdminEventReports(ctx context.Context, from uint64, limit uint64, backwards bool, ...) ([]api.QueryAdminEventReportsResponse, int64, error)
- func (r *Queryer) QueryAuthChain(ctx context.Context, req *api.QueryAuthChainRequest, ...) error
- func (r *Queryer) QueryBulkStateContent(ctx context.Context, req *api.QueryBulkStateContentRequest, ...) error
- func (r *Queryer) QueryCurrentState(ctx context.Context, req *api.QueryCurrentStateRequest, ...) error
- func (r *Queryer) QueryEventsByID(ctx context.Context, request *api.QueryEventsByIDRequest, ...) error
- func (r *Queryer) QueryKnownUsers(ctx context.Context, req *api.QueryKnownUsersRequest, ...) error
- func (r *Queryer) QueryLatestEventsAndState(ctx context.Context, request *api.QueryLatestEventsAndStateRequest, ...) error
- func (r *Queryer) QueryLeftUsers(ctx context.Context, req *api.QueryLeftUsersRequest, ...) error
- func (r *Queryer) QueryMembershipAtEvent(ctx context.Context, roomID spec.RoomID, eventIDs []string, ...) (map[string]*types.HeaderedEvent, error)
- func (r *Queryer) QueryMembershipForSenderID(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID, ...) error
- func (r *Queryer) QueryMembershipForUser(ctx context.Context, request *api.QueryMembershipForUserRequest, ...) error
- func (r *Queryer) QueryMembershipsForRoom(ctx context.Context, request *api.QueryMembershipsForRoomRequest, ...) error
- func (r *Queryer) QueryMissingEvents(ctx context.Context, request *api.QueryMissingEventsRequest, ...) error
- func (querier *Queryer) QueryNextRoomHierarchyPage(ctx context.Context, walker roomserver.RoomHierarchyWalker, limit int) ([]fclient.RoomHierarchyRoom, []string, *roomserver.RoomHierarchyWalker, error)
- func (r *Queryer) QueryPublishedRooms(ctx context.Context, req *api.QueryPublishedRoomsRequest, ...) error
- func (r *Queryer) QueryRestrictedJoinAllowed(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (string, error)
- func (r *Queryer) QueryRoomInfo(ctx context.Context, roomID spec.RoomID) (*types.RoomInfo, error)
- func (r *Queryer) QueryRoomVersionForRoom(ctx context.Context, roomID string) (gomatrixserverlib.RoomVersion, error)
- func (r *Queryer) QueryRoomsForUser(ctx context.Context, userID spec.UserID, desiredMembership string) ([]spec.RoomID, error)
- func (r *Queryer) QuerySenderIDForUser(ctx context.Context, roomID spec.RoomID, userID spec.UserID) (*spec.SenderID, error)
- func (r *Queryer) QueryServerAllowedToSeeEvent(ctx context.Context, serverName spec.ServerName, eventID string, roomID string) (allowed bool, err error)
- func (r *Queryer) QueryServerBannedFromRoom(ctx context.Context, req *api.QueryServerBannedFromRoomRequest, ...) error
- func (r *Queryer) QueryServerJoinedToRoom(ctx context.Context, request *api.QueryServerJoinedToRoomRequest, ...) error
- func (r *Queryer) QuerySharedUsers(ctx context.Context, req *api.QuerySharedUsersRequest, ...) error
- func (r *Queryer) QueryStateAfterEvents(ctx context.Context, request *api.QueryStateAfterEventsRequest, ...) error
- func (r *Queryer) QueryStateAndAuthChain(ctx context.Context, request *api.QueryStateAndAuthChainRequest, ...) error
- func (r *Queryer) QueryUserIDForSender(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (*spec.UserID, error)
- func (r *Queryer) RestrictedRoomJoinInfo(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID, ...) (*gomatrixserverlib.RestrictedRoomJoinInfo, error)
- func (r *Queryer) RoomsWithACLs(ctx context.Context) ([]string, error)
- func (r *Queryer) UserJoinedToRoom(ctx context.Context, roomNID types.RoomNID, senderID spec.SenderID) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthChain ¶ added in v0.3.7
func GetAuthChain( ctx context.Context, fn eventsFromIDs, roomInfo *types.RoomInfo, authEventIDs []string, ) ([]gomatrixserverlib.PDU, error)
GetAuthChain fetches the auth chain for the given auth events. An auth chain is the list of all events that are referenced in the auth_events section, and all their auth_events, recursively. The returned set of events contain the given events. Will *not* error if we don't have all auth events.
Types ¶
type Queryer ¶
type Queryer struct { DB storage.Database Cache caching.RoomServerCaches IsLocalServerName func(spec.ServerName) bool ServerACLs *acls.ServerACLs Cfg *config.Dendrite FSAPI fsAPI.RoomserverFederationAPI }
func (*Queryer) CurrentStateEvent ¶ added in v0.13.0
func (*Queryer) InvitePending ¶ added in v0.13.0
func (*Queryer) JoinedUserCount ¶ added in v0.13.2
func (*Queryer) LocallyJoinedUsers ¶ added in v0.13.0
func (r *Queryer) LocallyJoinedUsers(ctx context.Context, roomVersion gomatrixserverlib.RoomVersion, roomNID types.RoomNID) ([]gomatrixserverlib.PDU, error)
func (*Queryer) QueryAdminEventReport ¶ added in v0.13.7
func (r *Queryer) QueryAdminEventReport(ctx context.Context, reportID uint64) (api.QueryAdminEventReportResponse, error)
QueryAdminEventReport returns a single event report.
func (*Queryer) QueryAdminEventReports ¶ added in v0.13.7
func (r *Queryer) QueryAdminEventReports(ctx context.Context, from uint64, limit uint64, backwards bool, userID, roomID string) ([]api.QueryAdminEventReportsResponse, int64, error)
QueryAdminEventReports returns event reports given a filter.
func (*Queryer) QueryAuthChain ¶ added in v0.3.3
func (r *Queryer) QueryAuthChain(ctx context.Context, req *api.QueryAuthChainRequest, res *api.QueryAuthChainResponse) error
func (*Queryer) QueryBulkStateContent ¶
func (r *Queryer) QueryBulkStateContent(ctx context.Context, req *api.QueryBulkStateContentRequest, res *api.QueryBulkStateContentResponse) error
func (*Queryer) QueryCurrentState ¶
func (r *Queryer) QueryCurrentState(ctx context.Context, req *api.QueryCurrentStateRequest, res *api.QueryCurrentStateResponse) error
func (*Queryer) QueryEventsByID ¶
func (r *Queryer) QueryEventsByID( ctx context.Context, request *api.QueryEventsByIDRequest, response *api.QueryEventsByIDResponse, ) error
QueryEventsByID queries a list of events by event ID for one room. If no room is specified, it will try to determine which room to use by querying the first events roomID.
func (*Queryer) QueryKnownUsers ¶
func (r *Queryer) QueryKnownUsers(ctx context.Context, req *api.QueryKnownUsersRequest, res *api.QueryKnownUsersResponse) error
func (*Queryer) QueryLatestEventsAndState ¶
func (r *Queryer) QueryLatestEventsAndState( ctx context.Context, request *api.QueryLatestEventsAndStateRequest, response *api.QueryLatestEventsAndStateResponse, ) error
QueryLatestEventsAndState implements api.RoomserverInternalAPI
func (*Queryer) QueryLeftUsers ¶ added in v0.10.9
func (r *Queryer) QueryLeftUsers(ctx context.Context, req *api.QueryLeftUsersRequest, res *api.QueryLeftUsersResponse) error
func (*Queryer) QueryMembershipAtEvent ¶ added in v0.9.2
func (r *Queryer) QueryMembershipAtEvent( ctx context.Context, roomID spec.RoomID, eventIDs []string, senderID spec.SenderID, ) (map[string]*types.HeaderedEvent, error)
QueryMembershipAtEvent returns the known memberships at a given event. If the state before an event is not known, an empty list will be returned for that event instead.
Returned map from eventID to membership event. Events that do not have known state will return a nil event, resulting in a "leave" membership when calculating history visibility.
func (*Queryer) QueryMembershipForSenderID ¶ added in v0.13.0
func (r *Queryer) QueryMembershipForSenderID( ctx context.Context, roomID spec.RoomID, senderID spec.SenderID, response *api.QueryMembershipForUserResponse, ) error
QueryMembershipForSenderID implements api.RoomserverInternalAPI
func (*Queryer) QueryMembershipForUser ¶
func (r *Queryer) QueryMembershipForUser( ctx context.Context, request *api.QueryMembershipForUserRequest, response *api.QueryMembershipForUserResponse, ) error
QueryMembershipForUser implements api.RoomserverInternalAPI
func (*Queryer) QueryMembershipsForRoom ¶
func (r *Queryer) QueryMembershipsForRoom( ctx context.Context, request *api.QueryMembershipsForRoomRequest, response *api.QueryMembershipsForRoomResponse, ) error
QueryMembershipsForRoom implements api.RoomserverInternalAPI
func (*Queryer) QueryMissingEvents ¶
func (r *Queryer) QueryMissingEvents( ctx context.Context, request *api.QueryMissingEventsRequest, response *api.QueryMissingEventsResponse, ) error
QueryMissingEvents implements api.RoomserverInternalAPI
func (*Queryer) QueryNextRoomHierarchyPage ¶ added in v0.13.2
func (querier *Queryer) QueryNextRoomHierarchyPage(ctx context.Context, walker roomserver.RoomHierarchyWalker, limit int) ( []fclient.RoomHierarchyRoom, []string, *roomserver.RoomHierarchyWalker, error, )
Traverse the room hierarchy using the provided walker up to the provided limit, returning a new walker which can be used to fetch the next page.
If limit is -1, this is treated as no limit, and the entire hierarchy will be traversed.
If returned walker is nil, then there are no more rooms left to traverse. This method does not modify the provided walker, so it can be cached.
func (*Queryer) QueryPublishedRooms ¶
func (r *Queryer) QueryPublishedRooms( ctx context.Context, req *api.QueryPublishedRoomsRequest, res *api.QueryPublishedRoomsResponse, ) error
func (*Queryer) QueryRestrictedJoinAllowed ¶ added in v0.8.6
func (r *Queryer) QueryRestrictedJoinAllowed(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID) (string, error)
nolint:gocyclo
func (*Queryer) QueryRoomInfo ¶ added in v0.13.0
func (*Queryer) QueryRoomVersionForRoom ¶
func (r *Queryer) QueryRoomVersionForRoom(ctx context.Context, roomID string) (gomatrixserverlib.RoomVersion, error)
QueryRoomVersionForRoom implements api.RoomserverInternalAPI
func (*Queryer) QueryRoomsForUser ¶
func (*Queryer) QuerySenderIDForUser ¶ added in v0.13.0
func (*Queryer) QueryServerAllowedToSeeEvent ¶
func (r *Queryer) QueryServerAllowedToSeeEvent( ctx context.Context, serverName spec.ServerName, eventID string, roomID string, ) (allowed bool, err error)
QueryServerAllowedToSeeEvent implements api.RoomserverInternalAPI
func (*Queryer) QueryServerBannedFromRoom ¶
func (r *Queryer) QueryServerBannedFromRoom(ctx context.Context, req *api.QueryServerBannedFromRoomRequest, res *api.QueryServerBannedFromRoomResponse) error
func (*Queryer) QueryServerJoinedToRoom ¶
func (r *Queryer) QueryServerJoinedToRoom( ctx context.Context, request *api.QueryServerJoinedToRoomRequest, response *api.QueryServerJoinedToRoomResponse, ) error
QueryServerJoinedToRoom implements api.RoomserverInternalAPI
func (*Queryer) QuerySharedUsers ¶
func (r *Queryer) QuerySharedUsers(ctx context.Context, req *api.QuerySharedUsersRequest, res *api.QuerySharedUsersResponse) error
func (*Queryer) QueryStateAfterEvents ¶
func (r *Queryer) QueryStateAfterEvents( ctx context.Context, request *api.QueryStateAfterEventsRequest, response *api.QueryStateAfterEventsResponse, ) error
QueryStateAfterEvents implements api.RoomserverInternalAPI
func (*Queryer) QueryStateAndAuthChain ¶
func (r *Queryer) QueryStateAndAuthChain( ctx context.Context, request *api.QueryStateAndAuthChainRequest, response *api.QueryStateAndAuthChainResponse, ) error
QueryStateAndAuthChain implements api.RoomserverInternalAPI
func (*Queryer) QueryUserIDForSender ¶ added in v0.13.0
func (*Queryer) RestrictedRoomJoinInfo ¶ added in v0.13.0
func (r *Queryer) RestrictedRoomJoinInfo(ctx context.Context, roomID spec.RoomID, senderID spec.SenderID, localServerName spec.ServerName) (*gomatrixserverlib.RestrictedRoomJoinInfo, error)
func (*Queryer) RoomsWithACLs ¶ added in v0.13.7
RoomsWithACLs returns all room IDs for rooms with ACLs