SrirachaVersion is the version of the software. In official releases, this variable is replaced during compilation with the version of the release.
var SrirachaVersion = "DEV"
func FormatValue(v interface{}) interface{}
FormatValue formats a value as a human-readable string.
NewsOption represents a News setting option.
type NewsOption int
News options.
const (
NewsDisable NewsOption = 0
NewsWriteToNews NewsOption = 1
NewsWriteToIndex NewsOption = 2
)
Server is the Sriracha imageboard and forum server.
type Server struct {
Boards []*Board
// contains filtered or unexported fields
}
func NewServer() *Server
NewServer returns a new server.
func (s *Server) Run() error
Run initializes the server and starts listening for connections.
func (s *Server) Stop()
Stop shuts down the server gracefully.
ServerOptions represents server configuration options and related data.
type ServerOptions struct {
SiteName string
SiteHome string
News NewsOption
BoardIndex bool
CAPTCHA bool
Refresh int
Uploads []*UploadType
Embeds [][2]string
OekakiWidth int
OekakiHeight int
Overboard string
OverboardType BoardType
OverboardThreads int
OverboardReplies int
Identifiers bool
Locale string
Locales map[string]string
LocalesSorted []string
Access map[string]string
Banners map[int][]*Banner
Notifications bool
DevMode bool
FuncMaps map[string]template.FuncMap
}
func (opt *ServerOptions) DefaultLocaleName() string
DefaultLocaleName returns the name of the configured default locale.