Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDatabaseSettings ¶
func GetDatabaseSettings()
GetDatabaseSettings gets limits that are in the database
func LoadConfig ¶ added in v1.10.1
func LoadConfig() error
LoadConfig loads configuration from the config file
Types ¶
type CloudFlare ¶ added in v1.3.0
CloudFlare API settings
type Config ¶
type Config struct {
General General
Prim Prim
CloudFlare CloudFlare
Akismet Akismet
StopForumSpam StopForumSpam
Scamalytics Scamalytics
Amazon Amazon
Limits Limits
Session Session
}
Config holds the main configuration data
var Settings *Config
Settings holds an initialized settings with some sane defaults
type Limits ¶ added in v1.3.0
type Limits struct {
// Image settings
ImageMinWidth int
ImageMinHeight int
ImageMaxWidth int
ImageMaxHeight int
ImageMaxSize int
// avatar settings
AvatarMinWidth int
AvatarMinHeight int
AvatarMaxWidth int
AvatarMaxHeight int
AvatarMaxSize int
// webm settings
WebmMaxLength int
// Max posts in a thread
PostsMax uint
// Lengths for posting
CommentMaxLength int
CommentMinLength int
TitleMaxLength int
TitleMinLength int
NameMaxLength int
NameMinLength int
TagMaxLength int
TagMinLength int
PasswordMaxLength int
PasswordMinLength int
// Max thumbnail sizes
ThumbnailMaxWidth int
ThumbnailMaxHeight int
// Set default posts per page
PostsPerPage uint
// Set default threads per index page
ThreadsPerPage uint
// Add one to number because first post is included
PostsPerThread uint
// Max request parameter input size
ParamMaxSize uint
}
Limits for various items
type Scamalytics ¶ added in v1.7.9
Scamalytics settings
type Session ¶ added in v1.10.1
type Session struct {
// OldSecret is used for validating existing tokens during rotation
OldSecret string
// NewSecret is used for signing new tokens and validating tokens
NewSecret string
}
Session holds the secrets for JWT authentication
type StopForumSpam ¶ added in v1.3.0
type StopForumSpam struct {
Confidence float64
}
StopForumSpam settings
Click to show internal directories.
Click to hide internal directories.