http

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB = 1024
	MB = KB * 1024
	GB = MB * 1024
)

Variables

View Source
var HTML = `` /* 924-byte string literal not displayed */

Functions

func Download

func Download(url string, output string, showProgress bool) error

func DownloadLinksInHtml

func DownloadLinksInHtml(url string, regex string, output string)

func FilePathHandler

func FilePathHandler(respWriter http.ResponseWriter, request *http.Request)

func GetHtml

func GetHtml(url string) *goquery.Document
func GetLinks(url string, regex string) list.List

func SimpleHttpFS

func SimpleHttpFS() error

func UrlJoin

func UrlJoin(url1 string, url2 string) string

Types

type HTTPFSConfig

type HTTPFSConfig struct {
	Port int16
	Root string
}
var FSConfig HTTPFSConfig

type HttpDownloader added in v0.0.6

type HttpDownloader struct {
	Output string
}

func (HttpDownloader) Download added in v0.0.6

func (downloader HttpDownloader) Download(file *HttpFile) error

type HttpFile added in v0.0.6

type HttpFile struct {
	Url  string
	Name string
	// contains filtered or unexported fields
}

func (HttpFile) GetSize added in v0.0.7

func (f HttpFile) GetSize() int

func (HttpFile) GuessName added in v0.0.7

func (f HttpFile) GuessName() string

type WebFile

type WebFile struct {
	Dir  string
	Name string
	Size int64
}

func (*WebFile) HumanSize added in v0.0.4

func (webFile *WebFile) HumanSize() string

func (*WebFile) IsDir

func (webFile *WebFile) IsDir() bool

func (*WebFile) LogicPath

func (webFile *WebFile) LogicPath() string

func (*WebFile) WebPath

func (webFile *WebFile) WebPath() string

Jump to

Keyboard shortcuts

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