cache

package
v0.0.0-...-3266887 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSecretNotFound defines secret not found error.
	ErrSecretNotFound = errors.New("secret not found")
	// ErrPolicyNotFound defines policy not found error.
	ErrPolicyNotFound = errors.New("policy not found")
)

Functions

This section is empty.

Types

type Cache

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

Cache is used to store secrets and policies.

func GetCacheInsOr

func GetCacheInsOr(cli store.Factory) (*Cache, error)

GetCacheInsOr return store instance.

func (*Cache) GetPolicy

func (c *Cache) GetPolicy(key string) ([]*ladon.DefaultPolicy, error)

GetPolicy return user's ladon policies for the given user.

func (*Cache) GetSecret

func (c *Cache) GetSecret(key string) (*pb.SecretInfo, error)

GetSecret return secret detail for the given key.

func (*Cache) Reload

func (c *Cache) Reload() error

Reload reload secrets and policies.

Jump to

Keyboard shortcuts

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