package
4.0.0+incompatible
Repository: https://github.com/gochan-org/gochan.git
Documentation: pkg.go.dev
# Functions
DeleteBoardConfig removes the custom board configuration data, normally should be used when a board is deleted.
GetBoardConfig returns the custom configuration for the specified board (if it exists) or the global board configuration if board is an empty string or it doesn't exist.
GetSiteConfig returns the global site configuration (site name, slogan, etc).
GetSQLConfig returns SQL configuration info.
GetSystemCriticalConfig returns system-critical configuration options like listening IP It returns a value instead of a pointer, because it is not usually safe to edit while Gochan is running.
GetUser returns the IDs of the user and group gochan should be acting as when creating files.
No description provided by the author
InitConfig loads and parses gochan.json on startup and verifies its contents.
No description provided by the author
No description provided by the author
SetBoardConfig applies the configuration to the given board.
SetRandomSeed is usd to set a deterministic seed to make testing easier.
SetSiteConfig sets the site configuration values in testing.
SetSystemCriticalConfig sets system critical configuration values in testing.
SetTestDBConfig sets up the database configuration for a testing environment.
SetTestTemplateDir sets the directory for templates, used only in testing.
No description provided by the author
SetVersion should only be used for tests, where a config file wouldn't be loaded.
No description provided by the author
No description provided by the author
UpdateBoardConfig updates or establishes the configuration for the given board.
No description provided by the author
WebPath returns an absolute path, starting at the web root (which is "/" by default).
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
BoardConfig contains information about a specific board to be stored in /path/to/board/board.json If a board doesn't have board.json, the site's default board config (with values set in gochan.json) will be used.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InvalidValueError represents a GochanConfig field with a bad value.
MissingField represents a field missing from the configuration file.
No description provided by the author
No description provided by the author
SiteConfig contains information about the site/community, e.g.
No description provided by the author
Style represents a theme (Pipes, Dark, etc).
SystemCriticalConfig contains configuration options that are extremely important, and fucking with them while
the server is running could have site breaking consequences.
No description provided by the author