Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInsecure ¶
GetInsecure downloads a zip and extracts it to the dir.
func GetWithSha256 ¶
GetWithSha256 downloads a zip, verifies it and extracts it to the dir.
Types ¶
type Fetcher ¶
type Fetcher interface { // Get gets the file and returns an stream to read the file. Get(uri string) (io.ReadCloser, error) }
Fetcher is used to get files from a URI.
type HTTPFetcher ¶
type HTTPFetcher struct{}
HTTPFetcher is used to get a file from a http:// or https:// schema path.
func (HTTPFetcher) Get ¶
func (HTTPFetcher) Get(uri string) (io.ReadCloser, error)
Get gets the file and returns an stream to read the file.
type Verifier ¶
Verifier can check a reader againtst it's correctness.
func NewSha256Verifier ¶
NewSha256Verifier creates a Verifier that tests against the given hash.
func NewTrueVerifier ¶
func NewTrueVerifier() Verifier
NewTrueVerifier returns a Verifier that always verifies to true.
Click to show internal directories.
Click to hide internal directories.