Documentation
¶
Index ¶
- type Admin
- func (r *Admin) PerformAdminDeleteEventReport(ctx context.Context, reportID uint64) error
- func (r *Admin) PerformAdminDownloadState(ctx context.Context, roomID, userID string, serverName spec.ServerName) error
- func (r *Admin) PerformAdminEvacuateRoom(ctx context.Context, roomID string) (affected []string, err error)
- func (r *Admin) PerformAdminEvacuateUser(ctx context.Context, userID string) (affected []string, err error)
- func (r *Admin) PerformAdminPurgeRoom(ctx context.Context, roomID string) error
- type Backfiller
- type Creator
- type Forgetter
- type InboundPeeker
- type Inviter
- func (r *Inviter) IsKnownRoom(ctx context.Context, roomID spec.RoomID) (bool, error)
- func (r *Inviter) PerformInvite(ctx context.Context, req *api.PerformInviteRequest) error
- func (r *Inviter) ProcessInviteMembership(ctx context.Context, inviteEvent *types.HeaderedEvent) ([]api.OutputEvent, error)
- func (r *Inviter) StateQuerier() gomatrixserverlib.StateQuerier
- type Joiner
- type Leaver
- type Peeker
- type Publisher
- type QueryState
- type Unpeeker
- type Upgrader
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) PerformAdminDeleteEventReport ¶
func (*Admin) PerformAdminDownloadState ¶
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.
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 ¶
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 ¶
type Inviter struct {
DB storage.Database
Cfg *config.RoomServer
FSAPI federationAPI.RoomserverFederationAPI
RSAPI api.RoomserverInternalAPI
Inputer *input.Inputer
}
func (*Inviter) IsKnownRoom ¶
func (*Inviter) PerformInvite ¶
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 ¶
type Leaver struct {
Cfg *config.RoomServer
DB storage.Database
FSAPI fsAPI.RoomserverFederationAPI
RSAPI rsAPI.RoomserverInternalAPI
UserAPI userapi.RoomserverUserAPI
Inputer *input.Inputer
}
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 ¶
func (*Publisher) PerformPublish ¶
PerformPublish publishes or unpublishes a room from the room directory. Returns a database error, if any.
type QueryState ¶
func (*QueryState) GetAuthEvents ¶
func (q *QueryState) GetAuthEvents(ctx context.Context, event gomatrixserverlib.PDU) (gomatrixserverlib.AuthEventProvider, error)
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
}
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, ) (newRoomID string, err error)
PerformRoomUpgrade upgrades a room from one version to another