36 lines
820 B
Go
36 lines
820 B
Go
package yatwiki3
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type ServerOptions struct {
|
|
PageTitle string
|
|
ExpectBaseURL string
|
|
DefaultPage string
|
|
Timezone string
|
|
DateFormat string
|
|
DBFilePath string
|
|
FaviconFilePath string
|
|
AllowDBDownload bool
|
|
RecentChanges int
|
|
GzipCompressionLevel int
|
|
BannedUserIPRegexes []string
|
|
}
|
|
|
|
func DefaultOptions() *ServerOptions {
|
|
return &ServerOptions{
|
|
PageTitle: "YATWiki",
|
|
ExpectBaseURL: "/",
|
|
DefaultPage: "home",
|
|
Timezone: "UTC",
|
|
DateFormat: time.RFC822Z,
|
|
DBFilePath: "wiki.db",
|
|
FaviconFilePath: "", // no favicon
|
|
AllowDBDownload: true,
|
|
RecentChanges: 20,
|
|
GzipCompressionLevel: 9,
|
|
BannedUserIPRegexes: make([]string, 0),
|
|
}
|
|
}
|