cache

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K

type K struct {
	Role           string
	UserID         string
	OrganizationID string
}

K represents a role associated with an API key.

type O

type O struct {
	Role                string
	OrganizationID      string
	KubernetesNamespace string
}

O represents a role associated with a organization user.

type Store

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

Store is a cache for API keys and organization users.

func NewStore

func NewStore(
	userInfoLister userInfoLister,
	debug *config.DebugConfig,
) *Store

NewStore creates a new cache store.

func (*Store) GetAPIKeyBySecret

func (c *Store) GetAPIKeyBySecret(secret string) (*K, bool)

GetAPIKeyBySecret returns an API key by its secret.

func (*Store) GetOrganizationsByUserID

func (c *Store) GetOrganizationsByUserID(userID string) ([]O, bool)

GetOrganizationsByUserID returns organization users by its user ID.

func (*Store) Sync

func (c *Store) Sync(ctx context.Context, interval time.Duration) error

Sync synchronizes the cache.

Jump to

Keyboard shortcuts

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