cache

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 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 tier list cache.

func New

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

New to create new tier list cache.

func (*Cache) DeleteByID

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

DeleteByID to delete by id.

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, data entity.GetRequest) ([]entity.TierList, int, int, error)

Get to get list.

func (*Cache) GetByID

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

GetByID to get by id.

func (*Cache) UpsertByID

func (c *Cache) UpsertByID(ctx context.Context, data entity.TierList) (*entity.TierList, int, error)

UpsertByID to upsert by id.

Jump to

Keyboard shortcuts

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