artifetcher

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package artifetcher downloads the artifact given a URL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewArtifetcher

func NewArtifetcher(fs *afero.Afero, ex I.Extractor, log I.Logger) I.Fetcher

Types

type Artifetcher

type Artifetcher struct {
	FileSystem *afero.Afero
	Extractor  I.Extractor
	Log        I.Logger
}

Artifetcher fetches artifacts within a file system with an Extractor.

func (*Artifetcher) Fetch

func (a *Artifetcher) Fetch(url, manifest string) (string, error)

Fetch downloads an artifact located at URL. It then passes it to the extractor with the manifest for unzipping.

Returns a string to the unzipped artifacts path and an error.

func (*Artifetcher) FetchZipFromRequest added in v0.4.0

func (a *Artifetcher) FetchZipFromRequest(body io.Reader) (string, string, error)

FetchZipFromRequest fetches files from a compressed zip file in the request body.

Returns a string to the unzipped application path and an error.

type ArtifetcherConstructor

type ArtifetcherConstructor func(fs *afero.Afero, ex I.Extractor, log I.Logger) I.Fetcher

type CreateTempDirectoryError added in v0.6.0

type CreateTempDirectoryError struct {
	Err error
}

func (CreateTempDirectoryError) Error added in v0.6.0

func (e CreateTempDirectoryError) Error() string

type CreateTempFileError added in v0.6.0

type CreateTempFileError struct {
	Err error
}

func (CreateTempFileError) Error added in v0.6.0

func (e CreateTempFileError) Error() string

type FetcherRequestError

type FetcherRequestError struct {
	Err error
}

func (FetcherRequestError) Error

func (e FetcherRequestError) Error() string

type GetStatusError added in v0.6.0

type GetStatusError struct {
	Url    string
	Status string
}

func (GetStatusError) Error added in v0.6.0

func (e GetStatusError) Error() string

type GetUrlError added in v0.6.0

type GetUrlError struct {
	Url string
	Err error
}

func (GetUrlError) Error added in v0.6.0

func (e GetUrlError) Error() string

type UnzipError added in v0.6.0

type UnzipError struct {
	Err error
}

func (UnzipError) Error added in v0.6.0

func (e UnzipError) Error() string

type WriteResponseError added in v0.6.0

type WriteResponseError struct {
	Err error
}

func (WriteResponseError) Error added in v0.6.0

func (e WriteResponseError) Error() string

Directories

Path Synopsis
Package extractor unzips artifacts.
Package extractor unzips artifacts.

Jump to

Keyboard shortcuts

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