persistence

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Persistence

type Persistence struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, wg *sync.WaitGroup, config configuration.Config) (result *Persistence, err error)

func (*Persistence) Create

func (p *Persistence) Create(policy ladon.Policy) error

Create persists the policy.

func (*Persistence) Delete

func (p *Persistence) Delete(id string) error

Delete removes a policy.

func (*Persistence) FindRequestCandidates

func (p *Persistence) FindRequestCandidates(r *ladon.Request) (ladon.Policies, error)

FindRequestCandidates returns candidates that could match the request object. It either returns a set that exactly matches the request, or a superset of it. If an error occurs, it returns nil and the error.

func (*Persistence) Get

func (p *Persistence) Get(id string) (ladon.Policy, error)

Get retrieves a policy.

func (*Persistence) GetAll

func (p *Persistence) GetAll(limit, offset int64) (ladon.Policies, error)

GetAll retrieves all policies.

func (*Persistence) IsAllowed

func (p *Persistence) IsAllowed(r *ladon.Request) (err error)

func (*Persistence) IsAnyAllowed

func (p *Persistence) IsAnyAllowed(r []ladon.Request) (err error)

func (*Persistence) Update

func (p *Persistence) Update(policy ladon.Policy) error

Update updates an existing policy.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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