diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-12-02 17:41:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 17:41:00 +0000 |
commit | b5aa7ca3ab1c91397700637c91d60860a0535f1e (patch) | |
tree | 9da277c7b22027f09a7f45b0b0d771e44949e8f0 /internal/config/config_federationapi.go | |
parent | 3ef6187e96ca2d68b3014bbd150e69971b6f7800 (diff) |
Top-level setup package (#1605)
* Move config, setup, mscs into "setup" top-level folder
* oops, forgot the EDU server
* Add setup
* goimports
Diffstat (limited to 'internal/config/config_federationapi.go')
-rw-r--r-- | internal/config/config_federationapi.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/internal/config/config_federationapi.go b/internal/config/config_federationapi.go deleted file mode 100644 index 64803d95..00000000 --- a/internal/config/config_federationapi.go +++ /dev/null @@ -1,31 +0,0 @@ -package config - -type FederationAPI struct { - Matrix *Global `yaml:"-"` - - InternalAPI InternalAPIOptions `yaml:"internal_api"` - ExternalAPI ExternalAPIOptions `yaml:"external_api"` - - // List of paths to X509 certificates used by the external federation listeners. - // These are used to calculate the TLS fingerprints to publish for this server. - // Other matrix servers talking to this server will expect the x509 certificate - // to match one of these certificates. - // The certificates should be in PEM format. - FederationCertificatePaths []Path `yaml:"federation_certificates"` -} - -func (c *FederationAPI) Defaults() { - c.InternalAPI.Listen = "http://localhost:7772" - c.InternalAPI.Connect = "http://localhost:7772" - c.ExternalAPI.Listen = "http://[::]:8072" -} - -func (c *FederationAPI) Verify(configErrs *ConfigErrors, isMonolith bool) { - checkURL(configErrs, "federation_api.internal_api.listen", string(c.InternalAPI.Listen)) - checkURL(configErrs, "federation_api.internal_api.connect", string(c.InternalAPI.Connect)) - if !isMonolith { - checkURL(configErrs, "federation_api.external_api.listen", string(c.ExternalAPI.Listen)) - } - // TODO: not applicable always, e.g. in demos - //checkNotZero(configErrs, "federation_api.federation_certificates", int64(len(c.FederationCertificatePaths))) -} |