Documentation ¶
Overview ¶
Package casbin implements the functions, types, and interfaces for the module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultModel ¶
func DefaultModel() string
func DefaultPolicy ¶
func DefaultPolicy() []byte
func NewAdapter ¶
func NewAuthorizer ¶
Types ¶
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
Authorizer is a struct that implements the Authorizer interface.
func (*Authorizer) ApplyDefaults ¶
func (auth *Authorizer) ApplyDefaults() error
func (*Authorizer) Authorized ¶
func (auth *Authorizer) Authorized(ctx context.Context, claims security.UserClaims) (bool, error)
func (*Authorizer) WithConfig ¶
func (auth *Authorizer) WithConfig(config *configv1.AuthZConfig_CasbinConfig) error
type Setting ¶
type Setting = func(*Authorizer)
Setting is a function type for setting the Authenticator.
func WithFileModel ¶
func WithModel ¶
func WithModel(model casbinmodel.Model) Setting
func WithNameModel ¶
func WithPolicyAdapter ¶
func WithStringModel ¶
Click to show internal directories.
Click to hide internal directories.