Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorsFromBase64 ¶
func InitializeDetectors ¶
func InitializeDetectors() regexes
InitializeDetectors is heavy and should be initialized once only
func MarkDowner ¶
func MarkDowner(policy *bluemonday.Policy) func(string) template.HTML
Types ¶
type ClientConfig ¶
type ClientConfig struct { Enabled bool Markdown bool // Is markdown allowed on this pod ? PublicPods bool SpecificPods bool SpecificPodsList []string // List of pods requested by the user SpecificPodsListString string // List of pods requested by the user and displayed back into the field AllPodsList []Pod // List of all pods (public + requested) }
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 ContentPolicy *bluemonday.Policy // Loaded on server startup, defines user's input policy }
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.
func (*Service) UpdateClientPodsList ¶
func (s *Service) UpdateClientPodsList()
Click to show internal directories.
Click to hide internal directories.