server

package
v1.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: LGPL-3.0 Imports: 60 Imported by: 0

Documentation

Overview

Package server is the Sriracha imageboard and forum server.

Index

Constants

This section is empty.

Variables

View Source
var SrirachaVersion = "DEV"

SrirachaVersion is the version of the software. In official releases, this variable is replaced during compilation with the version of the release.

Functions

func FormatValue

func FormatValue(v interface{}) interface{}

FormatValue formats a value as a human-readable string.

Types

type NewsOption

type NewsOption int

NewsOption represents a News setting option.

const (
	NewsDisable      NewsOption = 0
	NewsWriteToNews  NewsOption = 1
	NewsWriteToIndex NewsOption = 2
)

News options.

type Server

type Server struct {
	Boards []*Board
	// contains filtered or unexported fields
}

Server is the Sriracha imageboard and forum server.

func NewServer

func NewServer() *Server

NewServer returns a new server.

func (*Server) Run

func (s *Server) Run() error

Run initializes the server and starts listening for connections.

func (*Server) Stop added in v1.3.3

func (s *Server) Stop()

Stop shuts down the server gracefully.

type ServerOptions

type ServerOptions struct {
	SiteName         string
	SiteHome         string
	SiteIndex        bool
	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
	Rules            map[int][]template.HTML
	Notifications    bool
	DevMode          bool
	FuncMaps         map[string]template.FuncMap
}

ServerOptions represents server configuration options and related data.

func (*ServerOptions) DefaultLocaleName

func (opt *ServerOptions) DefaultLocaleName() string

DefaultLocaleName returns the name of the configured default locale.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL