Documentation ¶
Index ¶
- Variables
- func NewDownloadManagerRepo(database *Data, downloadTask *DownloadTask, ...) biz.DownloadManagerRepo
- func NewDownloaderClient(r registry.Discovery) downloaderV1.DownloaderClient
- type Data
- type DownloadTask
- func (s *DownloadTask) AddTaskInfo(ctx context.Context, taskInfo *dto.DownloadTaskInfo) error
- func (s *DownloadTask) DeleteTask(ctx context.Context, id int32) error
- func (s *DownloadTask) GetDownloadTaskInfoByAnimeId(id string) *dto.DownloadTaskInfo
- func (s *DownloadTask) GetDownloadTaskInfoById(id int32) *dto.DownloadTaskInfo
- func (s *DownloadTask) GetDownloadTaskInfos() []*dto.DownloadTaskInfo
- func (s *DownloadTask) SyncDownloadTask() error
- func (s *DownloadTask) UpdateLatestChapter(ctx context.Context, id, latestChapter int32) error
- func (s *DownloadTask) UpdateTaskInfo(ctx context.Context, taskInfo *dto.DownloadTaskInfo) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewDownloadManagerRepo, NewDownloaderClient, NewDownloadTask, util.NewReidsClient, config.NewRedisConfig, conf.NewDownloadManagerServerConfig)
ProviderSet is data providers.
Functions ¶
func NewDownloadManagerRepo ¶
func NewDownloadManagerRepo(database *Data, downloadTask *DownloadTask, downloader downloaderV1.DownloaderClient, logger log.Logger) biz.DownloadManagerRepo
NewGreeterRepo .
func NewDownloaderClient ¶
func NewDownloaderClient(r registry.Discovery) downloaderV1.DownloaderClient
Types ¶
type DownloadTask ¶
type DownloadTask struct {
// contains filtered or unexported fields
}
func NewDownloadTask ¶
func NewDownloadTask(db *Data, prefix util.TaskEtcdPrefix, watcher *util.EtcdWatcher, logger log.Logger) *DownloadTask
func (*DownloadTask) AddTaskInfo ¶
func (s *DownloadTask) AddTaskInfo(ctx context.Context, taskInfo *dto.DownloadTaskInfo) error
func (*DownloadTask) DeleteTask ¶
func (s *DownloadTask) DeleteTask(ctx context.Context, id int32) error
func (*DownloadTask) GetDownloadTaskInfoByAnimeId ¶
func (s *DownloadTask) GetDownloadTaskInfoByAnimeId(id string) *dto.DownloadTaskInfo
func (*DownloadTask) GetDownloadTaskInfoById ¶
func (s *DownloadTask) GetDownloadTaskInfoById(id int32) *dto.DownloadTaskInfo
func (*DownloadTask) GetDownloadTaskInfos ¶
func (s *DownloadTask) GetDownloadTaskInfos() []*dto.DownloadTaskInfo
func (*DownloadTask) SyncDownloadTask ¶
func (s *DownloadTask) SyncDownloadTask() error
func (*DownloadTask) UpdateLatestChapter ¶
func (s *DownloadTask) UpdateLatestChapter(ctx context.Context, id, latestChapter int32) error
func (*DownloadTask) UpdateTaskInfo ¶
func (s *DownloadTask) UpdateTaskInfo(ctx context.Context, taskInfo *dto.DownloadTaskInfo) error
Click to show internal directories.
Click to hide internal directories.