caches

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyListMovie   = "movie:list_movie:search:%s:page:%d"
	KeyDetailMovie = "movie:detail:movie_id:%s"
)
View Source
const (
	KeyCountingStatusKYC = "counting_status_kyc:%d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceCache

type ServiceCache struct {
	Cfg   *config.ServiceConfig
	Redis *redis.Client
}

func New

func New(this *ServiceCache) *ServiceCache

func (*ServiceCache) DecrKYCByStatus

func (cache *ServiceCache) DecrKYCByStatus(ctx context.Context, statusKYC int64) (err error)

func (*ServiceCache) GetDetailMovie

func (cache *ServiceCache) GetDetailMovie(ctx context.Context, movieID string) (resp *omdb.OMDBDetail, err error)

func (*ServiceCache) GetKYCByStatus

func (cache *ServiceCache) GetKYCByStatus(ctx context.Context, statusKYC int64) (total int, err error)

func (*ServiceCache) GetListMovie

func (cache *ServiceCache) GetListMovie(ctx context.Context, search string, page int64) (resp *omdb.OMDBList, err error)

func (*ServiceCache) IncrKYCByStatus

func (cache *ServiceCache) IncrKYCByStatus(ctx context.Context, statusKYC int64) (err error)

func (*ServiceCache) SetDetailMovie

func (cache *ServiceCache) SetDetailMovie(ctx context.Context, movieID string, req *omdb.OMDBDetail) (err error)

func (*ServiceCache) SetKYCByStatus

func (cache *ServiceCache) SetKYCByStatus(ctx context.Context, statusKYC int64, value int) (err error)

func (*ServiceCache) SetListMovie

func (cache *ServiceCache) SetListMovie(ctx context.Context, search string, page int64, req *omdb.OMDBList) (err error)

Jump to

Keyboard shortcuts

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