cache

package
v0.11.15 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache contains functions for user cache.

func New

func New(cacher cache.Cacher, repo repository.Repository) *Cache

New to create new user cache.

func (*Cache) DeleteByAnimeID added in v0.3.2

func (c *Cache) DeleteByAnimeID(ctx context.Context, animeID int64) (int, error)

DeleteByAnimeID to delete by anime id.

func (*Cache) DeleteByUsername added in v0.9.0

func (c *Cache) DeleteByUsername(ctx context.Context, username string) (int, error)

DeleteByUsername to delete by username.

func (*Cache) DeleteNotInList added in v0.3.0

func (c *Cache) DeleteNotInList(ctx context.Context, username string, ids []int64, status string) (int, error)

DeleteNotInList to delete anime not in list.

func (*Cache) Get

Get to get user anime.

func (*Cache) GetOldUsernames added in v0.3.0

func (c *Cache) GetOldUsernames(ctx context.Context) ([]string, int, error)

GetOldUsernames to get old username.

func (*Cache) IsOld

func (c *Cache) IsOld(ctx context.Context, username string) (bool, int, error)

IsOld to check if old.

func (*Cache) Update

func (c *Cache) Update(ctx context.Context, data entity.UserAnime) (int, error)

Update to update user anime.

Jump to

Keyboard shortcuts

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