Documentation
¶
Overview ¶
@Author daixk 2025/12/22 15:56:00
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorCodeAndMessage ¶
GetErrorCodeAndMessage maps core errors to stable integration responses. GetErrorCodeAndMessage 将核心错误映射为稳定的集成层响应。
func GetManager ¶
GetManager resolves manager by auth type GetManager 根据 authType 获取对应的 Manager。
Types ¶
type LogicType ¶
type LogicType string
LogicType defines auth check logic type LogicType 定义认证检查逻辑类型。
type Request ¶
type Request struct {
// TokenValue is the request token TokenValue 是当前请求携带的 Token。
TokenValue string
// CheckLogin indicates whether login state must be checked CheckLogin 表示是否必须校验登录态。
CheckLogin bool
// CheckDisable indicates whether account disable state must be checked CheckDisable 表示是否校验账号封禁状态。
CheckDisable bool
// Permissions lists required permissions Permissions 表示本次请求需要的权限列表。
Permissions []string
// Roles lists required roles Roles 表示本次请求需要的角色列表。
Roles []string
// LogicType controls AND/OR checks for permissions and roles LogicType 控制权限和角色的 AND/OR 逻辑。
LogicType LogicType
// LoginError is returned when IsLogin is false LoginError 是登录态校验失败时返回的错误。
LoginError error
}
Request describes one integration auth check Request 描述一次集成层认证检查。
Click to show internal directories.
Click to hide internal directories.