perform

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: AGPL-3.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	DB      storage.Database
	Cfg     *config.RoomServer
	Queryer *query.Queryer
	Inputer *input.Inputer
	Leaver  *Leaver
}

func (*Admin) AdminQueryEmptyRooms

func (r *Admin) AdminQueryEmptyRooms(ctx context.Context) ([]string, error)

func (*Admin) PerformAdminDeleteEventReport

func (r *Admin) PerformAdminDeleteEventReport(ctx context.Context, reportID uint64) error

func (*Admin) PerformAdminDownloadState

func (r *Admin) PerformAdminDownloadState(
	ctx context.Context,
	roomID, userID string, serverName spec.ServerName,
) error

func (*Admin) PerformAdminEvacuateRoom

func (r *Admin) PerformAdminEvacuateRoom(
	ctx context.Context,
	roomID string,
) (affected []string, err error)

PerformAdminEvacuateRoom will remove all local users from the given room.

func (*Admin) PerformAdminEvacuateUser

func (r *Admin) PerformAdminEvacuateUser(
	ctx context.Context,
	userID string,
) (affected []string, err error)

PerformAdminEvacuateUser will remove the given user from all rooms.

func (*Admin) PerformAdminPurgeRoom

func (r *Admin) PerformAdminPurgeRoom(
	ctx context.Context,
	roomID string,
) error

PerformAdminPurgeRoom removes all traces for the given room from the database.

type Backfiller

type Backfiller struct {
	IsLocalServerName func(spec.ServerName) bool
	DB                storage.Database
	FSAPI             federationAPI.RoomserverFederationAPI
	KeyRing           gomatrixserverlib.JSONVerifier
	Querier           api.QuerySenderIDAPI

	// The servers which should be preferred above other servers when backfilling
	PreferServers []spec.ServerName
}

func (*Backfiller) PerformBackfill

func (r *Backfiller) PerformBackfill(
	ctx context.Context,
	request *api.PerformBackfillRequest,
	response *api.PerformBackfillResponse,
) error

PerformBackfill implements api.RoomServerQueryAPI

type Creator

type Creator struct {
	DB    storage.Database
	Cfg   *config.RoomServer
	RSAPI api.RoomserverInternalAPI
}

func (*Creator) PerformCreateRoom

func (c *Creator) PerformCreateRoom(ctx context.Context, userID spec.UserID, roomID spec.RoomID, createRequest *api.PerformCreateRoomRequest) (string, *util.JSONResponse)

PerformCreateRoom handles all the steps necessary to create a new room. nolint: gocyclo

type Forgetter

type Forgetter struct {
	DB storage.Database
}

func (*Forgetter) PerformForget

func (f *Forgetter) PerformForget(
	ctx context.Context,
	request *api.PerformForgetRequest,
	response *api.PerformForgetResponse,
) error

PerformForget implements api.RoomServerQueryAPI

type InboundPeeker

type InboundPeeker struct {
	DB      storage.RoomDatabase
	Inputer *input.Inputer
}

func (*InboundPeeker) PerformInboundPeek

func (r *InboundPeeker) PerformInboundPeek(
	ctx context.Context,
	request *api.PerformInboundPeekRequest,
	response *api.PerformInboundPeekResponse,
) error

PerformInboundPeek handles peeking into matrix rooms, including over federation by talking to the federationapi. called when a remote server initiates a /peek over federation.

It should atomically figure out the current state of the room (for the response to /peek) while adding the new inbound peek to the kafka stream so the fed sender can start sending peeked events without a race between the state snapshot and the stream of peeked events.

type Inviter

func (*Inviter) IsKnownRoom

func (r *Inviter) IsKnownRoom(ctx context.Context, roomID spec.RoomID) (bool, error)

func (*Inviter) PerformInvite

func (r *Inviter) PerformInvite(
	ctx context.Context,
	req *api.PerformInviteRequest,
) error

nolint:gocyclo

func (*Inviter) ProcessInviteMembership

func (r *Inviter) ProcessInviteMembership(
	ctx context.Context, inviteEvent *types.HeaderedEvent,
) ([]api.OutputEvent, error)

func (*Inviter) StateQuerier

func (r *Inviter) StateQuerier() gomatrixserverlib.StateQuerier

type Joiner

type Joiner struct {
	Cfg   *config.RoomServer
	FSAPI fsAPI.RoomserverFederationAPI
	RSAPI rsAPI.RoomserverInternalAPI
	DB    storage.Database

	Inputer *input.Inputer
	Queryer *query.Queryer
}

func (*Joiner) PerformJoin

func (r *Joiner) PerformJoin(
	ctx context.Context,
	req *rsAPI.PerformJoinRequest,
) (roomID string, joinedVia spec.ServerName, err error)

PerformJoin handles joining matrix rooms, including over federation by talking to the federationapi.

type Leaver

func (*Leaver) PerformLeave

func (r *Leaver) PerformLeave(
	ctx context.Context,
	req *api.PerformLeaveRequest,
	res *api.PerformLeaveResponse,
) ([]api.OutputEvent, error)

WriteOutputEvents implements OutputRoomEventWriter

type Peeker

type Peeker struct {
	ServerName spec.ServerName
	Cfg        *config.RoomServer
	FSAPI      fsAPI.RoomserverFederationAPI
	DB         storage.Database

	Inputer *input.Inputer
}

func (*Peeker) PerformPeek

func (r *Peeker) PerformPeek(
	ctx context.Context,
	req *api.PerformPeekRequest,
) (roomID string, err error)

PerformPeek handles peeking into matrix rooms, including over federation by talking to the federationapi.

type Publisher

type Publisher struct {
	DB storage.Database
}

func (*Publisher) PerformPublish

func (r *Publisher) PerformPublish(
	ctx context.Context,
	req *api.PerformPublishRequest,
) error

PerformPublish publishes or unpublishes a room from the room directory. Returns a database error, if any.

type QueryState

type QueryState struct {
	storage.Database
	// contains filtered or unexported fields
}

func (*QueryState) GetAuthEvents

func (*QueryState) GetState

func (q *QueryState) GetState(ctx context.Context, roomID spec.RoomID, stateWanted []gomatrixserverlib.StateKeyTuple) ([]gomatrixserverlib.PDU, error)

type Unpeeker

type Unpeeker struct {
	ServerName spec.ServerName
	Cfg        *config.RoomServer
	FSAPI      fsAPI.RoomserverFederationAPI
	Inputer    *input.Inputer
}

func (*Unpeeker) PerformUnpeek

func (r *Unpeeker) PerformUnpeek(
	ctx context.Context,
	roomID, userID, deviceID string,
) error

PerformUnpeek handles un-peeking matrix rooms, including over federation by talking to the federationapi.

type Upgrader

type Upgrader struct {
	Cfg    *config.RoomServer
	URSAPI api.RoomserverInternalAPI
}

func (*Upgrader) PerformRoomUpgrade

func (r *Upgrader) PerformRoomUpgrade(
	ctx context.Context,
	roomID string, userID spec.UserID, roomVersion gomatrixserverlib.RoomVersion, additionalCreators []string,
) (newRoomID string, err error)

PerformRoomUpgrade upgrades a room from one version to another

Jump to

Keyboard shortcuts

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