get

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(recode string, password string, targetDir string, isPrint bool)

Types

type DownloadModel

type DownloadModel struct {
	Dir          string         // 下载目录(默认为当前目录)
	Filepath     string         // 文件下载地址
	UserRecode   string         // 提取码
	UserPassword string         // 密码
	Csrf         string         // CSRF 口令
	Cookie       string         // Cookie
	Token        string         // 临时认证 Token
	Items        []ItemDownload // 需要下载的文件信息
	URL          string         // 已签名的下载链接
}

下载包结构体

type DownloadRequest

type DownloadRequest struct {
	Full  bool           `json:"full"`
	Items []ItemDownload `json:"items"`
}

type DownloadResponse

type DownloadResponse struct {
	URL string `json:"url"`
}

type ItemDownload

type ItemDownload struct {
	OriginalName string `json:"original_name"`
	Protocol     string `json:"protocol"`
	Bucket       string `json:"bucket"`
	Endpoint     string `json:"endpoint"`
	Path         string `json:"path"`
}

type MinusDownCountRequest

type MinusDownCountRequest struct {
	Bucket string `json:"bucket"`
	Path   string `json:"path"`
}

type ValidationRequest

type ValidationRequest struct {
	Password string `json:"password"`
}

type ValidationResponse

type ValidationResponse struct {
	Token string         `json:"token"`
	Items []ItemDownload `json:"items"`
}

type WriteCounter

type WriteCounter struct {
	Total uint64
}

func (WriteCounter) PrintProgress

func (wc WriteCounter) PrintProgress()

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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