Documentation ¶
Index ¶
- Constants
- func IsValidRegex(regexString string) bool
- type Address
- type AppServiceAPI
- type ApplicationService
- type ApplicationServiceNamespace
- type ClientAPI
- type ConfigErrors
- type DataSource
- type DatabaseOptions
- type Dendrite
- func (config *Dendrite) AppServiceURL() string
- func (c *Dendrite) Defaults()
- func (config *Dendrite) Derive() error
- func (config *Dendrite) EDUServerURL() string
- func (config *Dendrite) FederationSenderURL() string
- func (config *Dendrite) KeyServerURL() string
- func (config *Dendrite) RoomServerURL() string
- func (config *Dendrite) SetupTracing(serviceName string) (closer io.Closer, err error)
- func (config *Dendrite) SigningKeyServerURL() string
- func (config *Dendrite) UserAPIURL() string
- func (c *Dendrite) Verify(configErrs *ConfigErrors, isMonolith bool)
- func (c *Dendrite) Wiring()
- type Derived
- type EDUServer
- type ExternalAPIOptions
- type FederationAPI
- type FederationSender
- type FileSizeBytes
- type Global
- type HTTPAddress
- type InternalAPIOptions
- type Kafka
- type KeyPerspective
- type KeyPerspectiveTrustKey
- type KeyPerspectives
- type KeyServer
- type LogrusHook
- type MSCs
- type MediaAPI
- type Metrics
- type OldVerifyKeys
- type Path
- type Proxy
- type RateLimiting
- type RoomServer
- type SigningKeyServer
- type SyncAPI
- type TURN
- type ThumbnailSize
- type Topic
- type UserAPI
Constants ¶
const ( TopicOutputTypingEvent = "OutputTypingEvent" TopicOutputSendToDeviceEvent = "OutputSendToDeviceEvent" TopicOutputKeyChangeEvent = "OutputKeyChangeEvent" TopicOutputRoomEvent = "OutputRoomEvent" TopicOutputClientData = "OutputClientData" TopicOutputReceiptEvent = "OutputReceiptEvent" )
Defined Kafka topics.
const Version = 1
Version is the current version of the config format. This will change whenever we make breaking changes to the config format.
Variables ¶
This section is empty.
Functions ¶
func IsValidRegex ¶
IsValidRegex returns true or false based on whether the given string is valid regex or not
Types ¶
type AppServiceAPI ¶
type AppServiceAPI struct { Matrix *Global `yaml:"-"` Derived *Derived `yaml:"-"` // TODO: Nuke Derived from orbit InternalAPI InternalAPIOptions `yaml:"internal_api"` Database DatabaseOptions `yaml:"database"` ConfigFiles []string `yaml:"config_files"` }
func (*AppServiceAPI) Defaults ¶
func (c *AppServiceAPI) Defaults()
func (*AppServiceAPI) Verify ¶
func (c *AppServiceAPI) Verify(configErrs *ConfigErrors, isMonolith bool)
type ApplicationService ¶
type ApplicationService struct { // User-defined, unique, persistent ID of the application service ID string `yaml:"id"` // Base URL of the application service URL string `yaml:"url"` // Application service token provided in requests to a homeserver ASToken string `yaml:"as_token"` // Homeserver token provided in requests to an application service HSToken string `yaml:"hs_token"` // Localpart of application service user SenderLocalpart string `yaml:"sender_localpart"` // Information about an application service's namespaces. Key is either // "users", "aliases" or "rooms" NamespaceMap map[string][]ApplicationServiceNamespace `yaml:"namespaces"` // Whether rate limiting is applied to each application service user RateLimited bool `yaml:"rate_limited"` // Any custom protocols that this application service provides (e.g. IRC) Protocols []string `yaml:"protocols"` }
ApplicationService represents a Matrix application service. https://matrix.org/docs/spec/application_service/unstable.html
func (*ApplicationService) IsInterestedInRoomAlias ¶
func (a *ApplicationService) IsInterestedInRoomAlias( roomAlias string, ) bool
IsInterestedInRoomAlias returns a bool on whether an application service's namespace includes the given room alias
func (*ApplicationService) IsInterestedInRoomID ¶
func (a *ApplicationService) IsInterestedInRoomID( roomID string, ) bool
IsInterestedInRoomID returns a bool on whether an application service's namespace includes the given room ID
func (*ApplicationService) IsInterestedInUserID ¶
func (a *ApplicationService) IsInterestedInUserID( userID string, ) bool
IsInterestedInUserID returns a bool on whether an application service's namespace includes the given user ID
func (*ApplicationService) OwnsNamespaceCoveringUserId ¶
func (a *ApplicationService) OwnsNamespaceCoveringUserId( userID string, ) bool
OwnsNamespaceCoveringUserId returns a bool on whether an application service's namespace is exclusive and includes the given user ID
type ApplicationServiceNamespace ¶
type ApplicationServiceNamespace struct { // Whether or not the namespace is managed solely by this application service Exclusive bool `yaml:"exclusive"` // A regex pattern that represents the namespace Regex string `yaml:"regex"` // The ID of an existing group that all users of this application service will // be added to. This field is only relevant to the `users` namespace. // Note that users who are joined to this group through an application service // are not to be listed when querying for the group's members, however the // group should be listed when querying an application service user's groups. // This is to prevent making spamming all users of an application service // trivial. GroupID string `yaml:"group_id"` // Regex object representing our pattern. Saves having to recompile every time RegexpObject *regexp.Regexp }
ApplicationServiceNamespace is the namespace that a specific application service has management over.
type ClientAPI ¶
type ClientAPI struct { Matrix *Global `yaml:"-"` Derived *Derived `yaml:"-"` // TODO: Nuke Derived from orbit InternalAPI InternalAPIOptions `yaml:"internal_api"` ExternalAPI ExternalAPIOptions `yaml:"external_api"` // If set disables new users from registering (except via shared // secrets) RegistrationDisabled bool `yaml:"registration_disabled"` // secret, even if registration is otherwise disabled. RegistrationSharedSecret string `yaml:"registration_shared_secret"` // Boolean stating whether catpcha registration is enabled // and required RecaptchaEnabled bool `yaml:"enable_registration_captcha"` // This Home Server's ReCAPTCHA public key. RecaptchaPublicKey string `yaml:"recaptcha_public_key"` // This Home Server's ReCAPTCHA private key. RecaptchaPrivateKey string `yaml:"recaptcha_private_key"` // Secret used to bypass the captcha registration entirely RecaptchaBypassSecret string `yaml:"recaptcha_bypass_secret"` // HTTP API endpoint used to verify whether the captcha response // was successful RecaptchaSiteVerifyAPI string `yaml:"recaptcha_siteverify_api"` // TURN options TURN TURN `yaml:"turn"` // Rate-limiting options RateLimiting RateLimiting `yaml:"rate_limiting"` }
func (*ClientAPI) Verify ¶
func (c *ClientAPI) Verify(configErrs *ConfigErrors, isMonolith bool)
type ConfigErrors ¶
type ConfigErrors []string
ConfigErrors stores problems encountered when parsing a config file. It implements the error interface.
func (*ConfigErrors) Add ¶
func (errs *ConfigErrors) Add(str string)
Add appends an error to the list of errors in this configErrors. It is a wrapper to the builtin append and hides pointers from the client code. This method is safe to use with an uninitialized configErrors because if it is nil, it will be properly allocated.
func (ConfigErrors) Error ¶
func (errs ConfigErrors) Error() string
Error returns a string detailing how many errors were contained within a configErrors type.
type DataSource ¶
type DataSource string
A DataSource for opening a postgresql database using lib/pq.
func (DataSource) IsPostgres ¶
func (d DataSource) IsPostgres() bool
func (DataSource) IsSQLite ¶
func (d DataSource) IsSQLite() bool
type DatabaseOptions ¶
type DatabaseOptions struct { // The connection string, file:filename.db or postgres://server.... ConnectionString DataSource `yaml:"connection_string"` // Maximum open connections to the DB (0 = use default, negative means unlimited) MaxOpenConnections int `yaml:"max_open_conns"` // Maximum idle connections to the DB (0 = use default, negative means unlimited) MaxIdleConnections int `yaml:"max_idle_conns"` // maximum amount of time (in seconds) a connection may be reused (<= 0 means unlimited) ConnMaxLifetimeSeconds int `yaml:"conn_max_lifetime"` }
func (DatabaseOptions) ConnMaxLifetime ¶
func (c DatabaseOptions) ConnMaxLifetime() time.Duration
ConnMaxLifetime returns maximum amount of time a connection may be reused
func (*DatabaseOptions) Defaults ¶
func (c *DatabaseOptions) Defaults()
func (DatabaseOptions) MaxIdleConns ¶
func (c DatabaseOptions) MaxIdleConns() int
MaxIdleConns returns maximum idle connections to the DB
func (DatabaseOptions) MaxOpenConns ¶
func (c DatabaseOptions) MaxOpenConns() int
MaxOpenConns returns maximum open connections to the DB
func (*DatabaseOptions) Verify ¶
func (c *DatabaseOptions) Verify(configErrs *ConfigErrors, isMonolith bool)
type Dendrite ¶
type Dendrite struct { // The version of the configuration file. // If the version in a file doesn't match the current dendrite config // version then we can give a clear error message telling the user // to update their config file to the current version. // The version of the file should only be different if there has // been a breaking change to the config file format. Version int `yaml:"version"` Global Global `yaml:"global"` AppServiceAPI AppServiceAPI `yaml:"app_service_api"` ClientAPI ClientAPI `yaml:"client_api"` EDUServer EDUServer `yaml:"edu_server"` FederationAPI FederationAPI `yaml:"federation_api"` FederationSender FederationSender `yaml:"federation_sender"` KeyServer KeyServer `yaml:"key_server"` MediaAPI MediaAPI `yaml:"media_api"` RoomServer RoomServer `yaml:"room_server"` SigningKeyServer SigningKeyServer `yaml:"signing_key_server"` SyncAPI SyncAPI `yaml:"sync_api"` UserAPI UserAPI `yaml:"user_api"` MSCs MSCs `yaml:"mscs"` // The config for tracing the dendrite servers. Tracing struct { // Set to true to enable tracer hooks. If false, no tracing is set up. Enabled bool `yaml:"enabled"` // The config for the jaeger opentracing reporter. Jaeger jaegerconfig.Configuration `yaml:"jaeger"` } `yaml:"tracing"` // The config for logging informations. Each hook will be added to logrus. Logging []LogrusHook `yaml:"logging"` // Any information derived from the configuration options for later use. Derived Derived `yaml:"-"` }
Dendrite contains all the config used by a dendrite process. Relative paths are resolved relative to the current working directory
func Load ¶
Load a yaml config file for a server run as multiple processes or as a monolith. Checks the config to ensure that it is valid.
func (*Dendrite) AppServiceURL ¶
AppServiceURL returns a HTTP URL for where the appservice component is listening.
func (*Dendrite) Defaults ¶
func (c *Dendrite) Defaults()
SetDefaults sets default config values if they are not explicitly set.
func (*Dendrite) Derive ¶
Derive generates data that is derived from various values provided in the config file.
func (*Dendrite) EDUServerURL ¶
EDUServerURL returns an HTTP URL for where the EDU server is listening.
func (*Dendrite) FederationSenderURL ¶
FederationSenderURL returns an HTTP URL for where the federation sender is listening.
func (*Dendrite) KeyServerURL ¶
KeyServerURL returns an HTTP URL for where the key server is listening.
func (*Dendrite) RoomServerURL ¶
RoomServerURL returns an HTTP URL for where the roomserver is listening.
func (*Dendrite) SetupTracing ¶
SetupTracing configures the opentracing using the supplied configuration.
func (*Dendrite) SigningKeyServerURL ¶
SigningKeyServerURL returns an HTTP URL for where the signing key server is listening.
func (*Dendrite) UserAPIURL ¶
UserAPIURL returns an HTTP URL for where the userapi is listening.
func (*Dendrite) Verify ¶
func (c *Dendrite) Verify(configErrs *ConfigErrors, isMonolith bool)
type Derived ¶
type Derived struct { Registration struct { // Flows is a slice of flows, which represent one possible way that the client can authenticate a request. // http://matrix.org/docs/spec/HEAD/client_server/r0.3.0.html#user-interactive-authentication-api // As long as the generated flows only rely on config file options, // we can generate them on startup and store them until needed Flows []authtypes.Flow `json:"flows"` // Params that need to be returned to the client during // registration in order to complete registration stages. Params map[string]interface{} `json:"params"` } // Application services parsed from their config files // The paths of which were given above in the main config file ApplicationServices []ApplicationService // Meta-regexes compiled from all exclusive application service // Regexes. // // When a user registers, we check that their username does not match any // exclusive application service namespaces ExclusiveApplicationServicesUsernameRegexp *regexp.Regexp // When a user creates a room alias, we check that it isn't already // reserved by an application service ExclusiveApplicationServicesAliasRegexp *regexp.Regexp }
TODO: Kill Derived
type EDUServer ¶
type EDUServer struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` }
func (*EDUServer) Verify ¶
func (c *EDUServer) Verify(configErrs *ConfigErrors, isMonolith bool)
type ExternalAPIOptions ¶
type ExternalAPIOptions struct {
Listen HTTPAddress `yaml:"listen"`
}
type FederationAPI ¶
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 (*FederationAPI) Defaults ¶
func (c *FederationAPI) Defaults()
func (*FederationAPI) Verify ¶
func (c *FederationAPI) Verify(configErrs *ConfigErrors, isMonolith bool)
type FederationSender ¶
type FederationSender struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` // The FederationSender database stores information used by the FederationSender // It is only accessed by the FederationSender. Database DatabaseOptions `yaml:"database"` // Federation failure threshold. How many consecutive failures that we should // tolerate when sending federation requests to a specific server. The backoff // is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds, etc. // The default value is 16 if not specified, which is circa 18 hours. FederationMaxRetries uint32 `yaml:"send_max_retries"` // FederationDisableTLSValidation disables the validation of X.509 TLS certs // on remote federation endpoints. This is not recommended in production! DisableTLSValidation bool `yaml:"disable_tls_validation"` Proxy Proxy `yaml:"proxy_outbound"` }
func (*FederationSender) Defaults ¶
func (c *FederationSender) Defaults()
func (*FederationSender) Verify ¶
func (c *FederationSender) Verify(configErrs *ConfigErrors, isMonolith bool)
type Global ¶
type Global struct { // The name of the server. This is usually the domain name, e.g 'matrix.org', 'localhost'. ServerName gomatrixserverlib.ServerName `yaml:"server_name"` // Path to the private key which will be used to sign requests and events. PrivateKeyPath Path `yaml:"private_key"` // The private key which will be used to sign requests and events. PrivateKey ed25519.PrivateKey `yaml:"-"` // An arbitrary string used to uniquely identify the PrivateKey. Must start with the // prefix "ed25519:". KeyID gomatrixserverlib.KeyID `yaml:"-"` // Information about old private keys that used to be used to sign requests and // events on this domain. They will not be used but will be advertised to other // servers that ask for them to help verify old events. OldVerifyKeys []OldVerifyKeys `yaml:"old_private_keys"` // How long a remote server can cache our server key for before requesting it again. // Increasing this number will reduce the number of requests made by remote servers // for our key, but increases the period a compromised key will be considered valid // by remote servers. // Defaults to 24 hours. KeyValidityPeriod time.Duration `yaml:"key_validity_period"` // Disables federation. Dendrite will not be able to make any outbound HTTP requests // to other servers and the federation API will not be exposed. DisableFederation bool `yaml:"disable_federation"` // List of domains that the server will trust as identity servers to // verify third-party identifiers. // Defaults to an empty array. TrustedIDServers []string `yaml:"trusted_third_party_id_servers"` // Kafka/Naffka configuration Kafka Kafka `yaml:"kafka"` // Metrics configuration Metrics Metrics `yaml:"metrics"` }
func (*Global) Verify ¶
func (c *Global) Verify(configErrs *ConfigErrors, isMonolith bool)
type HTTPAddress ¶
type HTTPAddress string
An HTTPAddress to listen on, starting with either http:// or https://.
func (HTTPAddress) Address ¶
func (h HTTPAddress) Address() (Address, error)
type InternalAPIOptions ¶
type InternalAPIOptions struct { Listen HTTPAddress `yaml:"listen"` Connect HTTPAddress `yaml:"connect"` }
type Kafka ¶
type Kafka struct { // A list of kafka addresses to connect to. Addresses []string `yaml:"addresses"` // The prefix to use for Kafka topic names for this homeserver - really only // useful if running more than one Dendrite on the same Kafka deployment. TopicPrefix string `yaml:"topic_prefix"` // Whether to use naffka instead of kafka. // Naffka can only be used when running dendrite as a single monolithic server. // Kafka can be used both with a monolithic server and when running the // components as separate servers. UseNaffka bool `yaml:"use_naffka"` // The Naffka database is used internally by the naffka library, if used. Database DatabaseOptions `yaml:"naffka_database"` // The max size a Kafka message passed between consumer/producer can have // Equals roughly max.message.bytes / fetch.message.max.bytes in Kafka MaxMessageBytes *int `yaml:"max_message_bytes"` }
func (*Kafka) Verify ¶
func (c *Kafka) Verify(configErrs *ConfigErrors, isMonolith bool)
type KeyPerspective ¶
type KeyPerspective struct { // The server name of the perspective key server ServerName gomatrixserverlib.ServerName `yaml:"server_name"` // Server keys for the perspective user, used to verify the // keys have been signed by the perspective server Keys []KeyPerspectiveTrustKey `yaml:"keys"` }
type KeyPerspectiveTrustKey ¶
type KeyPerspectiveTrustKey struct { // The key ID, e.g. ed25519:auto KeyID gomatrixserverlib.KeyID `yaml:"key_id"` // The public key in base64 unpadded format PublicKey string `yaml:"public_key"` }
type KeyPerspectives ¶
type KeyPerspectives []KeyPerspective
KeyPerspectives are used to configure perspective key servers for retrieving server keys.
type KeyServer ¶
type KeyServer struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` Database DatabaseOptions `yaml:"database"` }
func (*KeyServer) Verify ¶
func (c *KeyServer) Verify(configErrs *ConfigErrors, isMonolith bool)
type LogrusHook ¶
type LogrusHook struct { // The type of hook, currently only "file" is supported. Type string `yaml:"type"` // The level of the logs to produce. Will output only this level and above. Level string `yaml:"level"` // The parameters for this hook. Params map[string]interface{} `yaml:"params"` }
LogrusHook represents a single logrus hook. At this point, only parsing and verification of the proper values for type and level are done. Validity/integrity checks on the parameters are done when configuring logrus.
type MSCs ¶
type MSCs struct { Matrix *Global `yaml:"-"` // The MSCs to enable, currently only `msc2836` is supported. MSCs []string `yaml:"mscs"` Database DatabaseOptions `yaml:"database"` }
func (*MSCs) Verify ¶
func (c *MSCs) Verify(configErrs *ConfigErrors, isMonolith bool)
type MediaAPI ¶
type MediaAPI struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` ExternalAPI ExternalAPIOptions `yaml:"external_api"` // The MediaAPI database stores information about files uploaded and downloaded // by local users. It is only accessed by the MediaAPI. Database DatabaseOptions `yaml:"database"` // The base path to where the media files will be stored. May be relative or absolute. BasePath Path `yaml:"base_path"` // The absolute base path to where media files will be stored. AbsBasePath Path `yaml:"-"` // The maximum file size in bytes that is allowed to be stored on this server. // Note: if max_file_size_bytes is set to 0, the size is unlimited. // Note: if max_file_size_bytes is not set, it will default to 10485760 (10MB) MaxFileSizeBytes *FileSizeBytes `yaml:"max_file_size_bytes,omitempty"` // Whether to dynamically generate thumbnails on-the-fly if the requested resolution is not already generated DynamicThumbnails bool `yaml:"dynamic_thumbnails"` // The maximum number of simultaneous thumbnail generators. default: 10 MaxThumbnailGenerators int `yaml:"max_thumbnail_generators"` // A list of thumbnail sizes to be pre-generated for downloaded remote / uploaded content ThumbnailSizes []ThumbnailSize `yaml:"thumbnail_sizes"` }
func (*MediaAPI) Verify ¶
func (c *MediaAPI) Verify(configErrs *ConfigErrors, isMonolith bool)
type Metrics ¶
type Metrics struct { // Whether or not the metrics are enabled Enabled bool `yaml:"enabled"` // Use BasicAuth for Authorization BasicAuth struct { // Authorization via Static Username & Password // Hardcoded Username and Password Username string `yaml:"username"` Password string `yaml:"password"` } `yaml:"basic_auth"` }
The configuration to use for Prometheus metrics
func (*Metrics) Verify ¶
func (c *Metrics) Verify(configErrs *ConfigErrors, isMonolith bool)
type OldVerifyKeys ¶
type OldVerifyKeys struct { // Path to the private key. PrivateKeyPath Path `yaml:"private_key"` // The private key itself. PrivateKey ed25519.PrivateKey `yaml:"-"` // The key ID of the private key. KeyID gomatrixserverlib.KeyID `yaml:"-"` // When the private key was designed as "expired", as a UNIX timestamp // in millisecond precision. ExpiredAt gomatrixserverlib.Timestamp `yaml:"expired_at"` }
type Proxy ¶
type Proxy struct { // Is the proxy enabled? Enabled bool `yaml:"enabled"` // The protocol for the proxy (http / https / socks5) Protocol string `yaml:"protocol"` // The host where the proxy is listening Host string `yaml:"host"` // The port on which the proxy is listening Port uint16 `yaml:"port"` }
The config for setting a proxy to use for server->server requests
func (*Proxy) Verify ¶
func (c *Proxy) Verify(configErrs *ConfigErrors)
type RateLimiting ¶
type RateLimiting struct { // Is rate limiting enabled or disabled? Enabled bool `yaml:"enabled"` // How many "slots" a user can occupy sending requests to a rate-limited // endpoint before we apply rate-limiting Threshold int64 `yaml:"threshold"` // The cooloff period in milliseconds after a request before the "slot" // is freed again CooloffMS int64 `yaml:"cooloff_ms"` }
func (*RateLimiting) Defaults ¶
func (r *RateLimiting) Defaults()
func (*RateLimiting) Verify ¶
func (r *RateLimiting) Verify(configErrs *ConfigErrors)
type RoomServer ¶
type RoomServer struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` Database DatabaseOptions `yaml:"database"` }
func (*RoomServer) Defaults ¶
func (c *RoomServer) Defaults()
func (*RoomServer) Verify ¶
func (c *RoomServer) Verify(configErrs *ConfigErrors, isMonolith bool)
type SigningKeyServer ¶
type SigningKeyServer struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` // The SigningKeyServer database caches the public keys of remote servers. // It may be accessed by the FederationAPI, the ClientAPI, and the MediaAPI. Database DatabaseOptions `yaml:"database"` // Perspective keyservers, to use as a backup when direct key fetch // requests don't succeed KeyPerspectives KeyPerspectives `yaml:"key_perspectives"` // Should we prefer direct key fetches over perspective ones? PreferDirectFetch bool `yaml:"prefer_direct_fetch"` }
func (*SigningKeyServer) Defaults ¶
func (c *SigningKeyServer) Defaults()
func (*SigningKeyServer) Verify ¶
func (c *SigningKeyServer) Verify(configErrs *ConfigErrors, isMonolith bool)
type SyncAPI ¶
type SyncAPI struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` ExternalAPI ExternalAPIOptions `yaml:"external_api"` Database DatabaseOptions `yaml:"database"` RealIPHeader string `yaml:"real_ip_header"` }
func (*SyncAPI) Verify ¶
func (c *SyncAPI) Verify(configErrs *ConfigErrors, isMonolith bool)
type TURN ¶
type TURN struct { // TODO Guest Support // Whether or not guests can request TURN credentials // AllowGuests bool `yaml:"turn_allow_guests"` // How long the authorization should last UserLifetime string `yaml:"turn_user_lifetime"` // The list of TURN URIs to pass to clients URIs []string `yaml:"turn_uris"` // The shared secret from coturn SharedSecret string `yaml:"turn_shared_secret"` // Authorization via Static Username & Password // Hardcoded Username and Password Username string `yaml:"turn_username"` Password string `yaml:"turn_password"` }
func (*TURN) Verify ¶
func (c *TURN) Verify(configErrs *ConfigErrors)
type ThumbnailSize ¶
type ThumbnailSize struct { // Maximum width of the thumbnail image Width int `yaml:"width"` // Maximum height of the thumbnail image Height int `yaml:"height"` // ResizeMethod is one of crop or scale. // crop scales to fill the requested dimensions and crops the excess. // scale scales to fit the requested dimensions and one dimension may be smaller than requested. ResizeMethod string `yaml:"method,omitempty"` }
ThumbnailSize contains a single thumbnail size configuration
type UserAPI ¶
type UserAPI struct { Matrix *Global `yaml:"-"` InternalAPI InternalAPIOptions `yaml:"internal_api"` // The Account database stores the login details and account information // for local users. It is accessed by the UserAPI. AccountDatabase DatabaseOptions `yaml:"account_database"` // The Device database stores session information for the devices of logged // in local users. It is accessed by the UserAPI. DeviceDatabase DatabaseOptions `yaml:"device_database"` }
func (*UserAPI) Verify ¶
func (c *UserAPI) Verify(configErrs *ConfigErrors, isMonolith bool)