Documentation
¶
Overview ¶
Package server exposes the CMS core over a JSON HTTP API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Users authkit.AdminStore
// Posts persists the content the CMS serves.
Posts post.Store
// Plugins maps a plugin id to its HTTP handler.
Plugins map[string]http.Handler
// PluginPublicPaths maps a plugin id to its session-exempt paths.
PluginPublicPaths map[string][]string
// Web serves the single-page app under the admin base path. Nil leaves the admin paths unhandled.
Web fs.FS
// SiteTitle names the public site in its chrome.
SiteTitle string
// TrustedProxies lists the CIDR ranges trusted to set X-Forwarded-For.
TrustedProxies []string
// Theme serves the public site while it is healthy. Nil leaves the built-in renderer serving.
Theme Theme
// ThemeTimeout is how long a theme has to begin answering. Zero applies the default.
ThemeTimeout time.Duration
// Version is the application version reported at /api/version.
Version string
}
Config carries the stores and plugin surfaces the server serves.
Click to show internal directories.
Click to hide internal directories.