pivnet

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 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(productSlug string, releases []Release) ([]string, error)
	CreateRelease(CreateReleaseConfig) (Release, error)
	ReleasesForProductSlug(string) ([]Release, error)
	GetRelease(productSlug string, version string) (Release, error)
	UpdateRelease(string, Release) (Release, error)
	DeleteRelease(Release, string) error
	GetProductFiles(Release) (ProductFiles, error)
	GetProductFile(productSlug string, releaseID int, productID int) (ProductFile, error)
	EULAs() ([]EULA, error)
	AcceptEULA(productSlug string, releaseID int) error
	CreateProductFile(CreateProductFileConfig) (ProductFile, error)
	DeleteProductFile(productSlug string, id int) (ProductFile, error)
	AddProductFile(productID int, releaseID int, productFileID int) error
	FindProductForSlug(slug string) (Product, error)
	UserGroups(productSlug string, releaseID int) ([]UserGroup, error)
	AddUserGroup(productSlug string, releaseID int, userGroupID int) error
	ReleaseETag(string, Release) (string, error)
	ReleaseTypes() ([]string, error)
	ReleaseDependencies(productSlug string, releaseID int) ([]ReleaseDependency, 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
	Description  string
}

type CreateReleaseConfig

type CreateReleaseConfig struct {
	ProductSlug           string
	ProductVersion        string
	ReleaseType           string
	ReleaseDate           string
	EULASlug              string
	Description           string
	ReleaseNotesURL       string
	Controlled            bool
	ECCN                  string
	LicenseException      string
	EndOfSupportDate      string
	EndOfGuidanceDate     string
	EndOfAvailabilityDate string
}

type CreateReleaseResponse

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

type DependentRelease added in v0.16.0

type DependentRelease struct {
	ID      int     `json:"id,omitempty"`
	Version string  `json:"version,omitempty"`
	Product Product `json:"product,omitempty"`
}

type EULA added in v0.13.0

type EULA struct {
	Slug    string `json:"slug,omitempty"`
	ID      int    `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Content string `json:"content,omitempty"`
	Links   *Links `json:"_links,omitempty"`
}

type EULAAcceptanceResponse added in v0.13.0

type EULAAcceptanceResponse struct {
	AcceptedAt string `json:"accepted_at,omitempty"`
	Links      *Links `json:"_links,omitempty"`
}

type EULAsResponse added in v0.13.0

type EULAsResponse struct {
	EULAs []EULA `json:"eulas,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,omitempty"`
	Name string `json:"name,omitempty"`
}

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"`
	Description  string `json:"description,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"`
	Controlled            bool   `json:"controlled,omitempty"`
	ECCN                  string `json:"eccn,omitempty"`
	LicenseException      string `json:"license_exception,omitempty"`
	EndOfSupportDate      string `json:"end_of_support_date,omitempty"`
	EndOfGuidanceDate     string `json:"end_of_guidance_date,omitempty"`
	EndOfAvailabilityDate string `json:"end_of_availability_date,omitempty"`
}

type ReleaseDependenciesResponse added in v0.16.0

type ReleaseDependenciesResponse struct {
	ReleaseDependencies []ReleaseDependency `json:"dependencies,omitempty"`
}

type ReleaseDependency added in v0.16.0

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

type ReleaseTypesResponse added in v0.11.0

type ReleaseTypesResponse struct {
	ReleaseTypes []string `json:"release_types"`
}

type ReleasesResponse added in v0.9.0

type ReleasesResponse 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"`
}

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