Documentation ¶
Index ¶
- Constants
- func GetPackageByKeyName(sess *session.Session, packageKeyName string, mask ...string) (datatypes.Product_Package, error)
- func GetPackageByType(sess *session.Session, packageType string, mask ...string) (datatypes.Product_Package, error)
- func GetPackageProducts(sess *session.Session, packageId int, mask ...string) ([]datatypes.Product_Item, error)
- func GetPresetByKeyName(sess *session.Session, pkgID int, presetKeyName string, mask ...string) (datatypes.Product_Package_Preset, error)
- func GetPriceIDByPackageIdandLocationGroups(sess *session.Session, locationGroupIds []int, packageid int, addon string) (int, error)
- func SelectProductPricesByCategory(productItems []datatypes.Product_Item, options map[string]float64, ...) []datatypes.Product_Item_Price
Constants ¶
const CPUCategoryCode = "guest_core"
CPUCategoryCode Category code for cpus
const DedicatedLoadBalancerCategoryCode = "dedicated_load_balancer"
DedicatedLoadBalancerCategoryCode Category code for Dedicated Load Balancer
const MemoryCategoryCode = "ram"
MemoryCategoryCode Category code for Memory
const NICSpeedCategoryCode = "port_speed"
NICSpeedCategoryCode Category code for NIC speed
const ProxyLoadBalancerCategoryCode = "proxy_load_balancer"
ProxyLoadBalancerCategoryCode Category code for Shared local load balancer (proxy load balancer)
Variables ¶
This section is empty.
Functions ¶
func GetPackageByKeyName ¶
func GetPackageByKeyName( sess *session.Session, packageKeyName string, mask ...string, ) (datatypes.Product_Package, error)
GetPackageByKeyName Get the Product_Package which matches the specified package key name
func GetPackageByType ¶
func GetPackageByType( sess *session.Session, packageType string, mask ...string, ) (datatypes.Product_Package, error)
GetPackageByType Get the Product_Package which matches the specified package type
func GetPackageProducts ¶
func GetPackageProducts( sess *session.Session, packageId int, mask ...string, ) ([]datatypes.Product_Item, error)
GetPackageProducts Get a list of product items for a specific product package ID
func GetPresetByKeyName ¶
func GetPresetByKeyName( sess *session.Session, pkgID int, presetKeyName string, mask ...string, ) (datatypes.Product_Package_Preset, error)
GetPresetByKeyName Get the Product_Package_Preset which matches the specified preset key name
func GetPriceIDByPackageIdandLocationGroups ¶
func GetPriceIDByPackageIdandLocationGroups(sess *session.Session, locationGroupIds []int, packageid int, addon string) (int, error)
GetPriceIDByPackageIdandLocationGroups return the priceId of the item according to the location group ids of the datacenter you specify addon is the description of the item for which you want to get its priceId
func SelectProductPricesByCategory ¶
func SelectProductPricesByCategory( productItems []datatypes.Product_Item, options map[string]float64, public ...bool, ) []datatypes.Product_Item_Price
SelectProductPricesByCategory Get a list of Product_Item_Prices that match a specific set of price category code / product item capacity combinations. These combinations are passed as a map of strings (category code) mapped to float64 (capacity) For example, these are the options to specify an upgrade to 8 cpus and 32 GB or memory: {"guest_core": 8.0, "ram": 32.0} public[0] checks type of network. public[1] checks type of cores.
Types ¶
This section is empty.