Skip to content

Soluto/casbin-nats-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

casbin-nats-watcher

License: MIT Go Report Card Build Status Coverage Status Godoc

Casbin watcher implementation with Nats.io

Installation

go get github.com/Soluto/casbin-nats-watcher

Usage

import (
    natswatcher "github.com/Soluto/casbin-nats-watcher"
    "github.com/casbin/casbin"
)

func main() {
    watcher, _ := natswatcher.NewWatcher("http://nats-endpoint", "my-policy-subject")

    enforcer := casbin.NewSyncedEnforcer("model.conf", "policy.csv")
    enforcer.SetWatcher(watcher)
}

Related pojects

Additional Usage Examples

For real-world example visit Tweek.

License

This project is under MIT License. See the LICENSE file for the full license text.

About

Casbin watcher implementation with Nats.io

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages