github.com/euroteltr/rbac (go): Package rbac is role based access control library. At core uses `sync.Map` so, it can be used from multiple goroutines concurrently.package rbac  rbac is dependend on these terms:  Usage:  Library usage has 2 phases:  First get an instance for `RBAC`  During development you will register your permissions for your each resource with valid actions for that permission:  `userPerm` is defined with CRUD actions, which means that any action not in that list will be invalid. You can define your own actions( like `ApproveAction := rbac.Action("approve")`) and add them also.  Runtime Phase:  At run time we define our roles and permit permissions to them.  Now we can check if a role is granted some permission:  `rbac.RBAC` is `json` compatible. You can dump all data in `RBAC` instance to JSON:  Also you can use builtin SaveJSON function to save to a io.Writer:  And load it from file:  In dumped JSON root "permissions" part is for reference. Root `roles` is the part you can modify in file and reload it to define `Role`s with `Permission`s.  A `Role` can have parent `Role`s. You can add a parent `Role` like this:  If circular parent reference is found, you'll get error while running `AddParent`.
Keywords: echo-framework|golang|middleware|permissions|rbac|role