casbin

package module
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingClaims = errors.Forbidden(engine.Reason, "missing claims")
	ErrInvalidClaims = errors.Forbidden(engine.Reason, "invalid claims")
	ErrUnauthorized  = errors.Forbidden(engine.Reason, "unauthorized")
)
View Source
var DefaultRBACModel string

Functions

func NewAuthorizer

func NewAuthorizer(opts ...Option) (engine.Authorizer, error)

NewAuthorizer .

Types

type Option

type Option func(*options)

Option is Casbin option

func WithModel

func WithModel(model model.Model) Option

WithModel set Model for Casbin

func WithPolicy

func WithPolicy(policy persist.Adapter) Option

WithPolicy set Adapter for Casbin

func WithWatcher

func WithWatcher(watcher persist.Watcher) Option

WithWatcher set Watcher for Casbin

Jump to

Keyboard shortcuts

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