Group the imports.
Cassandra Adapter is the Apache Cassandra DB adapter for Casbin. With this library, Casbin can load policy from Cassandra or save policy to it.
go get github.com/casbin/cassandra_adapter
package main import ( "github.com/casbin/casbin" "github.com/casbin/cassandra_adapter" ) func main() { // Initialize a Cassandra adapter and use it in a Casbin enforcer: a := cassandra_adapter.NewAdapter("192.168.41.130") // Your Cassandra hosts. e := casbin.NewEnforcer("examples/rbac_model.conf", a) e.Enforce("alice", "data1", "read") }
This project is under Apache 2.0 License. See the LICENSE file for the full license text.