Version: v0.1.0 Latest Latest

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 19 Imported by: 0




This section is empty.


This section is empty.


func GetLength

func GetLength(url string, client *http.Client) (int, error)


type File

type File struct {
	Url      string
	FileName string
	Data     *[]byte
	Sha      string
	Client   *http.Client
	Length   int
	Chunks   chunk.Chunks
	// contains filtered or unexported fields

func AskForRelease

func AskForRelease(repo string) (*File, error)

func LatestRelease

func LatestRelease(repo string) (*File, error)

func New

func New(url string, sha string, client *http.Client, len *int) (*File, error)

func (*File) CompareSha

func (c *File) CompareSha() error

func (*File) Download

func (c *File) Download(workers, threads int, progress bool) error

func (*File) DownloadChunk

func (c *File) DownloadChunk(val string, offset int, bar *mpb.Bar) async.Future

func (*File) DownloadWithProgress

func (c *File) DownloadWithProgress(workers, threads int) error

func (*File) GetFilename

func (c *File) GetFilename() error

func (*File) Save

func (c *File) Save(path string) error

type FileNameError

type FileNameError struct{}

func (*FileNameError) Error

func (e *FileNameError) Error() string

type SumError

type SumError struct {
	Reference string
	Data      string

func (*SumError) Error

func (c *SumError) Error() string

Jump to

Keyboard shortcuts

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