Documentation ¶
Index ¶
Constants ¶
const Production = true
Production can be used to determain different aspects at compile time (like hot template reloading)
Variables ¶
var ( Assets http.FileSystem Templates http.FileSystem )
Functions ¶
func LoadOrCreateCSRFSecret ¶
LoadOrCreateCSRFSecret either loads the bytes from $repo/web/csrf-secret or creates a new file with suitable keys in it
func LoadOrCreateCookieSecrets ¶
func LoadOrCreateCookieSecrets(repo repo.Interface) ([]securecookie.Codec, error)
LoadOrCreateCookieSecrets either parses the bytes from $repo/web/cookie-secret or creates a new file with suitable keys in it
func TemplateFuncs ¶
TemplateFuncs returns a map of template functions
Types ¶
type URLMaker ¶
func NewURLTo ¶
func NewURLTo(appRouter *mux.Router, netInfo network.ServerEndpointDetails) URLMaker
NewURLTo returns a template helper function for a router. It is usually called with one parameter, the route name, which should be defined in the router package. If it's called with more then one, it has a to be a pair of two values. (1, 3, 5, 7, etc.) The first value of such a pair is the placeholder name in the router (i.e. in '/our/routes/{id:[0-9]+}/test' it would be id ) and the 2nd value is the actual value that should be put in place of the placeholder.
Directories ¶
Path | Synopsis |
---|---|
Package errors defines some well defined errors, like incomplete/wrong request data or object not found(404), for the purpose of internationalization.
|
Package errors defines some well defined errors, like incomplete/wrong request data or object not found(404), for the purpose of internationalization. |
admin
Package admin implements the dashboard for admins and moderators to change and control aspects of the room.
|
Package admin implements the dashboard for admins and moderators to change and control aspects of the room. |
Package i18n wraps around github.com/nicksnyder/go-i18n mostly so that we don't have to deal with i18n.LocalizeConfig struct literals everywhere.
|
Package i18n wraps around github.com/nicksnyder/go-i18n mostly so that we don't have to deal with i18n.LocalizeConfig struct literals everywhere. |
Package members implements helpers for accessing the currently logged in admin or moderator of an active request.
|
Package members implements helpers for accessing the currently logged in admin or moderator of an active request. |
Package webassert contains test helpers to the check the rooms web pages for certain aspects.
|
Package webassert contains test helpers to the check the rooms web pages for certain aspects. |