2017-07-17 10:23:42 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "net/http"
|
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
var site = &Site{Name: "Magical Fairy Land"}
|
|
|
|
var db_config = DB_Config{Host: "localhost"}
|
2017-07-17 10:23:42 +00:00
|
|
|
var config Config
|
|
|
|
var dev DevConfig
|
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
type Site struct {
|
|
|
|
Name string
|
|
|
|
Email string
|
|
|
|
Url string
|
|
|
|
Port string
|
|
|
|
EnableSsl bool
|
2017-07-17 10:23:42 +00:00
|
|
|
EnableEmails bool
|
2017-09-10 16:57:22 +00:00
|
|
|
HasProxy bool
|
2017-07-17 10:23:42 +00:00
|
|
|
}
|
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
type DB_Config struct {
|
|
|
|
Host string
|
2017-07-17 10:23:42 +00:00
|
|
|
Username string
|
|
|
|
Password string
|
2017-09-10 16:57:22 +00:00
|
|
|
Dbname string
|
|
|
|
Port string
|
2017-07-17 10:23:42 +00:00
|
|
|
}
|
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
type Config struct {
|
|
|
|
SslPrivkey string
|
2017-07-17 10:23:42 +00:00
|
|
|
SslFullchain string
|
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
MaxRequestSize int
|
|
|
|
CacheTopicUser int
|
|
|
|
UserCacheCapacity int
|
2017-07-17 10:23:42 +00:00
|
|
|
TopicCacheCapacity int
|
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
SmtpServer string
|
2017-07-17 10:23:42 +00:00
|
|
|
SmtpUsername string
|
|
|
|
SmtpPassword string
|
2017-09-10 16:57:22 +00:00
|
|
|
SmtpPort string
|
2017-07-17 10:23:42 +00:00
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
DefaultRoute func(http.ResponseWriter, *http.Request, User)
|
|
|
|
DefaultGroup int
|
|
|
|
ActivationGroup int
|
|
|
|
StaffCss string
|
2017-07-17 10:23:42 +00:00
|
|
|
UncategorisedForumVisible bool
|
2017-09-10 16:57:22 +00:00
|
|
|
MinifyTemplates bool
|
|
|
|
MultiServer bool
|
2017-07-17 10:23:42 +00:00
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
Noavatar string
|
2017-07-17 10:23:42 +00:00
|
|
|
ItemsPerPage int
|
|
|
|
}
|
|
|
|
|
2017-09-10 16:57:22 +00:00
|
|
|
type DevConfig struct {
|
|
|
|
DebugMode bool
|
2017-07-17 10:23:42 +00:00
|
|
|
SuperDebug bool
|
2017-09-10 16:57:22 +00:00
|
|
|
Profiling bool
|
2017-07-17 10:23:42 +00:00
|
|
|
}
|