sessdata

package
v0.0.0-...-dd75de5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: AGPL-3.0 Imports: 7 Imported by: 9

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, onlyBackendAdmin ...bool) uint

AdminUID 后台管理员用户ID

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, onlyBackendAdmin ...bool) bool

IsAdmin 是否是后台管理员或与后台管理员关联的客户

func IsBackendAdmin

func IsBackendAdmin(c echo.Context) bool

IsBackendAdmin 是否是后台管理元

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