cache

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 10 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) DeleteByID added in v0.9.0

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

DeleteByID to delete by id.

func (*Cache) Get2DModelerCount added in v0.14.0

func (c *Cache) Get2DModelerCount(ctx context.Context, top int) (data []entity.DesignerCount, code int, err error)

Get2DModelerCount to get character 2d modeler count.

func (*Cache) Get3DModelerCount added in v0.14.0

func (c *Cache) Get3DModelerCount(ctx context.Context, top int) (data []entity.DesignerCount, code int, err error)

Get3DModelerCount to get character 3d modeler count.

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) GetAverageActiveTime added in v0.14.0

func (c *Cache) GetAverageActiveTime(ctx context.Context) (data float64, code int, err error)

GetAverageActiveTime to get average active time.

func (*Cache) GetAverageHeight added in v0.14.0

func (c *Cache) GetAverageHeight(ctx context.Context) (data float64, code int, err error)

GetAverageHeight to get average height.

func (*Cache) GetAverageVideoCount added in v0.14.0

func (c *Cache) GetAverageVideoCount(ctx context.Context) (data float64, code int, err error)

GetAverageVideoCount to get average video count.

func (*Cache) GetAverageVideoDuration added in v0.14.0

func (c *Cache) GetAverageVideoDuration(ctx context.Context) (data float64, code int, err error)

GetAverageVideoDuration to get average video duration.

func (*Cache) GetAverageWeight added in v0.14.0

func (c *Cache) GetAverageWeight(ctx context.Context) (data float64, code int, err error)

GetAverageWeight to get average height.

func (*Cache) GetBirthdayCount added in v0.14.0

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

GetBirthdayCount to get birthday count.

func (*Cache) GetBloodTypeCount added in v0.14.0

func (c *Cache) GetBloodTypeCount(ctx context.Context, top int) (data []entity.BloodTypeCount, code int, err error)

GetBloodTypeCount to get blood type count.

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) GetChannelTypeCount added in v0.14.0

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

GetChannelTypeCount to get channel type count.

func (*Cache) GetCharacter2DModelers added in v0.6.0

func (c *Cache) GetCharacter2DModelers(ctx context.Context) (data []string, code int, err error)

GetCharacter2DModelers to get 2d modelers.

func (*Cache) GetCharacter3DModelers added in v0.6.0

func (c *Cache) GetCharacter3DModelers(ctx context.Context) (data []string, code int, err error)

GetCharacter3DModelers to get 3d modelers.

func (*Cache) GetCharacterDesigners added in v0.6.0

func (c *Cache) GetCharacterDesigners(ctx context.Context) (data []string, code int, err error)

GetCharacterDesigners to get character designers.

func (*Cache) GetCount added in v0.14.0

func (c *Cache) GetCount(ctx context.Context) (data int, code int, err error)

GetCount to get count.

func (*Cache) GetDebutRetireCountMonthly added in v0.14.0

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

GetDebutRetireCountMonthly to get debut & retire count monthly.

func (*Cache) GetDebutRetireCountYearly added in v0.14.0

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

GetDebutRetireCountYearly to get debut & retire count yearly.

func (*Cache) GetDesignerCount added in v0.14.0

func (c *Cache) GetDesignerCount(ctx context.Context, top int) (data []entity.DesignerCount, code int, err error)

GetDesignerCount to get character designer count.

func (*Cache) GetGenderCount added in v0.14.0

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

GetGenderCount to get gender count.

func (*Cache) GetInAgencyCount added in v0.14.0

func (c *Cache) GetInAgencyCount(ctx context.Context) (data *entity.InAgencyCount, code int, err error)

GetInAgencyCount to get in agency count.

func (*Cache) GetModelCount added in v0.14.0

func (c *Cache) GetModelCount(ctx context.Context) (data *entity.ModelCount, code int, err error)

GetModelCount to get 2d & 3d model count.

func (*Cache) GetOldActiveIDs added in v0.15.0

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

GetOldActiveIDs to get old active ids.

func (*Cache) GetOldRetiredIDs added in v0.15.0

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

GetOldRetiredIDs to get old ids.

func (*Cache) GetStatusCount added in v0.14.0

func (c *Cache) GetStatusCount(ctx context.Context) (data *entity.StatusCount, code int, err error)

GetStatusCount to get status count.

func (*Cache) GetSubscriberCount added in v0.14.0

func (c *Cache) GetSubscriberCount(ctx context.Context, interval, max int) (data []entity.SubscriberCount, code int, err error)

GetSubscriberCount to get subscriber count.

func (*Cache) GetVideoCount added in v0.14.0

func (c *Cache) GetVideoCount(ctx context.Context, top int) (data []entity.VideoCount, code int, err error)

GetVideoCount to get video count.

func (*Cache) GetVideoCountByDate added in v0.14.0

func (c *Cache) GetVideoCountByDate(ctx context.Context, hourly, daily bool) (data []entity.VideoCountByDate, code int, err error)

GetVideoCountByDate to get video count by date.

func (*Cache) GetVideoDuration added in v0.14.0

func (c *Cache) GetVideoDuration(ctx context.Context, top int) (data []entity.VideoDuration, code int, err error)

GetVideoDuration to get video duration.

func (*Cache) GetZodiacCount added in v0.14.0

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

GetZodiacCount to get zodiac count.

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.

func (*Cache) UpdateOverriddenFieldByID added in v0.20.0

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

UpdateOverriddenFieldByID to update overridden field by id.

Jump to

Keyboard shortcuts

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