resource

package
v0.0.0-...-8d1665c Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2016 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	Version = "0.2.0"
)

Variables

View Source
var RequireEula = 451

Functions

This section is empty.

Types

type Eula

type Eula struct {
	Id   int    `json:"id"`
	Slug string `json:"slug"`
	Name string `json:"name"`
}

type EulaMessage

type EulaMessage struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
	Links   Links  `json:"_links"`
}

type HttpClient

type HttpClient interface {
	Do(req *http.Request) (resp *http.Response, err error)
	DoWithoutRedirect(req *http.Request) (resp *http.Response, err error)
}
type Link struct {
	Url string `json:"href"`
}
type Links map[string]Link

type PivnetRequester

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

func (*PivnetRequester) GetProduct

func (p *PivnetRequester) GetProduct(productName string) (*Product, error)

func (*PivnetRequester) GetProductDownloadUrl

func (p *PivnetRequester) GetProductDownloadUrl(productFile *ProductFile) (string, error)

func (*PivnetRequester) GetProductFiles

func (p *PivnetRequester) GetProductFiles(release Release) (*ProductFiles, error)

type Product

type Product struct {
	Releases []Release `json:"releases"`
}

type ProductFile

type ProductFile struct {
	Id           int    `json:"id"`
	AwsObjectKey string `json:"aws_object_key"`
	FileVersion  string `json:"file_version"`
	Links        Links  `json:"_links"`
}

func (*ProductFile) Name

func (p *ProductFile) Name() string

type ProductFiles

type ProductFiles struct {
	Files []ProductFile `json:"product_files"`
}

type Release

type Release struct {
	Id              int    `json:"id"`
	Version         string `json:"version"`
	ReleaseType     string `json:"release_type"`
	ReleaseDate     string `json:"release_date"`
	ReleaseNotesUrl string `json:"release_notes_url"`
	Availability    string `json:"availability"`
	Description     string `json:"description"`
	Eula            Eula   `json:"eula"`
	Links           Links  `json:"_links"`
}

type ReleaseRequester

type ReleaseRequester interface {
	GetProduct(productName string) (*Product, error)
	GetProductFiles(release Release) (*ProductFiles, error)
	GetProductDownloadUrl(productFile *ProductFile) (string, error)
}

func NewRequester

func NewRequester(url string, token string) ReleaseRequester

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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