webiface

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IrpcCheckAllowed

type IrpcCheckAllowed interface {
	// 测试开关、是否检查权限,方便测试可以关闭
	IfCheckRes() bool
	IfCheckSession() bool

	// 根据token获取useid的实现
	RpcUserIdGetBySession(ctx *gin.Context, token string) (*webdto.WebUserId, error)

	// RPC 设置ctx上下文的CooUserID信息的实现
	RpcSetUserId(c *gin.Context) //set *webdto.WebUserId

	// RPC 获取ctx上下文的CooUserID信息的 实现
	RpcGetUserId(ctx *gin.Context) *webdto.WebUserId

	//rpc 检查权限的实现
	RpcCheckAllowed(ctx context.Context, req *webdto.WebCheckRequest) (*webdto.WebCheckResult, error)
}

type IwebCheckAllowed

type IwebCheckAllowed interface {
	SetUserId(c *gin.Context)

	GetUserId(ctx *gin.Context) *webdto.WebUserId

	CheckToken(c *gin.Context) (int, error)

	GetSessionToken(c *gin.Context) (int, *webdto.WebUserId, error)

	WebCheckAllowed(c *gin.Context)
}

应用服务上下文获取信息

Jump to

Keyboard shortcuts

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