pivnet

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Eula

type Eula struct {
	Name    string
	Content string
	Slug    string
}

type Sdk

type Sdk struct {
	// contains filtered or unexported fields
}

func NewSdk

func NewSdk(apiToken string, logger *log.Logger) (*Sdk, error)

func (*Sdk) AcceptEula

func (s *Sdk) AcceptEula(tile config.PivnetMetadata) error

func (*Sdk) DownloadTile

func (s *Sdk) DownloadTile(tile config.PivnetMetadata) (file *os.File, err error)

DownloadTile retrieves a given productSlug, releaseId, and fileId from PivNet If a os.File is return it is guarenteed to match the fileSha256 If an error is returned no os.File will be returned

Caller is responsible for deleting the os.File

func (*Sdk) DownloadTileToPath

func (s *Sdk) DownloadTileToPath(tile config.PivnetMetadata, path string) (file *os.File, err error)

DownloadTileToPath is a version of DownloadTile that accepts a path specifying download location of the tile.

func (*Sdk) GetEula

func (s *Sdk) GetEula(eulaSlug string) (*Eula, error)

type TileCache

type TileCache struct {
	Dir string
}

func (*TileCache) FileName

func (tc *TileCache) FileName(tile config.PivnetMetadata) string

func (*TileCache) Open

func (tc *TileCache) Open(tile config.PivnetMetadata) (*os.File, error)

Jump to

Keyboard shortcuts

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