Documentation ¶
Index ¶
- Variables
- func CurrentUser(c *gin.Context) *model.User
- func Icon(name string) (html string, err error)
- func RenderErrTemplate(c *gin.Context, tmpl string, err error)
- func RenderReadme(s string) (string, error)
- func RenderTemplate(c *gin.Context, fn, title string, data map[string]interface{})
- func Template(tmplName, title string) gin.HandlerFunc
- func TemplateM(tmplName string, m map[string]interface{}) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoTmplReference = errors.New("page template value is nil")
)
TODO: make it settings
Functions ¶
func CurrentUser ¶
CurrentUser returns the full User object when logged in or nil otherwise
func Icon ¶
Icon returns the html code (as inline svg) for a icon from our icon library this function gets called by the templates
func RenderErrTemplate ¶
RenderErrTemplate renders a page with error information
func RenderReadme ¶
RenderReadme renders a Markdown document to a string
func RenderTemplate ¶
RenderTemplate renders a go template
func Template ¶
func Template(tmplName, title string) gin.HandlerFunc
Template returns a http.HandlerFunc to render a specific template w/o further parameters
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.