Documentation
¶
Overview ¶
Package authz provides authorization functionality using Casbin for access control with RBAC (Role-Based Access Control) model and GORM database integration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ProviderSet = wire.NewSet(NewAuthz, DefaultOptions)
ProviderSet is a Wire Provider set used to declare dependency injection rules. Contains the NewAuthz constructor for generating Authz instances.
Functions ¶
This section is empty.
Types ¶
type Authz ¶
type Authz struct {
*casbin.SyncedEnforcer // Uses Casbin's synchronized enforcer
}
Authz defines an authorizer that provides authorization functionality.
type Option ¶
type Option func(*authzConfig)
Option defines a function option type for customizing NewAuthz behavior.
func DefaultOptions ¶
func DefaultOptions() []Option
DefaultOptions provides default authorizer option configuration.
func WithAclModel ¶
WithAclModel allows customizing the ACL model through options.
func WithAutoLoadPolicyTime ¶
WithAutoLoadPolicyTime allows customizing the automatic policy loading time interval through options.