Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handlers = map[string]func(logger *slog.Logger, u, cacheControle string) http.Handler{ "f": handlers.File, "m": handlers.Cache, "r": handlers.Redirect, "s": handlers.Secure, "p": handlers.ReverseProxy, }
Map of config handlers. The key is used in the config file. The value is used when initiate the server to create the handlers.
You can add your cutom handler to this map at init.
Functions ¶
Types ¶
type Config ¶
type Handler ¶
type Handler struct { // Type of the handler. // f: file // m: file with memory cache // r: redirect // s: redirect to HTTPS, ignore .U field // Future version // p: reverse proxy Type string `toml:"t"` // A URL, for file root, URL for redirect or reverse serv... URL string `toml:"u"` // Cache control instruction. Cache string `toml:"c"` }
Click to show internal directories.
Click to hide internal directories.