rippers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: BSD-2-Clause, MIT, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunction

type CallbackFunction func(job *types.Job)

CallbackFunction is used to report job progress like file, percentage, bytes done, bytes total

type Context

type Context struct {
	Job        *types.Job
	Repository *types.Repository
	Files      *list.List // Files to download
	TotalCount int
	TotalSize  int64
	RemoteTree *Folder
}

Context keep data specific for each ripping request

func (*Context) CheckDestinationPath

func (context *Context) CheckDestinationPath(folder *Folder) error

func (*Context) LoadTree

func (context *Context) LoadTree(folder *Folder)

func (*Context) MkdirIfNotExists

func (context *Context) MkdirIfNotExists(folder string) error

func (*Context) PrintDownloadPercent

func (context *Context) PrintDownloadPercent(done chan int64) error

func (*Context) SaveTree

func (context *Context) SaveTree(folder *Folder) error

type File

type File struct {
	Name string    `json:"name"`
	Date time.Time `json:"date"`
	Size int64     `json:"size"`
}

File contain basic information about size and date

type Folder

type Folder struct {
	Name    string             `json:"name"`
	Folders map[string]*Folder `json:"folders"`
	Files   map[string]*File   `json:"files"`
}

Folder keeps a reference to files and folders contained in that folder

type HttpContext

type HttpContext struct {
	Context

	Url *url.URL
	// contains filtered or unexported fields
}

func CreateHttpContext

func CreateHttpContext(job *types.Job, repo *types.Repository) *HttpContext

func (*HttpContext) DownloadDirHttp

func (context *HttpContext) DownloadDirHttp() error

func (*HttpContext) DownloadSingleFileHttp

func (context *HttpContext) DownloadSingleFileHttp() error

type MissingFile

type MissingFile struct {
	Fullname string
	URIPath  string // part of URL after job.URL (filename or folder/filename)
	File     *File
}

type SmbContext

type SmbContext struct {
	Context

	Url *url.URL
	// contains filtered or unexported fields
}

func CreateSmbContext

func CreateSmbContext(job *types.Job, repo *types.Repository) *SmbContext

func (*SmbContext) DownloadDirectoryCifs

func (context *SmbContext) DownloadDirectoryCifs() error

Jump to

Keyboard shortcuts

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