mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-24 20:51:42 +00:00
11d9b9db0e
This removes most of the code used for polylith/API mode. This removes the `/api` internal endpoints entirely. Binary size change roughly 5%: ``` 51437560 Feb 13 10:15 dendrite-monolith-server # old 48759008 Feb 13 10:15 dendrite-monolith-server # new ```
22 lines
505 B
Go
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))
|
|
}
|
|
}
|