Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FamilyG1 Identification for G1 Small instances Family. FamilyG1 = "g1" // FamilyF1 Identification for F1 Micro instances Family. FamilyF1 = "f1" // FamilyN1 Identification for N1 instances Family. FamilyN1 = "n1" // FamilyN2 Identification for N2 instances Family. FamilyN2 = "n2" // FamilyN2D Identification for N2D instances Family. FamilyN2D = "n2d" // FamilyE2 Identification for E2 instances Family. FamilyE2 = "e2" // FamilyC2 Identification for C2 instances Family. FamilyC2 = "c2" // FamilyM1 Identification for M1 instances Family. FamilyM1 = "m1" // FamilyM2 Identification for M2 instances Family. FamilyM2 = "m2" // BillingPreemptible Identification for Preemptible instances. BillingPreemptible = "preemptible" )
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request)
Handler responds to an HTTP request to get the pricing info for Compute.
func InitSKUPriceList ¶
func InitSKUPriceList(svc *cloudbilling.APIService) error
Types ¶
type Price ¶
type Price struct { Currency string `json:"currency"` ComputePrice float64 `json:"computePrice"` OsPrice float64 `json:"osPrice"` EffectiveTime string `json:"effectiveTime"` }
Price type has all the fields in the HTTP response.
type Request ¶
type Request struct { Instances int `json:"instances"` Region string `json:"region"` Family string `json:"family"` CPU float64 `json:"cpu"` RAM float64 `json:"ram"` Billing string `json:"billing"` Hours float64 `json:"hours"` Os string `json:"os"` }
Request type has all the fields in the HTTP request.
Click to show internal directories.
Click to hide internal directories.