Documentation ¶
Index ¶
- Constants
- func ApplyParameters(url *url.URL, parameters ...QueryStringParameter)
- func Hash(filePath, hashAlgorithm string) (string, error)
- func LoadChart(chartPath string) (*models.ChartVersion, error)
- func MakeURL(host, path string, values url.Values) *url.URL
- type Asset
- type ChartLoaderFunc
- type CredentialsResponse
- type DebuggingClient
- func (c *DebuggingClient) Do(req *http.Request) (*http.Response, error)
- func (c *DebuggingClient) Get(requestURL *url.URL) (*http.Response, error)
- func (c *DebuggingClient) Post(requestURL *url.URL, content io.Reader, contentType string) (*http.Response, error)
- func (c *DebuggingClient) PostForm(requestURL *url.URL, content url.Values) (resp *http.Response, err error)
- func (c *DebuggingClient) PostJSON(requestURL *url.URL, content interface{}) (*http.Response, error)
- func (c *DebuggingClient) Put(requestURL *url.URL, content io.Reader, contentType string) (*http.Response, error)
- func (c *DebuggingClient) SendRequest(method string, requestURL *url.URL, headers map[string]string, ...) (*http.Response, error)
- type DownloadRequestPayload
- type DownloadResponse
- type DownloadResponseBody
- type GetProductResponse
- type GetProductResponsePayload
- type HTTPClient
- type ListProductFilter
- type ListProductResponse
- type ListProductResponseParams
- type ListProductResponsePayload
- type Marketplace
- func (m *Marketplace) AttachLocalChart(chartPath, instructions string, product *models.Product, ...) (*models.Product, error)
- func (m *Marketplace) AttachLocalContainerImage(imageFile, image, tag, tagType, instructions string, product *models.Product, ...) (*models.Product, error)
- func (m *Marketplace) AttachMetaFile(metafile, metafileType, metafileVersion string, product *models.Product, ...) (*models.Product, error)
- func (m *Marketplace) AttachOtherFile(file string, product *models.Product, version *models.Version) (*models.Product, error)
- func (m *Marketplace) AttachPublicChart(chartPath *url.URL, instructions string, product *models.Product, ...) (*models.Product, error)
- func (m *Marketplace) AttachPublicContainerImage(image, tag, tagType, instructions string, product *models.Product, ...) (*models.Product, error)
- func (m *Marketplace) DecodeJson(input io.Reader, output interface{}) error
- func (m *Marketplace) Download(filename string, payload *DownloadRequestPayload) error
- func (m *Marketplace) DownloadChart(chartURL *url.URL) (*models.ChartVersion, error)
- func (m *Marketplace) EnableStrictDecoding()
- func (m *Marketplace) GetAPIHost() string
- func (m *Marketplace) GetHost() string
- func (m *Marketplace) GetProduct(slug string) (*models.Product, error)
- func (m *Marketplace) GetProductWithVersion(slug, version string) (*models.Product, *models.Version, error)
- func (m *Marketplace) GetUIHost() string
- func (m *Marketplace) GetUploadCredentials() (*CredentialsResponse, error)
- func (m *Marketplace) GetUploader(orgID string) (internal.Uploader, error)
- func (m *Marketplace) ListProducts(filter *ListProductFilter) ([]*models.Product, error)
- func (m *Marketplace) PutProduct(product *models.Product, versionUpdate bool) (*models.Product, error)
- func (m *Marketplace) SetUploader(uploader internal.Uploader)
- func (m *Marketplace) UploadVM(vmFile string, product *models.Product, version *models.Version) (*models.Product, error)
- type MarketplaceInterface
- type PerformRequestFunc
- type QueryStringParameter
- type VersionDoesNotExistError
- type VersionSpecificDetailsPayload
- type VersionSpecificDetailsPayloadResponse
- type VersionSpecificDetailsRequestPayload
Constants ¶
View Source
const ( AssetTypeOther = "Other" AssetTypeVM = "VM" AssetTypeChart = "Chart" AssetTypeContainerImage = "Container Image" AssetTypeMetaFile = "MetaFile" )
View Source
const ( MetaFileTypeCLI = "CLI" MetaFileTypeConfig = "CONFIG" MetaFileTypeOther = "MISC" )
Variables ¶
This section is empty.
Functions ¶
func ApplyParameters ¶
func ApplyParameters(url *url.URL, parameters ...QueryStringParameter)
Types ¶
type Asset ¶
type Asset struct { DisplayName string `json:"displayname"` Filename string `json:"filename"` Version string `json:"version"` Type string `json:"type"` Size int64 `json:"size"` Downloadable bool `json:"downloadable"` Downloads int64 `json:"downloads"` DownloadRequestPayload *DownloadRequestPayload `json:"-"` Error string `json:"error,omitempty"` Status string `json:"status,omitempty"` }
type ChartLoaderFunc ¶
var ChartLoader ChartLoaderFunc = loader.Load
type CredentialsResponse ¶
type CredentialsResponse struct { AccessID string `json:"accessId"` AccessKey string `json:"accessKey"` SessionToken string `json:"sessionToken"` Expiration time.Time `json:"expiration"` }
func (*CredentialsResponse) AWSCredentials ¶
func (c *CredentialsResponse) AWSCredentials() aws.Credentials
type DebuggingClient ¶
type DebuggingClient struct { Logger *log.Logger PrintRequests bool PrintRequestPayloads bool PrintResposePayloads bool PerformRequest PerformRequestFunc // contains filtered or unexported fields }
func NewClient ¶
func NewClient(output io.Writer, printRequests, printRequestPayloads, printResponsePayloads bool) *DebuggingClient
type DownloadRequestPayload ¶
type DownloadRequestPayload struct { ProductId string `json:"productid,omitempty"` AppVersion string `json:"appVersion,omitempty"` EulaAccepted bool `json:"eulaAccepted"` DockerlinkVersionID string `json:"dockerlinkVersionId,omitempty"` DockerUrlId string `json:"dockerUrlId,omitempty"` ImageTagId string `json:"imageTagId,omitempty"` DeploymentFileId string `json:"deploymentFileId,omitempty"` ChartVersion string `json:"chartVersion,omitempty"` IsAddonFile bool `json:"isAddonFile,omitempty"` AddonFileId string `json:"addonFileId,omitempty"` MetaFileID string `json:"metafileid,omitempty"` MetaFileObjectID string `json:"metafileobjectid,omitempty"` }
type DownloadResponse ¶
type DownloadResponse struct {
Response *DownloadResponseBody `json:"response"`
}
type DownloadResponseBody ¶
type GetProductResponse ¶
type GetProductResponse struct {
Response *GetProductResponsePayload `json:"response"`
}
type HTTPClient ¶
type HTTPClient interface { Get(requestURL *url.URL) (*http.Response, error) Post(requestURL *url.URL, content io.Reader, contentType string) (*http.Response, error) PostForm(requestURL *url.URL, content url.Values) (resp *http.Response, err error) PostJSON(requestURL *url.URL, content interface{}) (*http.Response, error) Put(requestURL *url.URL, content io.Reader, contentType string) (*http.Response, error) SendRequest(method string, requestURL *url.URL, headers map[string]string, content io.Reader) (*http.Response, error) Do(req *http.Request) (*http.Response, error) }
type ListProductFilter ¶
type ListProductFilter struct { Text string `json:"search,omitempty"` AllOrgs bool `json:"-"` OrgIds []string `json:"Publishers,omitempty"` }
func (*ListProductFilter) QueryString ¶
func (f *ListProductFilter) QueryString() string
type ListProductResponse ¶
type ListProductResponse struct {
Response *ListProductResponsePayload `json:"response"`
}
type ListProductResponseParams ¶
type ListProductResponseParams struct { Filters map[string][]interface{} `json:"filters"` Pagination *internal.Pagination `json:"pagination"` ProductCount int `json:"itemsnumber"` Search string `json:"search"` SortingList []*internal.Sorting `json:"sortinglist"` SelectList []interface{} `json:"selectlist"` }
type ListProductResponsePayload ¶
type ListProductResponsePayload struct { Message string `json:"message"` StatusCode int `json:"statuscode"` Products []*models.Product `json:"dataList"` AvailableFilters interface{} `json:"availablefilters"` Params *ListProductResponseParams `json:"params"` }
type Marketplace ¶
type Marketplace struct { Host string APIHost string UIHost string StorageBucket string StorageRegion string Client HTTPClient Output io.Writer // contains filtered or unexported fields }
func (*Marketplace) AttachLocalChart ¶
func (*Marketplace) AttachLocalContainerImage ¶
func (*Marketplace) AttachMetaFile ¶
func (*Marketplace) AttachOtherFile ¶
func (*Marketplace) AttachPublicChart ¶
func (*Marketplace) AttachPublicContainerImage ¶
func (*Marketplace) DecodeJson ¶
func (m *Marketplace) DecodeJson(input io.Reader, output interface{}) error
func (*Marketplace) Download ¶
func (m *Marketplace) Download(filename string, payload *DownloadRequestPayload) error
func (*Marketplace) DownloadChart ¶
func (m *Marketplace) DownloadChart(chartURL *url.URL) (*models.ChartVersion, error)
func (*Marketplace) EnableStrictDecoding ¶
func (m *Marketplace) EnableStrictDecoding()
func (*Marketplace) GetAPIHost ¶
func (m *Marketplace) GetAPIHost() string
func (*Marketplace) GetHost ¶
func (m *Marketplace) GetHost() string
func (*Marketplace) GetProduct ¶
func (m *Marketplace) GetProduct(slug string) (*models.Product, error)
func (*Marketplace) GetProductWithVersion ¶
func (*Marketplace) GetUIHost ¶
func (m *Marketplace) GetUIHost() string
func (*Marketplace) GetUploadCredentials ¶
func (m *Marketplace) GetUploadCredentials() (*CredentialsResponse, error)
func (*Marketplace) GetUploader ¶
func (m *Marketplace) GetUploader(orgID string) (internal.Uploader, error)
func (*Marketplace) ListProducts ¶
func (m *Marketplace) ListProducts(filter *ListProductFilter) ([]*models.Product, error)
func (*Marketplace) PutProduct ¶
func (*Marketplace) SetUploader ¶
func (m *Marketplace) SetUploader(uploader internal.Uploader)
type MarketplaceInterface ¶
type MarketplaceInterface interface { EnableStrictDecoding() DecodeJson(input io.Reader, output interface{}) error GetHost() string GetAPIHost() string GetUIHost() string ListProducts(filter *ListProductFilter) ([]*models.Product, error) GetProduct(slug string) (*models.Product, error) GetProductWithVersion(slug, version string) (*models.Product, *models.Version, error) PutProduct(product *models.Product, versionUpdate bool) (*models.Product, error) GetUploader(orgID string) (internal.Uploader, error) SetUploader(uploader internal.Uploader) Download(filename string, payload *DownloadRequestPayload) error DownloadChart(chartURL *url.URL) (*models.ChartVersion, error) AttachLocalChart(chartPath, instructions string, product *models.Product, version *models.Version) (*models.Product, error) AttachPublicChart(chartPath *url.URL, instructions string, product *models.Product, version *models.Version) (*models.Product, error) AttachLocalContainerImage(imageFile, image, tag, tagType, instructions string, product *models.Product, version *models.Version) (*models.Product, error) AttachPublicContainerImage(image, tag, tagType, instructions string, product *models.Product, version *models.Version) (*models.Product, error) AttachMetaFile(metafile, metafileType, metafileVersion string, product *models.Product, version *models.Version) (*models.Product, error) AttachOtherFile(file string, product *models.Product, version *models.Version) (*models.Product, error) UploadVM(vmFile string, product *models.Product, version *models.Version) (*models.Product, error) }
type QueryStringParameter ¶
type QueryStringParameter interface {
QueryString() string
}
type VersionDoesNotExistError ¶
func (*VersionDoesNotExistError) Error ¶
func (e *VersionDoesNotExistError) Error() string
func (*VersionDoesNotExistError) Is ¶
func (e *VersionDoesNotExistError) Is(otherError error) bool
type VersionSpecificDetailsPayload ¶
type VersionSpecificDetailsPayload struct { Message string `json:"message"` StatusCode int `json:"statuscode"` Data *models.VersionSpecificProductDetails `json:"data"` }
type VersionSpecificDetailsPayloadResponse ¶
type VersionSpecificDetailsPayloadResponse struct {
Response *VersionSpecificDetailsPayload `json:"response"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.