File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 9
9
<PropertyGroup >
10
10
<PackageId >Casbin.Watcher.Redis</PackageId >
11
11
<PackageIcon >casbin.png</PackageIcon >
12
+ <PackageReadmeFile >README.md</PackageReadmeFile >
12
13
<Authors >Casbin.NET</Authors >
14
+ <Description >Redis watcher for Casbin.NET</Description >
13
15
<RepositoryType >GIT</RepositoryType >
14
16
<RepositoryUrl >https://github.com/casbin-net/redis-watcher</RepositoryUrl >
15
17
<Copyright >Apache License 2.0</Copyright >
32
34
<ItemGroup >
33
35
<None Include =" casbin.png" Pack =" true" Visible =" false" PackagePath =" " />
34
36
</ItemGroup >
37
+
38
+ <ItemGroup >
39
+ <None Include =" ../README.md" Pack =" true" PackagePath =" " />
40
+ </ItemGroup >
41
+
35
42
</Project >
Original file line number Diff line number Diff line change 1
1
# redis-watcher
2
+
3
+ [ ![ Actions Status] ( https://github.com/casbin-net/redis-watcher/workflows/Build/badge.svg )] ( https://github.com/casbin-net/redis-watcher/actions )
4
+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/casbin-net/redis-watcher/badge.svg?branch=master )] ( https://coveralls.io/github/casbin-net/redis-watcher?branch=master )
5
+ [ ![ License] ( https://img.shields.io/github/license/casbin-net/redis-watcher )] ( https://github.com/casbin-net/redis-watcher/blob/master/LICENSE )
6
+ [ ![ Build Version] ( https://img.shields.io/casbin-net.myget/casbin-net/v/Casbin.Watcher.Redis?label=Casbin.Watcher.Redis )] ( https://www.myget.org/feed/casbin-net/package/nuget/Casbin.Watcher.Redis )
7
+
2
8
Redis watcher for Casbin.NET
9
+
10
+ ## Installation
11
+
12
+ ```
13
+ dotnet add package Casbin.Watcher.Redis
14
+ ```
15
+
16
+ ## Simple Example
17
+
18
+ ``` csharp
19
+ using Casbin ;
20
+ using Redis .Casbin .NET ;
21
+
22
+ public class Program
23
+ {
24
+ public static void Main (string [] args )
25
+ {
26
+ // Initialize the watcher.
27
+ // Use the Redis host as parameter.
28
+ var watcher = new RedisWatcher (" 127.0.0.1:6379" );
29
+
30
+ // Initialize the enforcer.
31
+ var enforcer = new Enforcer (" examples/rbac_model.conf" , " examples/rbac_policy.csv" );
32
+
33
+ // Set the watcher for the enforcer.
34
+ enforcer .SetWatcher (watcher );
35
+
36
+ // Update the policy to test the effect.
37
+ enforcer .SavePolicy ();
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Getting Help
43
+
44
+ - [ Casbin.NET] ( https://github.com/casbin/Casbin.NET )
45
+
46
+ ## License
47
+
48
+ This project is under Apache 2.0 License. See the [ LICENSE] ( LICENSE ) file for the full license text.
You can’t perform that action at this time.
0 commit comments