Documentation
¶
Overview ¶
Package marketplace provides methods and message types of the marketplace v2 API.
Index ¶
- Constants
- type API
- func (s *API) GetCategory(req *GetCategoryRequest, opts ...scw.RequestOption) (*Category, error)
- func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*Image, error)
- func (s *API) GetLocalImage(req *GetLocalImageRequest, opts ...scw.RequestOption) (*LocalImage, error)
- func (s *API) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*Version, error)
- func (s *API) ListCategories(req *ListCategoriesRequest, opts ...scw.RequestOption) (*ListCategoriesResponse, error)
- func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)
- func (s *API) ListLocalImages(req *ListLocalImagesRequest, opts ...scw.RequestOption) (*ListLocalImagesResponse, error)
- func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)
- type Category
- type GetCategoryRequest
- type GetImageRequest
- type GetLocalImageRequest
- type GetVersionRequest
- type Image
- type ListCategoriesRequest
- type ListCategoriesResponse
- type ListImagesRequest
- type ListImagesRequestOrderBy
- type ListImagesResponse
- type ListLocalImagesRequest
- type ListLocalImagesRequestOrderBy
- type ListLocalImagesResponse
- type ListVersionsRequest
- type ListVersionsRequestOrderBy
- type ListVersionsResponse
- type LocalImage
- type Version
Constants ¶
const ( // ListImagesRequestOrderByNameAsc is [insert doc]. ListImagesRequestOrderByNameAsc = ListImagesRequestOrderBy("name_asc") // ListImagesRequestOrderByNameDesc is [insert doc]. ListImagesRequestOrderByNameDesc = ListImagesRequestOrderBy("name_desc") // ListImagesRequestOrderByCreatedAtAsc is [insert doc]. ListImagesRequestOrderByCreatedAtAsc = ListImagesRequestOrderBy("created_at_asc") // ListImagesRequestOrderByCreatedAtDesc is [insert doc]. ListImagesRequestOrderByCreatedAtDesc = ListImagesRequestOrderBy("created_at_desc") // ListImagesRequestOrderByUpdatedAtAsc is [insert doc]. ListImagesRequestOrderByUpdatedAtAsc = ListImagesRequestOrderBy("updated_at_asc") // ListImagesRequestOrderByUpdatedAtDesc is [insert doc]. ListImagesRequestOrderByUpdatedAtDesc = ListImagesRequestOrderBy("updated_at_desc") )
const ( // ListLocalImagesRequestOrderByCreatedAtAsc is [insert doc]. ListLocalImagesRequestOrderByCreatedAtAsc = ListLocalImagesRequestOrderBy("created_at_asc") // ListLocalImagesRequestOrderByCreatedAtDesc is [insert doc]. ListLocalImagesRequestOrderByCreatedAtDesc = ListLocalImagesRequestOrderBy("created_at_desc") )
const ( // ListVersionsRequestOrderByCreatedAtAsc is [insert doc]. ListVersionsRequestOrderByCreatedAtAsc = ListVersionsRequestOrderBy("created_at_asc") // ListVersionsRequestOrderByCreatedAtDesc is [insert doc]. ListVersionsRequestOrderByCreatedAtDesc = ListVersionsRequestOrderBy("created_at_desc") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: marketplace API
func (*API) GetCategory ¶
func (s *API) GetCategory(req *GetCategoryRequest, opts ...scw.RequestOption) (*Category, error)
func (*API) GetImage ¶
func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*Image, error)
GetImage: get a specific marketplace image
func (*API) GetLocalImage ¶
func (s *API) GetLocalImage(req *GetLocalImageRequest, opts ...scw.RequestOption) (*LocalImage, error)
func (*API) GetVersion ¶
func (s *API) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*Version, error)
func (*API) ListCategories ¶
func (s *API) ListCategories(req *ListCategoriesRequest, opts ...scw.RequestOption) (*ListCategoriesResponse, error)
func (*API) ListImages ¶
func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)
ListImages: list marketplace images
func (*API) ListLocalImages ¶
func (s *API) ListLocalImages(req *ListLocalImagesRequest, opts ...scw.RequestOption) (*ListLocalImagesResponse, error)
func (*API) ListVersions ¶
func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)
type GetCategoryRequest ¶
type GetCategoryRequest struct {
CategoryID string `json:"-"`
}
type GetImageRequest ¶
type GetImageRequest struct { // ImageID: display the image name ImageID string `json:"-"` }
type GetLocalImageRequest ¶
type GetLocalImageRequest struct {
LocalImageID string `json:"-"`
}
type GetVersionRequest ¶
type GetVersionRequest struct {
VersionID string `json:"-"`
}
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"` // CreatedAt: creation date of this image CreatedAt *time.Time `json:"created_at"` // UpdatedAt: date of the last modification of this image UpdatedAt *time.Time `json:"updated_at"` // ValidUntil: expiration date of this image ValidUntil *time.Time `json:"valid_until"` // Label: label of this image // // Typically an identifier for a distribution (ex. "ubuntu_focal"). // Label string `json:"label"` }
Image: image
type ListCategoriesRequest ¶
type ListCategoriesResponse ¶
type ListCategoriesResponse struct { Categories []*Category `json:"categories"` TotalCount uint32 `json:"total_count"` }
func (*ListCategoriesResponse) UnsafeAppend ¶
func (r *ListCategoriesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListCategoriesResponse) UnsafeGetTotalCount ¶
func (r *ListCategoriesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListImagesRequest ¶
type ListImagesRequest struct { // PageSize: a positive integer lower or equal to 100 to select the number of items to display PageSize *uint32 `json:"-"` // Page: a positive integer to choose the page to display Page *int32 `json:"-"` // OrderBy: ordering to use // // Default value: name_asc OrderBy ListImagesRequestOrderBy `json:"-"` // Arch: choose for which machine architecture to return images Arch *string `json:"-"` // Category: choose the category of images to get Category *string `json:"-"` // IncludeEol: choose to include end-of-life images IncludeEol bool `json:"-"` }
type ListImagesRequestOrderBy ¶
type ListImagesRequestOrderBy string
func (ListImagesRequestOrderBy) MarshalJSON ¶
func (enum ListImagesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListImagesRequestOrderBy) String ¶
func (enum ListImagesRequestOrderBy) String() string
func (*ListImagesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListImagesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListImagesResponse ¶
type ListImagesResponse struct { Images []*Image `json:"images"` TotalCount uint32 `json:"total_count"` }
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
type ListLocalImagesRequest ¶
type ListLocalImagesRequest struct { ImageID *string `json:"-"` VersionID *string `json:"-"` PageSize *uint32 `json:"-"` Page *int32 `json:"-"` // OrderBy: // // Default value: created_at_asc OrderBy ListLocalImagesRequestOrderBy `json:"-"` }
type ListLocalImagesRequestOrderBy ¶
type ListLocalImagesRequestOrderBy string
func (ListLocalImagesRequestOrderBy) MarshalJSON ¶
func (enum ListLocalImagesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListLocalImagesRequestOrderBy) String ¶
func (enum ListLocalImagesRequestOrderBy) String() string
func (*ListLocalImagesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListLocalImagesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListLocalImagesResponse ¶
type ListLocalImagesResponse struct { LocalImages []*LocalImage `json:"local_images"` TotalCount uint32 `json:"total_count"` }
func (*ListLocalImagesResponse) UnsafeAppend ¶
func (r *ListLocalImagesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListLocalImagesResponse) UnsafeGetTotalCount ¶
func (r *ListLocalImagesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListVersionsRequest ¶
type ListVersionsRequest struct { ImageID string `json:"-"` PageSize *uint32 `json:"-"` Page *int32 `json:"-"` // OrderBy: // // Default value: created_at_asc OrderBy ListVersionsRequestOrderBy `json:"-"` }
type ListVersionsRequestOrderBy ¶
type ListVersionsRequestOrderBy string
func (ListVersionsRequestOrderBy) MarshalJSON ¶
func (enum ListVersionsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListVersionsRequestOrderBy) String ¶
func (enum ListVersionsRequestOrderBy) String() string
func (*ListVersionsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListVersionsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListVersionsResponse ¶
type ListVersionsResponse struct { Versions []*Version `json:"versions"` TotalCount uint32 `json:"total_count"` }
func (*ListVersionsResponse) UnsafeAppend ¶
func (r *ListVersionsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListVersionsResponse) UnsafeGetTotalCount ¶
func (r *ListVersionsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type LocalImage ¶
type LocalImage struct { // ID: UUID of this local image // // 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 Version ¶
type Version struct { // ID: UUID of this version ID string `json:"id"` // Name: name of this version Name string `json:"name"` // CreatedAt: creation date of this image version CreatedAt *time.Time `json:"created_at"` // UpdatedAt: date of the last modification of this version UpdatedAt *time.Time `json:"updated_at"` // PublishedAt: date this version was officially published PublishedAt *time.Time `json:"published_at"` }
Version: version