biz

package
v0.0.0-...-2004213 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 3 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BizProviderSet = wire.NewSet(NewDownloader)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

func NewDownloader

func NewDownloader(repo DownloaderRepo, logger log.Logger) *Downloader

func (*Downloader) Add

func (d *Downloader) Add(ctx context.Context, link, storePath string) error

func (*Downloader) Delete

func (d *Downloader) Delete(ctx context.Context, id string) error

func (*Downloader) List

func (d *Downloader) List(ctx context.Context) ([]*DownloaderTaskInfo, error)

func (*Downloader) Pause

func (d *Downloader) Pause(ctx context.Context, id string) error

func (*Downloader) Resume

func (d *Downloader) Resume(ctx context.Context, id string) error

type DownloaderRepo

type DownloaderRepo interface {
	Add(ctx context.Context, link, storePath string) error
	Delete(ctx context.Context, id string) error
	List(ctx context.Context) ([]*DownloaderTaskInfo, error)
	Pause(ctx context.Context, id string) error
	Resume(ctx context.Context, id string) error
}

type DownloaderTaskInfo

type DownloaderTaskInfo struct {
	Name        string
	Size        int64
	StorePath   string
	Progress    float32
	Status      string
	CreatedTime string
	Id          string
}

Jump to

Keyboard shortcuts

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