Documentation ¶
Index ¶
- 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
- type SessionHelper
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermissions ¶
func CheckPermissions(user User, ctx *fasthttp.RequestCtx) bool
func ComparePassword ¶
func DelCookie ¶
func DelCookie(ctx *fasthttp.RequestCtx) bool
func EncodePassword ¶
func GenerateSessionId ¶
func GenerateSessionId() string
func GetPermissions ¶
func GetPermissions(role_id interface{}) []map[string]interface{}
func InMethodArr ¶
Types ¶
type Permission ¶
type SessionHelper ¶
func InitSessionHelper ¶
func InitSessionHelper(ctx *fasthttp.RequestCtx) *SessionHelper
func (*SessionHelper) GetUserIdFromSession ¶
func (helper *SessionHelper) GetUserIdFromSession(cookieSec string) (id string)
func (*SessionHelper) PutIntoSession ¶
func (helper *SessionHelper) PutIntoSession(value string) string
Click to show internal directories.
Click to hide internal directories.