Documentation ¶
Index ¶
- func DelDb(cacheName string)
- type CacheCenter
- func (c *CacheCenter) Close()
- func (c *CacheCenter) DailyDownloadCountAdd(supplierName string, publicIP string, whichDay ...string) (int, error)
- func (c *CacheCenter) DailyDownloadCountGet(supplierName string, publicIP string, whichDay ...string) (int, error)
- func (c *CacheCenter) DownloadFileAdd(subInfo *supplier.SubInfo) error
- func (c *CacheCenter) DownloadFileGet(fileUrlUID string) (bool, *supplier.SubInfo, error)
- func (c *CacheCenter) GetName() string
- func (c *CacheCenter) TaskQueueClear() error
- func (c *CacheCenter) TaskQueueRead() (map[int][]byte, error)
- func (c *CacheCenter) TaskQueueSave(taskPriority int, taskQueueBytes []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheCenter ¶
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 (*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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.