dendrite/setup/config/config_keyserver.go
Brian Meek 0fecb13194
Merge upstream changes to version 0.11.1
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-15 17:32:56 -05:00

22 lines
505 B
Go

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