repository

package
v0.0.0-...-ea37025 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyDoesNotExist = errors.New("key does not exist")

Functions

This section is empty.

Types

type CacheRepository

type CacheRepository interface {
	Get(ctx context.Context, key string) (*entity.URL, error)
	Set(ctx context.Context, url *entity.URL, expiration time.Duration) error
	Del(ctx context.Context, key string) error
}

type CacheRepositoryImpl

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

func NewCache

func NewCache(client *redis.Client) *CacheRepositoryImpl

func (*CacheRepositoryImpl) Del

func (c *CacheRepositoryImpl) Del(ctx context.Context, key string) error

func (*CacheRepositoryImpl) Get

func (c *CacheRepositoryImpl) Get(ctx context.Context, key string) (*entity.URL, error)

func (*CacheRepositoryImpl) Set

func (c *CacheRepositoryImpl) Set(ctx context.Context, url *entity.URL, expiration time.Duration) error

Jump to

Keyboard shortcuts

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