Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Templater = tmplutil.Preregister(&tmplutil.Templater{ FileSystem: webFS, Includes: map[string]string{ "css": "components/css.html", "header": "components/header.html", "footer": "components/footer.html", }, Functions: funcs, })
Templater is the global template tree.
Functions ¶
Types ¶
type Middleware ¶
Middleware is the type for a middleware.
func InjectConfig ¶
func InjectConfig(config RenderConfig) Middleware
InjectConfig injects the render config.
type RenderConfig ¶
type RenderConfig struct { csufbot.Store config.Site Discord *bot.Discord Services []config.Service }
RenderConfig is the config to render with.
func GetRenderConfig ¶
func GetRenderConfig(ctx context.Context) RenderConfig
GetRenderConfig gets the render config from the given context. It panics if the config is not available.
func (RenderConfig) FindService ¶
func (rcfg RenderConfig) FindService(host string) *config.Service
FindService finds the LMS service from a given name hash.
Directories ¶
Path | Synopsis |
---|---|
components
|
|
admin
Package admin contains routes for guild owners to set up their guilds.
|
Package admin contains routes for guild owners to set up their guilds. |
sync
Package sync contains routes for users to sync courses from LMS services into their account.
|
Package sync contains routes for users to sync courses from LMS services into their account. |
Click to show internal directories.
Click to hide internal directories.