Documentation ¶
Index ¶
- type RoomserverInternalAPI
- func (r *RoomserverInternalAPI) GetAliasesForRoomID(ctx context.Context, request *api.GetAliasesForRoomIDRequest, ...) error
- func (r *RoomserverInternalAPI) GetCreatorIDForAlias(ctx context.Context, request *api.GetCreatorIDForAliasRequest, ...) error
- func (r *RoomserverInternalAPI) GetRoomIDForAlias(ctx context.Context, request *api.GetRoomIDForAliasRequest, ...) error
- func (r *RoomserverInternalAPI) PerformForget(ctx context.Context, req *api.PerformForgetRequest, ...) error
- func (r *RoomserverInternalAPI) PerformInvite(ctx context.Context, req *api.PerformInviteRequest, ...) error
- func (r *RoomserverInternalAPI) PerformLeave(ctx context.Context, req *api.PerformLeaveRequest, ...) error
- func (r *RoomserverInternalAPI) RemoveRoomAlias(ctx context.Context, request *api.RemoveRoomAliasRequest, ...) error
- func (r *RoomserverInternalAPI) SetAppserviceAPI(asAPI asAPI.AppServiceQueryAPI)
- func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.FederationInternalAPI, keyRing *gomatrixserverlib.KeyRing)
- func (r *RoomserverInternalAPI) SetRoomAlias(ctx context.Context, request *api.SetRoomAliasRequest, ...) error
- func (r *RoomserverInternalAPI) SetUserAPI(userAPI userapi.UserInternalAPI)
- type RoomserverInternalAPIDatabase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoomserverInternalAPI ¶
type RoomserverInternalAPI struct { *input.Inputer *query.Queryer *perform.Inviter *perform.Joiner *perform.Peeker *perform.InboundPeeker *perform.Unpeeker *perform.Leaver *perform.Publisher *perform.Backfiller *perform.Forgetter ProcessContext *process.ProcessContext DB storage.Database Cfg *config.RoomServer Cache caching.RoomServerCaches ServerName gomatrixserverlib.ServerName KeyRing gomatrixserverlib.JSONVerifier ServerACLs *acls.ServerACLs JetStream nats.JetStreamContext Durable string InputRoomEventTopic string // JetStream topic for new input room events OutputRoomEventTopic string // JetStream topic for new output room events PerspectiveServerNames []gomatrixserverlib.ServerName // contains filtered or unexported fields }
RoomserverInternalAPI is an implementation of api.RoomserverInternalAPI
func NewRoomserverAPI ¶
func NewRoomserverAPI( processCtx *process.ProcessContext, cfg *config.RoomServer, roomserverDB storage.Database, consumer nats.JetStreamContext, inputRoomEventTopic, outputRoomEventTopic string, caches caching.RoomServerCaches, perspectiveServerNames []gomatrixserverlib.ServerName, ) *RoomserverInternalAPI
func (*RoomserverInternalAPI) GetAliasesForRoomID ¶
func (r *RoomserverInternalAPI) GetAliasesForRoomID( ctx context.Context, request *api.GetAliasesForRoomIDRequest, response *api.GetAliasesForRoomIDResponse, ) error
GetAliasesForRoomID implements alias.RoomserverInternalAPI
func (*RoomserverInternalAPI) GetCreatorIDForAlias ¶
func (r *RoomserverInternalAPI) GetCreatorIDForAlias( ctx context.Context, request *api.GetCreatorIDForAliasRequest, response *api.GetCreatorIDForAliasResponse, ) error
GetCreatorIDForAlias implements alias.RoomserverInternalAPI
func (*RoomserverInternalAPI) GetRoomIDForAlias ¶
func (r *RoomserverInternalAPI) GetRoomIDForAlias( ctx context.Context, request *api.GetRoomIDForAliasRequest, response *api.GetRoomIDForAliasResponse, ) error
GetRoomIDForAlias implements alias.RoomserverInternalAPI
func (*RoomserverInternalAPI) PerformForget ¶ added in v0.3.0
func (r *RoomserverInternalAPI) PerformForget( ctx context.Context, req *api.PerformForgetRequest, resp *api.PerformForgetResponse, ) error
func (*RoomserverInternalAPI) PerformInvite ¶
func (r *RoomserverInternalAPI) PerformInvite( ctx context.Context, req *api.PerformInviteRequest, res *api.PerformInviteResponse, ) error
func (*RoomserverInternalAPI) PerformLeave ¶
func (r *RoomserverInternalAPI) PerformLeave( ctx context.Context, req *api.PerformLeaveRequest, res *api.PerformLeaveResponse, ) error
func (*RoomserverInternalAPI) RemoveRoomAlias ¶
func (r *RoomserverInternalAPI) RemoveRoomAlias( ctx context.Context, request *api.RemoveRoomAliasRequest, response *api.RemoveRoomAliasResponse, ) error
RemoveRoomAlias implements alias.RoomserverInternalAPI
func (*RoomserverInternalAPI) SetAppserviceAPI ¶ added in v0.3.4
func (r *RoomserverInternalAPI) SetAppserviceAPI(asAPI asAPI.AppServiceQueryAPI)
func (*RoomserverInternalAPI) SetFederationAPI ¶ added in v0.6.0
func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.FederationInternalAPI, keyRing *gomatrixserverlib.KeyRing)
SetFederationInputAPI passes in a federation input API reference so that we can avoid the chicken-and-egg problem of both the roomserver input API and the federation input API being interdependent.
func (*RoomserverInternalAPI) SetRoomAlias ¶
func (r *RoomserverInternalAPI) SetRoomAlias( ctx context.Context, request *api.SetRoomAliasRequest, response *api.SetRoomAliasResponse, ) error
SetRoomAlias implements alias.RoomserverInternalAPI
func (*RoomserverInternalAPI) SetUserAPI ¶ added in v0.6.4
func (r *RoomserverInternalAPI) SetUserAPI(userAPI userapi.UserInternalAPI)
type RoomserverInternalAPIDatabase ¶
type RoomserverInternalAPIDatabase interface { // Save a given room alias with the room ID it refers to. // Returns an error if there was a problem talking to the database. SetRoomAlias(ctx context.Context, alias string, roomID string, creatorUserID string) error // Look up the room ID a given alias refers to. // Returns an error if there was a problem talking to the database. GetRoomIDForAlias(ctx context.Context, alias string) (string, error) // Look up all aliases referring to a given room ID. // Returns an error if there was a problem talking to the database. GetAliasesForRoomID(ctx context.Context, roomID string) ([]string, error) // Get the user ID of the creator of an alias. // Returns an error if there was a problem talking to the database. GetCreatorIDForAlias(ctx context.Context, alias string) (string, error) // Remove a given room alias. // Returns an error if there was a problem talking to the database. RemoveRoomAlias(ctx context.Context, alias string) error // Look up the room version for a given room. GetRoomVersionForRoom( ctx context.Context, roomID string, ) (gomatrixserverlib.RoomVersion, error) }
RoomserverInternalAPIDatabase has the storage APIs needed to implement the alias API.