Documentation
¶
Overview ¶
Package config parses JSON configuration files and exports the Config struct for server-side use and the ClientConfig struct, for JSON stringification and passing to the client,
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientConfig []byte
ClientConfig exports public settings all clients can access
View Source
var Hash string
Hash stores the truncated MD5 hash of Config
Functions ¶
Types ¶
type Server ¶
type Server struct {
HTTP struct {
Addr, Origin, Cert, Key string
SSL, TrustProxies, Gzip bool
}
Rethinkdb struct {
Addr, Db string
}
Boards struct {
Enabled []string
Boards map[string]struct {
MaxThreads, MaxBump int
Title string
}
Default, Staff string
Psuedo, Links [][2]string
Prune bool
}
Lang struct {
Enabled []string
Default string
}
Staff struct {
Classes map[string]StaffClass
Keyword string
SessionTime int
}
Images struct {
Max struct {
Size, Width, Height, Pixels int64
}
JpegQuality uint8
PngQuality string
WebmAudio bool
Hats bool
DuplicateThreshold uint8
Spoilers []uint8
Formats map[string]bool
}
Posts struct {
Salt, ExcludeRegex string
ThreadCreationCooldown, MaxSubjectLength int
ReadOnly, SageEnabled, ForcedAnon bool
}
Recaptcha struct {
Public, Private string
}
Banners, FAQ, Eightball []string
Radio, Pyu, IllyaDance bool
FeedbackEmail, DefaultCSS, Frontpage, InfoBanner, InjectJSPath string
}
Server stores the global configuration. It is loaded only once during start up and considered implicitly immutable during the rest of runtime.
var Config Server
Config contains currently loaded server configuration
Click to show internal directories.
Click to hide internal directories.