mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Improve documentation
This commit is contained in:
parent
0e57d246fc
commit
ce9a697dca
|
|
@ -89,7 +89,7 @@ type RoomserverQueryAPIDatabase interface {
|
||||||
) (map[types.EventStateKeyNID]string, error)
|
) (map[types.EventStateKeyNID]string, error)
|
||||||
// Lookup if the roomID has been reserved, and when that reservation was made.
|
// Lookup if the roomID has been reserved, and when that reservation was made.
|
||||||
GetRoomIDReserved(ctx context.Context, roomID string) (time.Time, error)
|
GetRoomIDReserved(ctx context.Context, roomID string) (time.Time, error)
|
||||||
// Reserve the room ID.
|
// Mark the room ID as reserved.
|
||||||
ReserveRoomID(ctx context.Context, roomID string) (success bool, err error)
|
ReserveRoomID(ctx context.Context, roomID string) (success bool, err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -662,7 +662,10 @@ func getAuthChain(
|
||||||
return authEvents, nil
|
return authEvents, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryReserveRoomID implements api.RoomserverQueryAPI
|
// QueryReserveRoomID marks the given roomID as reserved if it is not
|
||||||
|
// yet already reserved. Fails if the room already exists or ID is
|
||||||
|
// already reserved.
|
||||||
|
// Implements api.RoomserverQueryAPI
|
||||||
func (r *RoomserverQueryAPI) QueryReserveRoomID(
|
func (r *RoomserverQueryAPI) QueryReserveRoomID(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
request *api.QueryReserveRoomIDRequest,
|
request *api.QueryReserveRoomIDRequest,
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
package roomserver
|
package roomserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/roomserver/api"
|
"github.com/matrix-org/dendrite/roomserver/api"
|
||||||
|
|
@ -36,6 +37,7 @@ func SetupRoomServerComponent(
|
||||||
base *basecomponent.BaseDendrite,
|
base *basecomponent.BaseDendrite,
|
||||||
) (api.RoomserverAliasAPI, api.RoomserverInputAPI, api.RoomserverQueryAPI) {
|
) (api.RoomserverAliasAPI, api.RoomserverInputAPI, api.RoomserverQueryAPI) {
|
||||||
roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer))
|
roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer))
|
||||||
|
fmt.Println(base.Cfg.Database)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.WithError(err).Panicf("failed to connect to room server db")
|
logrus.WithError(err).Panicf("failed to connect to room server db")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue