Skip to content

kilosonc/yaml-adapter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yaml-adapter

ci

Yaml Adapter is a yaml adapter for Casbin-rs. With this library, Casbin can load policy from yaml fromat file or save policy into it with fully asynchronous support.

Dependency

Add following to Cargo.toml

yaml-adapter = { version = "0.1.0", features = "runtime-async-std" }
async-std = "1.5.0"

for using tokio

yaml-adapter = { version = "0.1.0", features = "runtime-tokio" }
tokio = "0.3.1"

Examples

let adapter = YamlAdapter::new("examples/rbac_policy.yaml");
let e = Enforcer::new(m, adapter).await.unwrap();

for policy file configuration, please refer to example

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%