client

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultHTTPTimeout represents default timeout period of HTTP requests.
	// See init.go for default value
	DefaultHTTPTimeout time.Duration
)

Functions

func NewHttpClient added in v0.6.0

func NewHttpClient(timeout time.Duration) (hc *http.Client)

func NewHttpGetRequest added in v0.6.0

func NewHttpGetRequest(url string, headers map[string]string) (req *http.Request, err error)

func Run

func Run(opt RunOption) (err error)

Types

type Mode added in v0.2.0

type Mode int
const (
	ModeDLOnly Mode = 1 << iota
	ModeExtract
	ModeExecutable
	ModeDefault = ModeExtract | ModeExecutable
)

type RunOption added in v0.3.0

type RunOption struct {
	Mode      Mode
	Source    string
	DestDir   string
	DestFile  string
	Output    io.Writer
	LogLevel  lv.Level
	ServerURL string
}

type Runner

type Runner struct {
	Mode      Mode
	Source    string
	DestDir   string
	DestFile  string
	Logger    lv.Loggable
	ServerURL *url.URL
	// contains filtered or unexported fields
}

func (*Runner) Run

func (r *Runner) Run() (err error)

Jump to

Keyboard shortcuts

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