Documentation
¶
Index ¶
- func GetSession(c *fiber.Ctx) (*session.Session, error)
- func GetSessionIDFromSession(c *fiber.Ctx) (sessionID string, ok bool)
- func GetStore() *session.Store
- func GetUserIDFromSession(c *fiber.Ctx) (userID int64, ok bool)
- func RedisSessionAuthenticate(c *fiber.Ctx) error
- func RedisSessionAuthorize(c *fiber.Ctx) error
- func WebsocketConnect() fiber.Handler
- func WebsocketGetSession(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSession ¶
GetSession 获得当前 ctx 中的 session
func GetSessionIDFromSession ¶
func GetUserIDFromSession ¶
GetUserIDFromSession 从 ctx 中的 session 中获取当前 userID
func RedisSessionAuthenticate ¶
func RedisSessionAuthenticate(c *fiber.Ctx) error
RedisSessionAuthenticate 使用 redis 的验证用户身份的中间件
func RedisSessionAuthorize ¶
func RedisSessionAuthorize(c *fiber.Ctx) error
RedisSessionAuthorize 使用 redis 的检验用户权限的中间件
func WebsocketConnect ¶
func WebsocketConnect() fiber.Handler
func WebsocketGetSession ¶
func WebsocketGetSession(c *fiber.Ctx) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.