apicache

package
v0.0.0-...-29a7b8b Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 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 AuthzAPICache

type AuthzAPICache interface {
	GetIdentity(id string) (authzapireq.APIIdentity, error)
	GetGroup(id string) (authzapireq.APIGroup, error)

	LookupUserId(name string) (string, error)
	LookupGroupId(name string) (string, error)
}

ApiCacheClient will allow to access any of the required API caches

type AuthzCache

type AuthzCache struct {
	logr.Logger
	// AuthzClient will be used to communicate with Authz API
	AuthzClient authzapireq.AuthzClient
	// GroupCache is the Cache of Groups in Authz
	GroupCache cache.Cache
	// IdentityCache is the Cache of Identities in Authz
	IdentityCache cache.Cache
	// LoACache is the Cache of Assurances Levels in Authz
	LoACache cache.Cache
}

AuthzCache is an meta cache object containing all required caches

func NewApiCacheClient

func NewApiCacheClient(log logr.Logger, authz authzapireq.AuthzClient) AuthzCache

NewAuthzCacheClient will return a custom cache containing all the required caches

func (*AuthzCache) GetGroup

func (c *AuthzCache) GetGroup(id string) (authzapireq.APIGroup, error)

func (*AuthzCache) GetIdentity

func (c *AuthzCache) GetIdentity(id string) (authzapireq.APIIdentity, error)

func (*AuthzCache) GetLoA

func (c *AuthzCache) GetLoA(id string) (string, error)

func (*AuthzCache) LookupGroupId

func (c *AuthzCache) LookupGroupId(groupname string) (string, error)

func (*AuthzCache) LookupUserId

func (c *AuthzCache) LookupUserId(username string) (string, error)

Jump to

Keyboard shortcuts

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