cache

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInCache

func NewInCache(db account.Store) account.Store

Types

type Cache

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

func (*Cache) Bind

func (c *Cache) Bind(ctx context.Context, userID *commonpb.UserId, pubKey *commonpb.PublicKey) (*commonpb.UserId, error)

func (*Cache) GetPubKeys

func (c *Cache) GetPubKeys(ctx context.Context, userID *commonpb.UserId) ([]*commonpb.PublicKey, error)

func (*Cache) GetUserId

func (c *Cache) GetUserId(ctx context.Context, pubKey *commonpb.PublicKey) (*commonpb.UserId, error)

func (*Cache) IsAuthorized

func (c *Cache) IsAuthorized(ctx context.Context, userID *commonpb.UserId, pubKey *commonpb.PublicKey) (bool, error)

func (*Cache) IsRegistered

func (c *Cache) IsRegistered(ctx context.Context, userID *commonpb.UserId) (bool, error)

func (*Cache) IsStaff

func (c *Cache) IsStaff(ctx context.Context, userID *commonpb.UserId) (bool, error)

func (*Cache) SetRegistrationFlag

func (c *Cache) SetRegistrationFlag(ctx context.Context, userID *commonpb.UserId, isRegistered bool) error

Jump to

Keyboard shortcuts

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