Documentation
¶
Overview ¶
Package marketplace provides methods and message types of the marketplace v1 API.
Index ¶
- type API
- func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*GetImageResponse, error)
- func (s *API) GetLocalImageIDByLabel(req *GetLocalImageIDByLabelRequest, opts ...scw.RequestOption) (string, error)
- func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)
- type GetImageRequest
- type GetImageResponse
- type GetLocalImageIDByLabelRequest
- type Image
- type ListImagesRequest
- type ListImagesResponse
- type LocalImage
- type Organization
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
Marketplace API.
func (*API) GetImage ¶
func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*GetImageResponse, error)
GetImage: Get a specific marketplace image.
func (*API) GetLocalImageIDByLabel ¶
func (s *API) GetLocalImageIDByLabel(req *GetLocalImageIDByLabelRequest, opts ...scw.RequestOption) (string, error)
GetLocalImageIDByLabel search for an image with the given label (exact match) in the given region it returns the latest version of this specific image.
func (*API) ListImages ¶
func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)
ListImages: List marketplace images.
type GetImageRequest ¶
type GetImageRequest struct {
// ImageID: display the image name.
ImageID string `json:"-"`
}
GetImageRequest: get image request.
type GetImageResponse ¶
type GetImageResponse struct {
Image *Image `json:"image"`
}
GetImageResponse: get image response.
type GetLocalImageIDByLabelRequest ¶
GetLocalImageIDByLabelRequest is used by GetLocalImageIDByLabel
type Image ¶
type Image struct {
// ID: UUID of this image.
ID string `json:"id"`
// Name: name of the image.
Name string `json:"name"`
// Description: text description of this image.
Description string `json:"description"`
// Logo: URL of this image's logo.
Logo string `json:"logo"`
// Categories: list of categories this image belongs to.
Categories []string `json:"categories"`
// CreationDate: creation date of this image.
CreationDate *time.Time `json:"creation_date"`
// ModificationDate: date of the last modification of this image.
ModificationDate *time.Time `json:"modification_date"`
// ValidUntil: expiration date of this image.
ValidUntil *time.Time `json:"valid_until"`
// Label: typically an identifier for a distribution (ex. "ubuntu_focal").
Label string `json:"label"`
// Versions: list of versions of this image.
Versions []*Version `json:"versions"`
// Organization: organization this image belongs to.
Organization *Organization `json:"organization"`
CurrentPublicVersion string `json:"current_public_version"`
}
Image: image.
type ListImagesRequest ¶
type ListImagesRequest struct {
// PerPage: a positive integer lower or equal to 100 to select the number of items to display.
PerPage *uint32 `json:"-"`
// Page: a positive integer to choose the page to display.
Page *int32 `json:"-"`
}
ListImagesRequest: list images request.
type ListImagesResponse ¶
type ListImagesResponse struct {
Images []*Image `json:"images"`
TotalCount uint32 `json:"total_count"`
}
ListImagesResponse: list images response.
func (*ListImagesResponse) UnsafeAppend ¶
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListImagesResponse) UnsafeGetTotalCount ¶
func (r *ListImagesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListImagesResponse) UnsafeSetTotalCount ¶
func (r *ListImagesResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type LocalImage ¶
type LocalImage struct {
// ID: version you will typically use to define an image in an API call.
ID string `json:"id"`
// CompatibleCommercialTypes: list of all commercial types that are compatible with this local image.
CompatibleCommercialTypes []string `json:"compatible_commercial_types"`
// Arch: supported architecture for this local image.
Arch string `json:"arch"`
// Zone: availability Zone where this local image is available.
Zone scw.Zone `json:"zone"`
}
LocalImage: local image.
type Organization ¶
Organization: organization.
type Version ¶
type Version struct {
// ID: UUID of this version.
ID string `json:"id"`
// Name: name of this version.
Name string `json:"name"`
// CreationDate: creation date of this image version.
CreationDate *time.Time `json:"creation_date"`
// ModificationDate: date of the last modification of this version.
ModificationDate *time.Time `json:"modification_date"`
// LocalImages: list of local images available in this version.
LocalImages []*LocalImage `json:"local_images"`
}
Version: version.