Documentation ¶
Index ¶
- func CheckHashPassword(hash, password string) bool
- func ClearSession(c echo.Context) (err error)
- func GetAdmin(c echo.Context) (session_gorilla *sessions.Session, err error)
- func GetAuth(c echo.Context) (session_gorilla *sessions.Session, err error)
- func GetFlash(c echo.Context, name string) (flashes []string)
- func GetFlashError(c echo.Context) []string
- func GetFlashSuccess(c echo.Context) []string
- func IsAdmin(is_auth_type interface{}) bool
- func IsUser(is_auth_type interface{}) bool
- func PasswordHash(password string) (string, error)
- func RefreshSession(user models.User, c echo.Context) (session_gorilla *sessions.Session, err error)
- func SetFlash(c echo.Context, name, value string)
- func SetFlashError(c echo.Context, error string)
- func SetFlashSuccess(c echo.Context, success string)
- func SetSession(user models.User, c echo.Context) (session_gorilla *sessions.Session, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHashPassword ¶
CheckHashPassword: hash for password to bool
func ClearSession ¶
func ClearSession(c echo.Context) (err error)
ClearSession: delete session from User
func GetFlashError ¶
func GetFlashError(c echo.Context) []string
GetFlashError: get session for flash message: []error
func GetFlashSuccess ¶
func GetFlashSuccess(c echo.Context) []string
GetFlashSuccess: get session for flash messages: []success
func IsAdmin ¶
func IsAdmin(is_auth_type interface{}) bool
IsAdmin: allows access only to authenticated administrators
func IsUser ¶
func IsUser(is_auth_type interface{}) bool
IsUser: allows access only to authenticated users
func PasswordHash ¶
PasswordHash: hash for password to string
func RefreshSession ¶
func RefreshSession(user models.User, c echo.Context) (session_gorilla *sessions.Session, err error)
RefreshSession: refresh session from User
func SetFlash ¶
func SetFlash(c echo.Context, name, value string)
SetFlash: set session for flash message
func SetFlashError ¶
func SetFlashError(c echo.Context, error string)
SetFlashError: get session for flash message: error
func SetFlashSuccess ¶
func SetFlashSuccess(c echo.Context, success string)
SetFlashSuccess: set session for flash message: success
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.