Documentation
¶
Overview ¶
Lists all the configured flavors available. A flavor is a combination of amount of compute capacity(CU) and disk capacity(GB).
Index ¶
- type ItemSize
- type ListRequest
- type ListSizes
- func (ls ListSizes) FilterByID(id uint64) ListSizes
- func (ls ListSizes) FilterByName(name string) ListSizes
- func (ls ListSizes) FilterFunc(predicate func(ItemSize) bool) ListSizes
- func (ls ListSizes) FindOne() ItemSize
- func (ls ListSizes) IDs() []uint64
- func (ls ListSizes) Serialize(params ...string) (serialization.Serialized, error)
- type Sizes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemSize ¶
type ItemSize struct { // Description Description string `json:"desc"` // List of disk IDs Disks []uint64 `json:"disks"` // ID ID uint64 `json:"id"` // Memory Memory uint64 `json:"memory"` // Name Name string `json:"name"` // VCPUs VCPUs uint64 `json:"vcpus"` }
Main onformation about configured available flavors
func (ItemSize) Serialize ¶
func (is ItemSize) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type ListRequest ¶
type ListRequest struct { // ID of the cloudspace // Required: false CloudspaceID uint64 `url:"cloudspaceId,omitempty" json:"cloudspaceId,omitempty"` // Location code for the sizes // Required: false Location string `url:"location,omitempty" json:"location,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListRequest struct for list of the available flavors
type ListSizes ¶
type ListSizes struct { // Data Data []ItemSize `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of configured available flavors
func (ListSizes) FilterByID ¶
FilterByID returns ListSizes with specified ID.
func (ListSizes) FilterByName ¶
FilterByName returns ListSizes with specified Name.
func (ListSizes) FilterFunc ¶
FilterFunc allows filtering ListSizes based on a user-specified predicate.
func (ListSizes) FindOne ¶
FindOne returns first found ItemSize If none was found, returns an empty struct.
func (ListSizes) IDs ¶ added in v1.6.8
IDs gets array of configured available flavours IDs from ListSizes struct
func (ListSizes) Serialize ¶
func (ls ListSizes) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent