0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-11-20 16:42:05 +01:00
dendrite/setup/config/config_roomserver.go

22 lines
510 B
Go
Raw Normal View History

package config
type RoomServer struct {
Matrix *Global `yaml:"-"`
Database DatabaseOptions `yaml:"database,omitempty"`
}
func (c *RoomServer) Defaults(opts DefaultOpts) {
if opts.Generate {
if !opts.SingleDatabase {
c.Database.ConnectionString = "file:roomserver.db"
}
}
}
func (c *RoomServer) Verify(configErrs *ConfigErrors) {
if c.Matrix.DatabaseOptions.ConnectionString == "" {
checkNotEmpty(configErrs, "room_server.database.connection_string", string(c.Database.ConnectionString))
}
}