middleware

package
v0.0.0-...-73ddb9c Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSession

func GetSession(c *fiber.Ctx) (*session.Session, error)

GetSession 获得当前 ctx 中的 session

func GetSessionIDFromSession

func GetSessionIDFromSession(c *fiber.Ctx) (sessionID string, ok bool)

func GetStore

func GetStore() *session.Store

GetStore 获得 redis 数据库连接

func GetUserIDFromSession

func GetUserIDFromSession(c *fiber.Ctx) (userID int64, ok bool)

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.

Jump to

Keyboard shortcuts

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