Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewAuthz, DefaultOptions)
ProviderSet 是一个 Wire 的 Provider 集合,用于声明依赖注入的规则。Add commentMore actions 包含 NewAuthz 构造函数,用于生成 Authz 实例。
Functions ¶
Types ¶
type Authz ¶
type Authz struct {
*casbin.SyncedEnforcer // 使用 Casbin 的同步授权器
}
Authz 定义了一个授权器,提供授权功能.
type Option ¶
type Option func(*authzConfig)
Option 定义了一个函数选项类型,用于自定义 NewAuthz 的行为.
func WithAutoLoadPolicyTime ¶
WithAutoLoadPolicyTime 允许通过选项自定义自动加载策略的时间间隔.
Click to show internal directories.
Click to hide internal directories.