cache

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 8 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 manga cache.

func New

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

New to create new manga cache.

func (*Cache) DeleteByID

func (c *Cache) DeleteByID(ctx context.Context, id int64) (int, error)

DeleteByID to delete manga by id.

func (*Cache) GetAll added in v0.2.0

func (c *Cache) GetAll(ctx context.Context, req entity.GetAllRequest) (_ []entity.Manga, _ int, code int, err error)

GetAll to get manga list.

func (*Cache) GetByID

func (c *Cache) GetByID(ctx context.Context, id int64) (data *entity.Manga, code int, err error)

GetByID to get manga by id.

func (*Cache) GetIDs

func (c *Cache) GetIDs(ctx context.Context) ([]int64, int, error)

GetIDs to get ids.

func (*Cache) GetMaxID

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

GetMaxID to get max id.

func (*Cache) GetOldFinishedIDs

func (c *Cache) GetOldFinishedIDs(ctx context.Context) ([]int64, int, error)

GetOldFinishedIDs to get old finished manga ids.

func (*Cache) GetOldNotYetIDs

func (c *Cache) GetOldNotYetIDs(ctx context.Context) ([]int64, int, error)

GetOldNotYetIDs to get old not yet released manga ids.

func (*Cache) GetOldReleasingIDs

func (c *Cache) GetOldReleasingIDs(ctx context.Context) ([]int64, int, error)

GetOldReleasingIDs to get old releasing manga ids.

func (*Cache) IsOld

func (c *Cache) IsOld(ctx context.Context, id int64) (bool, int, error)

IsOld to check if old.

func (*Cache) Update

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

Update to update manga.

Jump to

Keyboard shortcuts

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