cache_center

package
v0.55.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelDb

func DelDb(cacheName string)

Types

type CacheCenter

type CacheCenter struct {
	Log *logrus.Logger
	// contains filtered or unexported fields
}

func NewCacheCenter

func NewCacheCenter(cacheName string, Log *logrus.Logger) *CacheCenter

func (*CacheCenter) Close

func (c *CacheCenter) Close()

func (*CacheCenter) DailyDownloadCountAdd

func (c *CacheCenter) DailyDownloadCountAdd(supplierName string, publicIP string, whichDay ...string) (int, error)

DailyDownloadCountAdd 根据字幕提供者的名称,今日下载计数的次数+1,仅仅统计次数,并不确认是哪个视频的字幕下载

func (*CacheCenter) DailyDownloadCountGet

func (c *CacheCenter) DailyDownloadCountGet(supplierName string, publicIP string, whichDay ...string) (int, error)

DailyDownloadCountGet 根据字幕提供者的名称,获取今日下载计数的次数,仅仅统计次数,并不确认是那个视频的字幕下载 whichDay nowTime.Format("2006-01-02")

func (*CacheCenter) DownloadFileAdd

func (c *CacheCenter) DownloadFileAdd(subInfo *supplier.SubInfo) error

func (*CacheCenter) DownloadFileGet

func (c *CacheCenter) DownloadFileGet(fileUrlUID string) (bool, *supplier.SubInfo, error)

func (*CacheCenter) GetName

func (c *CacheCenter) GetName() string

func (*CacheCenter) TaskQueueClear

func (c *CacheCenter) TaskQueueClear() error

func (*CacheCenter) TaskQueueRead

func (c *CacheCenter) TaskQueueRead() (map[int][]byte, error)

func (*CacheCenter) TaskQueueSave

func (c *CacheCenter) TaskQueueSave(taskPriority int, taskQueueBytes []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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