fetcher

package
v0.0.0-...-f7edce5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Github

type Github struct {
	//Github username and repository name
	User, Repo string
	//Interval between fetches
	Interval time.Duration
	//Asset is used to find matching release asset.
	//By default a file will match if it contains
	//both GOOS and GOARCH.
	Asset func(filename string) bool
	// contains filtered or unexported fields
}

Github uses the Github V3 API to retrieve the latest release of a given repository and enumerate its assets. If a release contains a matching asset, it will fetch and return its io.Reader stream.

func (*Github) Fetch

func (h *Github) Fetch() (io.Reader, error)

Fetch the binary from the provided Repository

func (*Github) Init

func (h *Github) Init() error

Init validates the provided config

Jump to

Keyboard shortcuts

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