Documentation
¶
Index ¶
- Variables
- func NewApi(conn *redis.Client, readOnly bool) *api
- func NewApiWithCompression(conn *redis.Client, compression tools.CompressionType, readOnly bool) *api
- type Adapter
- func (a *Adapter) AddPolicy(sec string, ptype string, rule []string) error
- func (a *Adapter) IsFiltered() bool
- func (a *Adapter) LoadFilteredPolicy(model model.Model, filter interface{}) error
- func (a *Adapter) LoadPolicy(model model.Model) error
- func (a *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (a *Adapter) RemovePolicy(sec string, ptype string, rule []string) error
- func (a *Adapter) SavePolicy(model model.Model) error
- type ConnectionSettings
- type Controller
- type Filter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoConnetion = errors.New("connection pointer is nil") ErrReadOnly = errors.New("api is marked as ReadOnly") )
View Source
var WrongDataType = errors.New("the object has the wrong type")
Functions ¶
func NewApiWithCompression ¶
func NewApiWithCompression(conn *redis.Client, compression tools.CompressionType, readOnly bool) *api
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶
func NewAdapter(api *api) *Adapter
func (*Adapter) IsFiltered ¶
func (*Adapter) LoadFilteredPolicy ¶
func (*Adapter) RemoveFilteredPolicy ¶
func (*Adapter) RemovePolicy ¶
type ConnectionSettings ¶
type Controller ¶
type Controller struct { ConnSetting ConnectionSettings Api *api // contains filtered or unexported fields }
func NewReCasController ¶
func NewReCasController(settings ConnectionSettings) (*Controller, error)
func (*Controller) GetAdapter ¶
func (c *Controller) GetAdapter() *Adapter
Click to show internal directories.
Click to hide internal directories.