Documentation ¶
Index ¶
- Constants
- func Matches(fileFullName, productSlug, pattern, version string) (bool, error)
- func Sign(req *request.Request)
- type HTTPProvider
- func (h *HTTPProvider) ContentURL(slug, version, pattern string) string
- func (h *HTTPProvider) Download(targetFile string, contentURL string) error
- func (h *HTTPProvider) DownloadFile(targetDirectory, productSlug, version, pattern string, unpack bool) error
- func (h *HTTPProvider) FileName(version, pattern string) string
- type PivnetProvider
- type Provider
- func FromSource(source types.Source) (Provider, error)
- func NewHTTPProvider(skipSSLValidation bool, baseURL string) (Provider, error)
- func NewPivnetProvider(token string) (Provider, error)
- func NewS3Provider(accessKeyID, secretAccessKey, regionName, endpoint, bucketName string, ...) (Provider, error)
- type S3Provider
Constants ¶
View Source
const URL_PATTERN = "%s/%s/%s/%s"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPProvider ¶ added in v0.0.4
type HTTPProvider struct { BaseURL string HTTPClient *http.Client Bar bar ProgressWriter io.Writer Logger logger.Logger }
func (*HTTPProvider) ContentURL ¶ added in v0.0.4
func (h *HTTPProvider) ContentURL(slug, version, pattern string) string
func (*HTTPProvider) Download ¶ added in v0.0.4
func (h *HTTPProvider) Download( targetFile string, contentURL string, ) error
func (*HTTPProvider) DownloadFile ¶ added in v0.0.4
func (h *HTTPProvider) DownloadFile(targetDirectory, productSlug, version, pattern string, unpack bool) error
func (*HTTPProvider) FileName ¶ added in v0.0.4
func (h *HTTPProvider) FileName(version, pattern string) string
type PivnetProvider ¶
type PivnetProvider struct {
// contains filtered or unexported fields
}
func (*PivnetProvider) DownloadFile ¶
func (p *PivnetProvider) DownloadFile(targetDirectory, productSlug, version, pattern string, unpack bool) error
DownloadFile - Downloads file based on version info
type Provider ¶
type Provider interface {
DownloadFile(targetDirectory, productSlug, version, pattern string, unpack bool) error
}
Provider - defines the interface for how to fetch configuration
func FromSource ¶
FromSource - factory to return appropriate driver based on configuration
func NewHTTPProvider ¶ added in v0.0.4
func NewPivnetProvider ¶
type S3Provider ¶
func (*S3Provider) DownloadFile ¶
func (p *S3Provider) DownloadFile(targetDirectory, productSlug, version, pattern string, unpack bool) error
DownloadFile - Downloads file based on version info
Source Files ¶
Click to show internal directories.
Click to hide internal directories.