product

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

View Source
const CPUCategoryCode = "guest_core"

CPUCategoryCode Category code for cpus

View Source
const DedicatedLoadBalancerCategoryCode = "dedicated_load_balancer"

DedicatedLoadBalancerCategoryCode Category code for Dedicated Load Balancer

View Source
const MemoryCategoryCode = "ram"

MemoryCategoryCode Category code for Memory

View Source
const NICSpeedCategoryCode = "port_speed"

NICSpeedCategoryCode Category code for NIC speed

View Source
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.

Jump to

Keyboard shortcuts

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