downloader

package
v0.0.0-...-d04cef2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobDownloader

type BlobDownloader struct {
	ServiceContext *sc.ServiceContext
}

func NewBlobDownloader

func NewBlobDownloader(svc *sc.ServiceContext) *BlobDownloader

func (*BlobDownloader) Download

func (bd *BlobDownloader) Download() error

type Downloader

type Downloader interface {
	Download() error
}

type ResourceChunk

type ResourceChunk struct {
	GitUrl  string `json:"git_url"`
	Path    string `json:"path"`
	OutPath string `json:"outpath"`
}

type RootDownloader

type RootDownloader struct {
	ServiceContext *sc.ServiceContext
	ArchiveType    string
}

func NewRootDownloader

func NewRootDownloader(svc *sc.ServiceContext, archiveType string) *RootDownloader

func (*RootDownloader) Download

func (rd *RootDownloader) Download() error

func (*RootDownloader) IsTar

func (rd *RootDownloader) IsTar() bool

func (*RootDownloader) IsZip

func (rd *RootDownloader) IsZip() bool

type TreeDownloader

type TreeDownloader struct {
	ServiceContext *sc.ServiceContext
	FileChunks     []*ResourceChunk // 最终要下载的所有文件存到此处
	GitTreeChunks  []*ResourceChunk // 需要递归的顶级目录存到此处
}

func NewTreeDownloader

func NewTreeDownloader(svc *sc.ServiceContext) *TreeDownloader

func (*TreeDownloader) Download

func (td *TreeDownloader) Download() error

Jump to

Keyboard shortcuts

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