query

package
v0.0.0-...-811715e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthChain

func GetAuthChain(
	ctx context.Context, fn eventsFromIDs, authEventIDs []string,
) ([]*gomatrixserverlib.Event, 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
	ServerName gomatrixserverlib.ServerName
	ServerACLs *acls.ServerACLs
}

func (*Queryer) QueryAuthChain

func (r *Queryer) QueryAuthChain(ctx context.Context, req *api.QueryAuthChainRequest, res *api.QueryAuthChainResponse) error

func (*Queryer) QueryBulkStateContent

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 implements api.RoomserverInternalAPI

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) QueryMembershipAtEvent

func (r *Queryer) QueryMembershipAtEvent(
	ctx context.Context,
	request *api.QueryMembershipAtEventRequest,
	response *api.QueryMembershipAtEventResponse,
) 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.

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) QueryPublishedRooms

func (r *Queryer) QueryPublishedRooms(
	ctx context.Context,
	req *api.QueryPublishedRoomsRequest,
	res *api.QueryPublishedRoomsResponse,
) error

func (*Queryer) QueryRestrictedJoinAllowed

nolint:gocyclo

func (*Queryer) QueryRoomVersionCapabilities

func (r *Queryer) QueryRoomVersionCapabilities(
	ctx context.Context,
	request *api.QueryRoomVersionCapabilitiesRequest,
	response *api.QueryRoomVersionCapabilitiesResponse,
) error

QueryRoomVersionCapabilities implements api.RoomserverInternalAPI

func (*Queryer) QueryRoomVersionForRoom

func (r *Queryer) QueryRoomVersionForRoom(
	ctx context.Context,
	request *api.QueryRoomVersionForRoomRequest,
	response *api.QueryRoomVersionForRoomResponse,
) error

QueryRoomVersionCapabilities implements api.RoomserverInternalAPI

func (*Queryer) QueryRoomsForUser

func (r *Queryer) QueryRoomsForUser(ctx context.Context, req *api.QueryRoomsForUserRequest, res *api.QueryRoomsForUserResponse) error

func (*Queryer) QueryServerAllowedToSeeEvent

func (r *Queryer) QueryServerAllowedToSeeEvent(
	ctx context.Context,
	request *api.QueryServerAllowedToSeeEventRequest,
	response *api.QueryServerAllowedToSeeEventResponse,
) (err error)

QueryServerAllowedToSeeEvent implements api.RoomserverInternalAPI

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL