Documentation
¶
Index ¶
- type Adapter
- type BatchAdapter
- type SimpleAdapter
- type StorageController
- func (sc *StorageController) AddWait(i int)
- func (sc *StorageController) AutosaveEnabled() bool
- func (sc *StorageController) Disable()
- func (sc *StorageController) DisableAutosave()
- func (sc *StorageController) Enable()
- func (sc *StorageController) EnableAutosave()
- func (sc *StorageController) Enabled() bool
- func (sc *StorageController) Flush() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // LoadPolicy loads all policy rules from the storage. LoadPolicy(model api.IAddRuleBool) error // SavePolicy saves all policy rules to the storage. SavePolicy(model api.IRangeRules) error }
Adapter is the interface for Casbin adapters.
type BatchAdapter ¶
type BatchAdapter interface { Adapter api.IAddRules api.IRemoveRules }
BatchAdapter is the interface for Casbin adapters with multiple add and remove policy functions.
type SimpleAdapter ¶
type SimpleAdapter interface { Adapter api.IAddRule api.IRemoveRule }
type StorageController ¶
type StorageController struct {
// contains filtered or unexported fields
}
func NewStorageController ¶
func NewStorageController(eventemitter api.IAddRemoveListener, adapter Adapter, autosave bool) *StorageController
func (*StorageController) AddWait ¶
func (sc *StorageController) AddWait(i int)
func (*StorageController) AutosaveEnabled ¶
func (sc *StorageController) AutosaveEnabled() bool
func (*StorageController) Disable ¶
func (sc *StorageController) Disable()
func (*StorageController) DisableAutosave ¶
func (sc *StorageController) DisableAutosave()
func (*StorageController) Enable ¶
func (sc *StorageController) Enable()
func (*StorageController) EnableAutosave ¶
func (sc *StorageController) EnableAutosave()
func (*StorageController) Enabled ¶
func (sc *StorageController) Enabled() bool
func (*StorageController) Flush ¶
func (sc *StorageController) Flush() error
Click to show internal directories.
Click to hide internal directories.