htp

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile added in v1.7.7

func DownloadFile(url string, toFile string) error

DownloadFile #

func JSON2Str

func JSON2Str(data interface{}) string

JSON2Str #

func ParalellDownloadFile added in v1.7.9

func ParalellDownloadFile(url string, toFile string) error

ParalellDownloadFile #

func URLfileSize added in v1.7.7

func URLfileSize(url string) (int, error)

URLfileSize #

Types

type DownloadFileInfo added in v1.7.7

type DownloadFileInfo struct {
	FileName string
	Web      XFileInfo
	Loc      XFileInfo
	Changed  bool
	// contains filtered or unexported fields
}

DownloadFileInfo #

func (*DownloadFileInfo) Download added in v1.7.7

func (f *DownloadFileInfo) Download(toFile string) error

Download #

func (*DownloadFileInfo) ParalellDownload added in v1.7.9

func (f *DownloadFileInfo) ParalellDownload(toFile string) error

ParalellDownload #

func (*DownloadFileInfo) SetFileTime added in v1.7.7

func (f *DownloadFileInfo) SetFileTime(toFile string) error

SetFileTime #

type DownloadFilesInfo added in v1.7.7

type DownloadFilesInfo struct {
	List []DownloadFileInfo
	// contains filtered or unexported fields
}

DownloadFilesInfo #

func GetDownloadFilesInfo added in v1.7.7

func GetDownloadFilesInfo(url string) (*DownloadFilesInfo, error)

GetDownloadFilesInfo #

func (*DownloadFilesInfo) GetFileInfo added in v1.7.7

func (fl *DownloadFilesInfo) GetFileInfo(FileName string) (*DownloadFileInfo, error)

GetFileInfo #

type HtReq

type HtReq struct {
	StatusCode int
	Status     string
	Msg        string
	Body       []byte
	Err        error
}

HtReq #

func Delete

func Delete(url string, token string, jsData *[]byte) *HtReq

Delete #

func Get

func Get(url string, token string, jsData *[]byte) *HtReq

Get #

func Post

func Post(url string, token string, jsData *[]byte) *HtReq

Post #

func Put

func Put(url string, token string, jsData *[]byte) *HtReq

Put #

func Request

func Request(url string, method string, token string, jsData *[]byte) *HtReq

Request #

type WriteCounter added in v1.7.7

type WriteCounter struct {
	Total uint64
}

WriteCounter #

func (WriteCounter) PrintProgress added in v1.7.7

func (wc WriteCounter) PrintProgress()

PrintProgress #prints the progress of a file write

func (*WriteCounter) Write added in v1.7.7

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

Write #

type XFileInfo added in v1.7.7

type XFileInfo struct {
	Size uint64
	Time time.Time
}

XFileInfo #

Jump to

Keyboard shortcuts

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