marketplace

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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
}

API marketplace API

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) GetImage

func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*GetImageResponse, error)

func (*API) GetLocalImageIDByLabel

func (s *API) GetLocalImageIDByLabel(req *GetLocalImageIDByLabelRequest) (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) GetServiceInfo

func (s *API) GetServiceInfo(req *GetServiceInfoRequest, opts ...scw.RequestOption) (*GetServiceInfoResponse, error)

func (*API) GetVersion

func (s *API) GetVersion(req *GetVersionRequest, opts ...scw.RequestOption) (*GetVersionResponse, error)

func (*API) ListImages

func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)

func (*API) ListVersions

func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)

type GetImageRequest

type GetImageRequest struct {
	ImageID string `json:"-"`
}

type GetImageResponse

type GetImageResponse struct {
	Image *Image `json:"image"`
}

type GetLocalImageIDByLabelRequest

type GetLocalImageIDByLabelRequest struct {
	ImageLabel     string
	Zone           scw.Zone
	CommercialType string
}

GetLocalImageIDByLabelRequest is used by GetLocalImageIDByLabel

type GetServiceInfoRequest

type GetServiceInfoRequest struct {
}

type GetServiceInfoResponse

type GetServiceInfoResponse struct {
	API string `json:"api"`

	Description string `json:"description"`

	Version string `json:"version"`
}

type GetVersionRequest

type GetVersionRequest struct {
	ImageID string `json:"-"`

	VersionID string `json:"-"`
}

type GetVersionResponse

type GetVersionResponse struct {
	Version *Version `json:"version"`
}

type Image

type Image struct {
	ID string `json:"id"`

	Name string `json:"name"`

	Description string `json:"description"`


	Categories []string `json:"categories"`

	Organization *Organization `json:"organization"`

	ValidUntil time.Time `json:"valid_until"`

	CreationDate time.Time `json:"creation_date"`

	ModificationDate time.Time `json:"modification_date"`

	Versions []*Version `json:"versions"`

	CurrentPublicVersion string `json:"current_public_version"`

	Label string `json:"label"`
}

type ListImagesRequest

type ListImagesRequest struct {
	PerPage *int32 `json:"-"`

	Page *int32 `json:"-"`
}

type ListImagesResponse

type ListImagesResponse struct {
	Images []*Image `json:"images"`

	TotalCount uint32 `json:"total_count"`
}

func (*ListImagesResponse) UnsafeAppend

func (r *ListImagesResponse) UnsafeAppend(res interface{}) (int, scw.SdkError)

UnsafeAppend should not be used Internal usage only

func (*ListImagesResponse) UnsafeGetTotalCount

func (r *ListImagesResponse) UnsafeGetTotalCount() int

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 ListVersionsRequest

type ListVersionsRequest struct {
	ImageID string `json:"-"`
}

type ListVersionsResponse

type ListVersionsResponse struct {
	Versions []*Version `json:"versions"`

	TotalCount uint32 `json:"total_count"`
}

func (*ListVersionsResponse) UnsafeSetTotalCount

func (r *ListVersionsResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type LocalImage

type LocalImage struct {
	ID string `json:"id"`

	Arch string `json:"arch"`

	Zone scw.Zone `json:"zone"`

	CompatibleCommercialTypes []string `json:"compatible_commercial_types"`
}

type Organization

type Organization struct {
	ID string `json:"id"`

	Name string `json:"name"`
}

type Version

type Version struct {
	ID string `json:"id"`

	Name string `json:"name"`

	CreationDate time.Time `json:"creation_date"`

	ModificationDate time.Time `json:"modification_date"`

	LocalImages []*LocalImage `json:"local_images"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL