Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapitalizeWords ¶
func EnvironmentGroup ¶ added in v0.2.1
environmentGroup returns "production" for prod, "pre-production" for everything else.
func FormatOIQResultsMultiEnv ¶ added in v0.1.9
func FormatOIQResultsMultiEnv(envResults []EnvOIQResult) (string, error)
FormatOIQResultsMultiEnv formats results across one or more environments.
Types ¶
type EnvOIQResult ¶ added in v0.1.9
type EnvOIQResult struct {
Environment string
Services map[string][]byte // service name -> oiq price JSON
}
EnvOIQResult groups OIQ results for a single environment.
type MinMaxPrice ¶ added in v0.1.9
MinMaxPrice holds a min/max price range.
type OIQPriceOutput ¶ added in v0.1.9
type OIQPriceOutput struct {
MatchDate string `json:"match_date"`
PrevPrice MinMaxPrice `json:"prev_price"`
Price MinMaxPrice `json:"price"`
PriceDiff MinMaxPrice `json:"price_diff"`
Resources []OIQResource `json:"resources"`
}
OIQPriceOutput represents the JSON output from oiq price.
type OIQProduct ¶ added in v0.1.9
type OIQProduct struct {
Price MinMaxPrice `json:"price"`
ProductMax OIQProductInfo `json:"product_max"`
ProductMin OIQProductInfo `json:"product_min"`
Usage OIQUsage `json:"usage"`
}
OIQProduct represents a single pricing line item within a resource.
type OIQProductInfo ¶ added in v0.1.9
type OIQProductInfo struct {
CCY string `json:"ccy"`
ProductFamily string `json:"product_family"`
Service string `json:"service"`
PricingMatchSet string `json:"pricing_match_set"`
}
OIQProductInfo holds service/pricing metadata.
type OIQResource ¶ added in v0.1.9
type OIQResource struct {
Address string `json:"address"`
Change string `json:"change"`
Name string `json:"name"`
Price MinMaxPrice `json:"price"`
Type string `json:"type"`
Products []OIQProduct `json:"products"`
}
OIQResource represents a single resource in the oiq output.
type OIQUsage ¶ added in v0.1.9
type OIQUsage struct {
Description string `json:"description"`
MatchQuery string `json:"match_query"`
Usage OIQUsageValues `json:"usage"`
}
OIQUsage holds the usage assumptions for a product line.
type OIQUsageValues ¶ added in v0.1.9
type OIQUsageValues struct {
Operations *MinMaxPrice `json:"operations,omitempty"`
Data *MinMaxPrice `json:"data,omitempty"`
}
OIQUsageValues holds the actual usage numbers. oiq uses "operations" for request-based and "data" for storage-based.