Documentation ¶
Index ¶
- Variables
- func CheckConnectivity() (err error)
- type APIVersions
- type AccntList
- type AccountInfo
- type AuthorizedDownload
- type Client
- func (c *Client) AcceptEula(downloadGroup, productId string) (err error)
- func (c *Client) AccountInfo() (data AccountInfo, err error)
- func (c *Client) CheckLoggedIn() (err error)
- func (c *Client) CurrentUser() (data CurrentUser, err error)
- func (c *Client) EnsureProductDetailMap() (err error)
- func (c *Client) FetchDownloadLink(downloadPayload DownloadPayload) (data AuthorizedDownload, err error)
- func (c *Client) FetchEulaUrl(downloadGroup, productId string) (url string, err error)
- func (c *Client) FindDlgDetails(downloadGroup, productId, fileName string) (data FoundDownload, err error)
- func (c *Client) FindVersion(slug, subProduct, version, dlgType string) (data APIVersions, err error)
- func (c *Client) FindVersionFromGlob(versionGlob string, versionMap map[string]APIVersions) (version string, err error)
- func (c *Client) GenerateDownloadPayload(slug, subProduct, version, fileName, dlgType string, acceptEula bool) (data []DownloadPayload, err error)
- func (c *Client) GetCategory(slug string) (data string, err error)
- func (c *Client) GetDlgDetails(downloadGroup, productId string) (data DlgDetails, err error)
- func (c *Client) GetDlgEditionsList(slug, majorVersion, dlgType string) (data []DlgEditionsLists, err error)
- func (c *Client) GetDlgHeader(downloadGroup, productId string) (data DlgHeader, err error)
- func (c *Client) GetDlgProduct(slug, subProduct, version, dlgType string) (productID string, apiVersions APIVersions, err error)
- func (c *Client) GetFileArray(slug, subProduct, version, dlgType string) (data []string, err error)
- func (c *Client) GetMajorVersionsSlice(slug string) (data []string, err error)
- func (c *Client) GetProductsMap() (productMap map[string]ProductDetails, err error)
- func (c *Client) GetProductsSlice() (data []MajorProducts, err error)
- func (c *Client) GetSubProduct(slug, subProduct, dlgType string) (data SubProductDetails, err error)
- func (c *Client) GetSubProductDetails(slug, subProduct, majorVersion, dlgType string) (data DlgList, err error)
- func (c *Client) GetSubProductsMap(slug, dlgType, requestedMajorVersion string) (subProductMap map[string]SubProductDetails, err error)
- func (c *Client) GetSubProductsSlice(slug, dlgType, majorVersion string) (data []SubProductDetails, err error)
- func (c *Client) GetVersionMap(slug, subProductName, dlgType string) (data map[string]APIVersions, err error)
- func (c *Client) GetVersionSlice(slug, subProductName, dlgType string) (data []string, err error)
- type CurrentUser
- type Dlg
- type DlgDetails
- type DlgEditions
- type DlgEditionsLists
- type DlgHeader
- type DlgList
- type DownloadDetails
- type DownloadPayload
- type EligibilityResponse
- type EulaResponse
- type FoundDownload
- type MajorProductEntities
- type MajorProducts
- type MajorVersions
- type Product
- type ProductCategoryList
- type ProductDetails
- type ProductResponse
- type ProductVersions
- type SubProductDetails
- type SubProductSliceElement
- type TokenValidation
- type Versions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorDlgDetailsInputs = errors.New("dlgDetails: downloadGroup or productId invalid") ErrorNoMatchingFiles = errors.New("dlgDetails: no files match provided glob") ErrorMultipleMatchingFiles = errors.New("dlgDetails: more than 1 file matches glob") ErrorEulaUnaccepted = errors.New("dlgDetails: EULA needs to be accepted for this version") ErrorNotEntitled = errors.New("dlgDetails: user is not entitled to download this file") )
View Source
var ErrorAuthenticationFailure = errors.New("login: authentication failure")
View Source
var ErrorConnectionFailure = errors.New("login: server did not return 200 ok")
View Source
var ErrorDlgHeader = errors.New("dlgHeader: downloadGroup or productId invalid")
View Source
var ErrorEulaInputs = errors.New("eula: downloadGroup or productId invalid")
View Source
var ErrorInvalidCategory = errors.New("api: category is not valid")
View Source
var ErrorInvalidDownloadPayload = errors.New("download: invalid download payload")
View Source
var ErrorInvalidMajorVersion = errors.New("major version not found")
View Source
var ErrorInvalidSlug = errors.New("api: slug is not valid")
View Source
var ErrorInvalidSubProduct = errors.New("subproduct: invalid subproduct requested")
View Source
var ErrorInvalidSubProductMajorVersion = errors.New("subproduct: invalid major version requested")
View Source
var ErrorInvalidVersion = errors.New("api: version is not valid")
View Source
var ErrorMultipleVersionGlob = errors.New("versions: invalid glob. a single version glob must be used")
View Source
var ErrorNoMatchingVersions = errors.New("versions: invalid glob. no versions found")
View Source
var ErrorNoVersinGlob = errors.New("versions: invalid glob. glob my be provided")
View Source
var ErrorNon200Response = errors.New("account: server did not respond with 200 ok")
View Source
var ErrorNotAuthenticated = errors.New("generic: returned http 401 not authenticated")
View Source
var ErrorNotAuthorized = errors.New("account: you are not authenticated")
View Source
var ErrorServerError = errors.New("api: server down. 500 error received")
View Source
var ErrorXsrfFailure = errors.New("login: server did not return XSRF token")
View Source
var ProductDetailMap map[string]ProductDetails
Functions ¶
func CheckConnectivity ¶
func CheckConnectivity() (err error)
Types ¶
type APIVersions ¶
type AccountInfo ¶
type AuthorizedDownload ¶
type Client ¶
func (*Client) AcceptEula ¶
func (*Client) AccountInfo ¶
func (c *Client) AccountInfo() (data AccountInfo, err error)
func (*Client) CheckLoggedIn ¶
func (*Client) CurrentUser ¶
func (c *Client) CurrentUser() (data CurrentUser, err error)
func (*Client) EnsureProductDetailMap ¶
func (*Client) FetchDownloadLink ¶
func (c *Client) FetchDownloadLink(downloadPayload DownloadPayload) (data AuthorizedDownload, err error)
func (*Client) FetchEulaUrl ¶
func (*Client) FindDlgDetails ¶
func (c *Client) FindDlgDetails(downloadGroup, productId, fileName string) (data FoundDownload, err error)
func (*Client) FindVersion ¶
func (c *Client) FindVersion(slug, subProduct, version, dlgType string) (data APIVersions, err error)
func (*Client) FindVersionFromGlob ¶
func (*Client) GenerateDownloadPayload ¶
func (c *Client) GenerateDownloadPayload(slug, subProduct, version, fileName, dlgType string, acceptEula bool) (data []DownloadPayload, err error)
func (*Client) GetDlgDetails ¶
func (c *Client) GetDlgDetails(downloadGroup, productId string) (data DlgDetails, err error)
curl "https://my.vmware.com/channel/public/api/v1.0/dlg/details?downloadGroup=VMTOOLS1130&productId=1073" |jq
func (*Client) GetDlgEditionsList ¶
func (c *Client) GetDlgEditionsList(slug, majorVersion, dlgType string) (data []DlgEditionsLists, err error)
curl "https://my.vmware.com/channel/public/api/v1.0/products/getRelatedDLGList?category= &product=vmware_vsan&version=7_0&dlgType=PRODUCT_BINARY" |jq
func (*Client) GetDlgHeader ¶
func (*Client) GetDlgProduct ¶
func (c *Client) GetDlgProduct(slug, subProduct, version, dlgType string) (productID string, apiVersions APIVersions, err error)
func (*Client) GetFileArray ¶
func (*Client) GetMajorVersionsSlice ¶
func (*Client) GetProductsMap ¶
func (c *Client) GetProductsMap() (productMap map[string]ProductDetails, err error)
returned map is used to look up products by their slig
func (*Client) GetProductsSlice ¶
func (c *Client) GetProductsSlice() (data []MajorProducts, err error)
func (*Client) GetSubProduct ¶
func (c *Client) GetSubProduct(slug, subProduct, dlgType string) (data SubProductDetails, err error)
func (*Client) GetSubProductDetails ¶
func (*Client) GetSubProductsMap ¶
func (c *Client) GetSubProductsMap(slug, dlgType, requestedMajorVersion string) (subProductMap map[string]SubProductDetails, err error)
func (*Client) GetSubProductsSlice ¶
func (c *Client) GetSubProductsSlice(slug, dlgType, majorVersion string) (data []SubProductDetails, err error)
func (*Client) GetVersionMap ¶
func (c *Client) GetVersionMap(slug, subProductName, dlgType string) (data map[string]APIVersions, err error)
type CurrentUser ¶
type Dlg ¶
type Dlg struct { Name string `json:"name"` ReleaseDate string `json:"releaseDate"` Type string `json:"type"` Code string `json:"code"` Documentation string `json:"documentation"` InternalType string `json:"internalType"` IsFreeProduct bool `json:"isFreeProduct"` IsThirdParty bool `json:"isThirdParty"` IsMassMarket bool `json:"isMassMarket"` TagID int `json:"tagId"` Notes string `json:"notes"` Description string `json:"description"` CompatibleWith string `json:"compatibleWith"` }
type DlgDetails ¶
type DlgDetails struct { DownloadDetails []DownloadDetails `json:"downloadFiles"` EligibilityResponse EligibilityResponse `json:"eligibilityResponse"` EulaResponse EulaResponse `json:"eulaResponse"` }
type DlgEditions ¶
type DlgEditions struct {
DlgEditionsLists []DlgEditionsLists `json:"dlgEditionsLists"`
}
dlg list
type DlgEditionsLists ¶
type DownloadDetails ¶
type DownloadDetails struct { FileName string `json:"fileName"` Sha1Checksum string `json:"sha1checksum"` Sha256Checksum string `json:"sha256checksum"` Md5Checksum string `json:"md5checksum"` Build string `json:"build"` ReleaseDate string `json:"releaseDate"` FileType string `json:"fileType"` Description string `json:"description"` FileSize string `json:"fileSize"` Title string `json:"title"` Version string `json:"version"` Status string `json:"status"` UUID string `json:"uuid"` Header bool `json:"header"` DisplayOrder int `json:"displayOrder"` Relink bool `json:"relink"` Rsync bool `json:"rsync"` }
type DownloadPayload ¶
type DownloadPayload struct { Locale string `json:"locale"` // en_US DownloadGroup string `json:"downloadGroup"` // Versions versionMap[version].Code ProductId string `json:"productId"` // DlgList ProductID Md5checksum string `json:"md5checksum"` // dlgDetails Md5Checksum TagId int `json:"tagId"` // dlgHeader Dlg.TagID UUId string `json:"uUId"` // dlgDetails UUID DlgType string `json:"dlgType"` // dlgHeader Dlg.Type replace(/&/g, '&') ProductFamily string `json:"productFamily"` // dlgHeader Product.Name ReleaseDate string `json:"releaseDate"` // dlgDetails ReleaseDate DlgVersion string `json:"dlgVersion"` // dlgDetails Version IsBetaFlow bool `json:"isBetaFlow"` // false }
type EligibilityResponse ¶
type EligibilityResponse struct {
EligibleToDownload bool `json:"eligibleToDownload"`
}
type EulaResponse ¶
type FoundDownload ¶
type FoundDownload struct { DownloadDetails []DownloadDetails EulaAccepted bool EligibleToDownload bool }
type MajorProductEntities ¶
type MajorProducts ¶
type MajorProducts struct { MajorProductEntities []MajorProductEntities `json:"actions"` Name string `json:"name"` }
type MajorVersions ¶
type MajorVersions struct {
ID string `json:"id"`
}
type ProductCategoryList ¶
type ProductCategoryList struct { ID string `json:"id"` Name string `json:"name"` MajorProducts []MajorProducts `json:"productList"` }
type ProductDetails ¶
type ProductResponse ¶
type ProductResponse struct {
ProductCategoryList []ProductCategoryList `json:"productCategoryList"`
}
type ProductVersions ¶
type ProductVersions struct { MajorVersions []MajorVersions `json:"versions"` Resources []interface{} `json:"resources"` }
type SubProductDetails ¶
type SubProductSliceElement ¶
type TokenValidation ¶
Click to show internal directories.
Click to hide internal directories.