cache

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheCommandPath

func CacheCommandPath() (string, error)

func CacheDownloadPath

func CacheDownloadPath() (string, error)

func DownloadToTempFile

func DownloadToTempFile(r *Request) (string, error)

Returns the path on the local file system for the requested exe

func ExeSuffix

func ExeSuffix(platform string, name string) string

func Exists

func Exists(filename string) (bool, error)

func Get

func Get(r *Request) (string, error)

func HttpGet

func HttpGet(url string, to io.Writer) error

func Verify

func Verify(r *Request, file string) error

func WithHttpGetReader

func WithHttpGetReader(url string, action func(io.Reader) error, filters ...func(r io.Reader) (io.Reader, error)) error

Types

type Request

type Request struct {
	URL           string             `json:"url,omitempty"`
	Signature     string             `json:"signature,omitempty"`
	Size          int64              `json:"size,omitempty"`
	ExtractZip    string             `json:"extract-zip,omitempty"`
	ExtractTgz    string             `json:"extract-tgz,omitempty"`
	Uncompress    string             `json:"uncompress,omitempty"`
	Platform      string             `json:"-"`
	Version       string             `json:"-"`
	CommandName   string             `json:"-"`
	ForceDownload bool               `json:"-"`
	InfoLog       io.Writer          `json:"-"`
	DebugLog      io.Writer          `json:"-"`
	Keyring       openpgp.EntityList `json:"-"`
}

Jump to

Keyboard shortcuts

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