cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 9 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 vtuber cache.

func New

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

New to create new vtuber cache.

func (*Cache) GetAll added in v0.5.0

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

GetAll to get vtuber list.

func (*Cache) GetAllForAgencyTree added in v0.4.0

func (c *Cache) GetAllForAgencyTree(ctx context.Context) (data []entity.Vtuber, code int, err error)

GetAllForAgencyTree to get all for agency tree.

func (*Cache) GetAllForFamilyTree added in v0.4.0

func (c *Cache) GetAllForFamilyTree(ctx context.Context) (data []entity.Vtuber, code int, err error)

GetAllForFamilyTree to get all for family tree.

func (*Cache) GetAllIDs

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

GetAllIDs to get all ids.

func (*Cache) GetAllImages

func (c *Cache) GetAllImages(ctx context.Context, shuffle bool, limit int) (data []entity.Vtuber, code int, err error)

GetAllImages to get all images.

func (*Cache) GetByID

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

GetByID to get data by id.

func (*Cache) GetOldIDs

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

GetOldIDs to get old ids.

func (*Cache) IsOld

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

IsOld to check if old data.

func (*Cache) UpdateByID

func (c *Cache) UpdateByID(ctx context.Context, id int64, data entity.Vtuber) (int, error)

UpdateByID to update by id.

Jump to

Keyboard shortcuts

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