sessdata

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PermissionCacheKey 权限缓存Key前缀
	PermissionCacheKey = `customer:permission:`
	// LeftNavigateCacheKey 左边栏菜单缓存Key前缀
	LeftNavigateCacheKey = `customer:navigate:left:`
	// TopNavigateCacheKey 顶部菜单缓存Key前缀
	TopNavigateCacheKey = `customer:navigate:top:`
)
View Source
var (
	URLFor                 = top.URLFor
	AbsoluteURL            = top.AbsoluteURL
	ImageProxyURL          = top.ImageProxyURL
	ResizeImageURL         = top.ResizeImageURL
	PictureWithDefaultHTML = top.PictureWithDefaultHTML
	OutputContent          = top.OutputContent
)

Functions

func AdminUID

func AdminUID(c echo.Context) uint

AdminUID 后台管理员用户ID

func AgentLevel

AgentLevel 前台会员客户代理登记信息

func CheckPerm

func CheckPerm(ctx echo.Context, route string) error

CheckPerm 检查指定路由的权限

func ClearPermissionCache

func ClearPermissionCache(ctx context.Context, customerID uint64)

ClearPermissionCache 删除用户的权限缓存

func Customer

Customer 前台会员客户信息

func IsAdmin

func IsAdmin(c echo.Context) bool

IsAdmin 是否后台管理员

func User

func User(c echo.Context) *dbschema.NgingUser

User 后台用户信息

Types

This section is empty.

Jump to

Keyboard shortcuts

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