Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeDetectors ¶
func InitializeDetectors() regexes
InitializeDetectors is heavy and should be initialized once only
Types ¶
type ClientConfig ¶
type GeneralConfig ¶
type ServerConfig ¶
type ServerConfig struct { Enabled bool Port int64 // Port to listen Debug bool // Enable/disable some parameters (limiter, logging...) Private bool // If set true, a public key must have been uploaded on the server LockedByDefault bool // If set to true, the post route will be disabled TrustedKeys []string // Trusted keys, without heavy limitations }
type Service ¶
type Service struct { DB *gorm.DB GeneralConfig GeneralConfig // Only loaded on start up - public information ServerConfig ServerConfig // Only loaded on start up - private configuration ClientConfig ClientConfig // Can be modified by clients requests and is reset between 2 requests Regexes regexes // It is here because it is loaded only on server startup }
The Service struct is used to store server information. Note that it is (should be) only used as a data provider. Storing state is a bad idea.
Click to show internal directories.
Click to hide internal directories.