storage

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL