models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const API_KEY string = "lhF2IeeprweDfu9ccWlxXVVypA5nA3EL"
View Source
const API_URL string = "http://uploaded.net/api/filemultiple"
View Source
const LOGIN_URL = "http://uploaded.net/io/login"
View Source
const URL_PATTERN = `https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)`

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Url           string  `json:"url"`
	Finished      bool    `json:"finished"`
	Offline       bool    `json:"offline"`
	Checksum      string  `json:"-"`
	Progress      float64 `json:"progress"`
	UnrarProgress float64 `json:"unrar_progress"`
	Extracting    bool    `json:"extracting"`

	Filename      string        `json:"filename"`
	Size          uint64        `json:"size"`
	DownloadSpeed string        `json:"download_speed"`
	Failed        bool          `json:"failed"`
	ETE           time.Duration `json:"ete"`
	Error         error
	// contains filtered or unexported fields
}

type Package

type Package struct {
	Id            string    `json:"id"`
	Name          string    `json:"name"`
	Finished      bool      `json:"finished"`
	Files         []*File   `json:"files"`
	DLC           string    `json:"dlc"`
	Password      string    `json:"password"`
	Progress      float64   `json:"progress"`
	UnrarProgress float64   `json:"unrar_progress"`
	Extracting    bool      `json:"extracting"`
	DateAdded     time.Time `json:"date_added"`
	Size          uint64    `json:"size"`
}

func (*Package) Download

func (pack *Package) Download(downloader *Uploaded)

func (*Package) Retry added in v0.0.2

func (pack *Package) Retry()

func (*Package) Unrar

func (pack *Package) Unrar(path string)

func (*Package) Update

func (pack *Package) Update()

func (*Package) UpdateProgress

func (pack *Package) UpdateProgress()

func (*Package) UpdateSize

func (pack *Package) UpdateSize()

type Uploaded

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

func NewUploaded

func NewUploaded(config *configuration.Configuration) *Uploaded

func (*Uploaded) DownloadPackage

func (ul *Uploaded) DownloadPackage(pack *Package) error

type WriteCounter

type WriteCounter struct {
	FileSize uint64 // Total # of bytes transferred
	Total    uint64
}

func (*WriteCounter) Write

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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