utils

package
v0.0.0-...-cc62b53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTMLSanitizer = bluemonday.UGCPolicy()

HTMLSanitizer HTML sanitizer

Functions

func AddFlashMessage

func AddFlashMessage(w http.ResponseWriter, req *http.Request, message string, mtype string) error

AddFlashMessage helper

func AddFuncMapMaker

func AddFuncMapMaker(view *render.Render) *render.Render

AddFuncMapMaker add FuncMapMaker to view

func GetCurrentLocale

func GetCurrentLocale(req *http.Request) string

GetCurrentLocale get current locale from request

func GetCurrentUser

func GetCurrentUser(req *http.Request) *users.User

GetCurrentUser get current user from request

func GetDB

func GetDB(req *http.Request) *gorm.DB

GetDB get DB from request

func GetEditMode

func GetEditMode(w http.ResponseWriter, req *http.Request) bool

GetEditMode get edit mode

func URLParam

func URLParam(name string, req *http.Request) string

URLParam get url params from request

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL