Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFilteredAdapter ¶
func NewFilteredAdapter(url string) persist.FilteredAdapter
NewFilteredAdapter is the constructor for FilteredAdapter. Casbin will not automatically call LoadPolicy() for a filtered adapter.
func OptionCollectionName ¶
func OptionCollectionName(collectionName string) func(*adapter)
OptionCollectionName allows to change default collection name used by adapter which is 'casbin_rule'.
Types ¶
type CasbinRule ¶
CasbinRule represents a rule in Casbin.
type MongoAdapter ¶
func NewAdapter ¶
func NewAdapter(url string, options ...func(*adapter)) MongoAdapter
NewAdapter is the constructor for Adapter. If database name is not provided in the Mongo URL, 'casbin' will be used as database name.
func NewAdapterWithDialInfo ¶
func NewAdapterWithDialInfo(dI *mgo.DialInfo, options ...func(*adapter)) MongoAdapter
NewAdapterWithDialInfo is an alternative constructor for Adapter that does the same as NewAdapter, but uses mgo.DialInfo instead of a Mongo URL
Click to show internal directories.
Click to hide internal directories.