cache

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Client

type Client interface {
	Set(ctx context.Context, key string, value any) error
	Get(ctx context.Context, key string) (any, error)
}

func NewClient

func NewClient(cacheConfig configs.Cache, logger *zap.Logger) Client

type Setting

type Setting interface {
	Get(ctx context.Context) ([]byte, error)
	Set(ctx context.Context, data []byte) error
}

func NewSetting

func NewSetting(
	client Client,
	logger *zap.Logger,
) Setting

type TokenPublicKey

type TokenPublicKey interface {
	Get(ctx context.Context, id uint64) ([]byte, error)
	Set(ctx context.Context, id uint64, bytes []byte) error
}

func NewTokenPublicKey

func NewTokenPublicKey(
	client Client,
	logger *zap.Logger,
) TokenPublicKey

Jump to

Keyboard shortcuts

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