pivnet

package
v0.0.0-...-dcd8ac6 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	AcceptEULA(product string, releaseID int) error
	ListFilesForRelease(product string, releaseID int) ([]pivnet.ProductFile, error)
	FindReleaseByVersionConstraint(slug string, constraint *semver.Constraints) (*pivnet.Release, error)
	DownloadFile(slug string, releaseID int, productFile *pivnet.ProductFile) error
}

type ClientWrapper

type ClientWrapper struct {
	PivnetClient pivnet.Client
}

func (*ClientWrapper) AcceptEULA

func (c *ClientWrapper) AcceptEULA(product string, releaseID int) error

func (*ClientWrapper) DownloadProductFile

func (c *ClientWrapper) DownloadProductFile(
	location *download.FileInfo,
	productSlug string,
	releaseID int,
	productFileID int,
	progressWriter io.Writer) error

func (*ClientWrapper) ListFilesForRelease

func (c *ClientWrapper) ListFilesForRelease(product string, releaseID int) ([]pivnet.ProductFile, error)

func (*ClientWrapper) ListReleases

func (c *ClientWrapper) ListReleases(product string) ([]pivnet.Release, error)

func (*ClientWrapper) NewFileInfo

func (c *ClientWrapper) NewFileInfo(file *os.File) (*download.FileInfo, error)

type PivNetClient

type PivNetClient struct {
	Logger  lager.Logger
	Wrapper Wrapper
}

func NewPivNetClient

func NewPivNetClient(token string) *PivNetClient

func (*PivNetClient) AcceptEULA

func (c *PivNetClient) AcceptEULA(product string, releaseID int) error

func (*PivNetClient) DownloadFile

func (c *PivNetClient) DownloadFile(slug string, releaseID int, productFile *pivnet.ProductFile) error

func (*PivNetClient) FindReleaseByVersionConstraint

func (c *PivNetClient) FindReleaseByVersionConstraint(slug string, constraint *semver.Constraints) (*pivnet.Release, error)

func (*PivNetClient) ListFilesForRelease

func (c *PivNetClient) ListFilesForRelease(product string, releaseID int) ([]pivnet.ProductFile, error)

type Wrapper

type Wrapper interface {
	AcceptEULA(product string, releaseID int) error
	ListReleases(product string) ([]pivnet.Release, error)
	ListFilesForRelease(product string, releaseID int) ([]pivnet.ProductFile, error)
	DownloadProductFile(
		location *download.FileInfo,
		productSlug string,
		releaseID int,
		productFileID int,
		progressWriter io.Writer) error
	NewFileInfo(file *os.File) (*download.FileInfo, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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