casbin

package
v1.101.8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

func NewAdapter

func NewAdapter(cfg *Config) persist.Adapter

NewCasbinAdapter for config.

func NewEnforcer added in v1.22.0

func NewEnforcer(m model.Model, a persist.Adapter) (*casbin.Enforcer, error)

NewCasbinEnforcer for config.

func NewModel added in v1.22.0

func NewModel(cfg *Config) (model.Model, error)

NewCasbinModel for config.

Types

type Config added in v1.22.0

type Config struct {
	Model  string `yaml:"model,omitempty" json:"model,omitempty" toml:"model,omitempty"`
	Policy string `yaml:"policy,omitempty" json:"policy,omitempty" toml:"policy,omitempty"`
}

Config for casbin.

Jump to

Keyboard shortcuts

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