File tree 1 file changed +17
-0
lines changed 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Package dbauthz provides an authorization layer on top of the database. This
2
+ // package exposes an interface that is currently a 1:1 mapping with
3
+ // database.Store.
4
+ //
5
+ // The same cultural rules apply to this package as they do to database.Store.
6
+ // Meaning that each method implemented should keep the number of database
7
+ // queries as close to 1 as possible. Each method should do 1 thing, with no
8
+ // unexpected side effects (eg: updating multiple tables in a single method).
9
+ //
10
+ // Avoid implementing business logic in this package. Only authorization related
11
+ // logic should be implemented here. In most cases, this should only be a call to
12
+ // the rbac authorizer.
13
+ //
14
+ // When a new database method is added to database.Store, it should be added to
15
+ // this package as well. The unit test "Accounting" will ensure all methods are
16
+ // tested. See other unit tests for examples on how to write these.
17
+ package dbauthz
You can’t perform that action at this time.
0 commit comments