Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *jsondb.DB
DB is a reference to the parent app's JsonDB object.
Functions ¶
Types ¶
type Settings ¶
type Settings struct { // Only gets set to true on save(), this determines whether // the site has ever been configured before. Initialized bool `json:"initialized"` Site struct { Title string `json:"title"` Description string `json:"description"` AdminEmail string `json:"adminEmail"` NSFW bool `json:"nsfw"` URL string `json:"url"` } `json:"site"` // Security-related settings. Security struct { SecretKey string `json:"secretKey"` // Session cookie secret key HashCost int `json:"hashCost"` // Bcrypt hash cost for passwords } `json:"security"` // Blog settings. Blog struct { PostsPerPage int `json:"postsPerPage"` PostsPerFeed int `json:"postsPerFeed"` } `json:"blog"` // Redis settings for caching in JsonDB. Redis struct { Enabled bool `json:"enabled"` Host string `json:"host"` Port int `json:"port"` DB int `json:"db"` Prefix string `json:"prefix"` } `json:"redis"` // Mail settings Mail struct { Enabled bool `json:"enabled"` Sender string `json:"sender"` Host string `json:"host"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` } `json:"mail,omitempty"` }
Settings holds the global app settings.
Click to show internal directories.
Click to hide internal directories.