wget

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2014 License: Apache-2.0 Imports: 14 Imported by: 5

Documentation

Overview

Wgetter downloads and saves/pipes HTTP requests

Index

Constants

View Source
const (
	VERSION              = "0.5.0"
	FILEMODE os.FileMode = 0660
)

Variables

This section is empty.

Functions

func WgetCli

func WgetCli(call []string) (error, int)

CLI invocation for wgetter

Types

type Wgetter

type Wgetter struct {
	IsContinue bool
	// should be set explicitly to false when running from CLI. uggo will detect as best as possible
	AlwaysPipeStdin      bool
	OutputFilename       string
	Timeout              int  //TODO
	Retries              int  //TODO
	IsVerbose            bool //todo
	DefaultPage          string
	UserAgent            string //todo
	ProxyUser            string //todo
	ProxyPassword        string //todo
	Referer              string //todo
	SaveHeaders          bool   //todo
	PostData             string //todo
	HttpUser             string //todo
	HttpPassword         string //todo
	IsNoCheckCertificate bool
	SecureProtocol       string
	// contains filtered or unexported fields
}

TODO ftp (3rd party supp?) clobber behaviour limit-rate timeouts - connect,read,dns? wait,waitretry proxies/? quota/? user/password/ask-password certificates/no-check-certificate ... exit statuses recursive downloads timestamping wgetrc

func Wget

func Wget(urls ...string) *Wgetter

Factory for wgetter

func WgetToOut

func WgetToOut(urls ...string) *Wgetter

Factory for wgetter which outputs to Stdout

func (*Wgetter) Exec

func (w *Wgetter) Exec(inPipe io.Reader, outPipe io.Writer, errPipe io.Writer) (error, int)

Perform the wget ...

func (*Wgetter) Name

func (tail *Wgetter) Name() string

Name() returns the name of the util

func (*Wgetter) ParseFlags

func (w *Wgetter) ParseFlags(call []string, errPipe io.Writer) (error, int)

Parse CLI flags

Jump to

Keyboard shortcuts

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