cache

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 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 agency cache.

func New

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

New to create new agency cache.

func (*Cache) GetAll

func (c *Cache) GetAll(ctx context.Context) ([]entity.Agency, int, error)

GetAll to get all.

func (*Cache) GetAllIDs

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

GetAllIDs to get all ids.

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.

func (*Cache) UpdateByID

func (c *Cache) UpdateByID(ctx context.Context, id int64, data entity.Agency) (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