Documentation ¶
Index ¶
- func DBName(databaseName string) func(*adapter)
- func Filtered(filtered bool) func(*adapter)
- func NewAdapter(url string, opts ...func(*adapter)) persist.Adapter
- func NewAdapterFromClient(cl *mongo.Client, opts ...func(*adapter)) persist.Adapter
- func NewFilteredAdapter(url string, opts ...func(*adapter)) persist.FilteredAdapter
- type CasbinRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBName ¶
func DBName(databaseName string) func(*adapter)
DBName sets the name of the database to be used by casbin
func NewAdapter ¶
NewAdapter is the constructor for Adapter.
func NewAdapterFromClient ¶
NewAdapterFromClient creates a new adapter from an existing connected mongodb client. Intended for reusing an already established client connection. Opening and Closing client connection will not be handled by the adapter.
func NewFilteredAdapter ¶
func NewFilteredAdapter(url string, opts ...func(*adapter)) persist.FilteredAdapter
NewFilteredAdapter is the constructor for FilteredAdapter. Casbin will not automatically call LoadPolicy() for a filtered adapter.
Types ¶
Click to show internal directories.
Click to hide internal directories.