pivnet

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Endpoint = "https://network.pivotal.io"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ProductVersions(string) ([]string, error)
	CreateRelease(config CreateReleaseConfig) (Release, error)
	GetRelease(string, string) (Release, error)
	UpdateRelease(string, Release) (Release, error)
	GetProductFiles(Release) (ProductFiles, error)
	GetProductFile(productSlug string, releaseID int, productID int) (ProductFile, error)
	AcceptEULA(productSlug string, releaseID int) error
	CreateProductFile(config CreateProductFileConfig) (ProductFile, error)
	DeleteProductFile(productSlug string, id int) (ProductFile, error)
	AddProductFile(productID int, releaseID int, productFileID int) error
	FindProductForSlug(slug string) (Product, error)
	AddUserGroup(productSlug string, releaseID int, userGroupID int) error
}

func NewClient

func NewClient(config NewClientConfig, logger logger.Logger) Client

type CreateProductFileConfig

type CreateProductFileConfig struct {
	ProductSlug  string
	FileVersion  string
	AWSObjectKey string
	Name         string
	MD5          string
}

type CreateReleaseConfig

type CreateReleaseConfig struct {
	ProductSlug     string
	ProductVersion  string
	ReleaseType     string
	ReleaseDate     string
	EulaSlug        string
	Description     string
	ReleaseNotesURL string
}

type CreateReleaseResponse

type CreateReleaseResponse struct {
	Release Release `json:"release,omitempty"`
}

type Eula

type Eula struct {
	Slug    string `json:"slug,omitempty"`
	ID      int    `json:"id,omitempty"`
	Version string `json:"version,omitempty"`
	Links   *Links `json:"_links,omitempty"`
}

type EulaResponse added in v0.0.35

type EulaResponse struct {
	AcceptedAt string `json:"accepted_at,omitempty"`
	Links      *Links `json:"_links,omitempty"`
}
type Links struct {
	Eula           map[string]string `json:"eula,omitempty"`
	Download       map[string]string `json:"download,omitempty"`
	ProductFiles   map[string]string `json:"product_files,omitempty"`
	EULAAcceptance map[string]string `json:"eula_acceptance,omitempty"`
}

type NewClientConfig

type NewClientConfig struct {
	Endpoint  string
	Token     string
	UserAgent string
}

type Product

type Product struct {
	ID   int    `json:"id,omitempty"`
	Slug string `json:"slug"`
}

type ProductFile

type ProductFile struct {
	ID           int    `json:"id,omitempty"`
	AWSObjectKey string `json:"aws_object_key,omitempty"`
	Links        *Links `json:"_links,omitempty"`
	FileType     string `json:"file_type,omitempty"`
	FileVersion  string `json:"file_version,omitempty"`
	Name         string `json:"name,omitempty"`
	MD5          string `json:"md5,omitempty"`
}

type ProductFileResponse

type ProductFileResponse struct {
	ProductFile ProductFile `json:"product_file,omitempty"`
}

type ProductFiles

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

type Release

type Release struct {
	ID              int    `json:"id,omitempty"`
	Availability    string `json:"availability,omitempty"`
	Eula            *Eula  `json:"eula,omitempty"`
	OSSCompliant    string `json:"oss_compliant,omitempty"`
	ReleaseDate     string `json:"release_date,omitempty"`
	ReleaseType     string `json:"release_type,omitempty"`
	Version         string `json:"version,omitempty"`
	Links           *Links `json:"_links,omitempty"`
	Description     string `json:"description,omitempty"`
	ReleaseNotesURL string `json:"release_notes_url,omitempty"`
}

type Response

type Response struct {
	Releases []Release `json:"releases,omitempty"`
}

type UserGroup added in v0.4.0

type UserGroup struct {
	ID          int    `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

type UserGroups added in v0.4.0

type UserGroups struct {
	UserGroups []UserGroup `json:"user_groups,omitempty"`
}

Jump to

Keyboard shortcuts

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