Versions in this module Expand all Collapse all v0 v0.0.1 Aug 5, 2018 Changes in this version + func CheckPermissions(user User, ctx *fasthttp.RequestCtx) bool + func ComparePassword(comPwd []byte, pwdHash string) bool + func DelCookie(ctx *fasthttp.RequestCtx) bool + func EncodePassword(pwd []byte) string + func GenerateSessionId() string + func GetPermissions(role_id interface{}) []map[string]interface + func InMethodArr(arr []string, str string) bool + func SetCookie(ctx *fasthttp.RequestCtx, user User) bool + type Permission struct + Method []string + Path []string + type SessionHelper struct + Sess sessions.Session + func InitSessionHelper(ctx *fasthttp.RequestCtx) *SessionHelper + func (helper *SessionHelper) GetUserIdFromSession(cookieSec string) (id string) + func (helper *SessionHelper) PutIntoSession(value string) string + type User struct + Avatar string + CreateAt string + ID string + Level string + LevelName string + Name string + Permissions []Permission + func Check(password []byte, username string) (user User, ok bool) + func Filter(ctx *fasthttp.RequestCtx) (User, bool, bool) + func GetCurUserById(id string) (user User, ok bool)