prices

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByID

type ByID map[PriceID]*Price

ByID maps a price query to the price result

type ChangesPriceIDs

type ChangesPriceIDs struct {
	Before []PriceID
	After  []PriceID
}

func AWSDBInstance

func AWSDBInstance(region string, changes terraform.ChangeJSON) ChangesPriceIDs

func AWSInstance

func AWSInstance(region string, changes terraform.ChangeJSON) ChangesPriceIDs

func ResourceChangesPriceIDs

func ResourceChangesPriceIDs(region string, res terraform.ResourceChangeJSON) ChangesPriceIDs

type Dimension

type Dimension struct {
	BeginRange   string
	EndRange     string
	PricePerUnit string
	Unit         string
	RateCode     string
	Description  string
}

Dimension is the price for a specific dimension/range of the product

type Lookup

type Lookup interface {
	Add(id PriceID) *Price
	Perform() error
}

Lookup gathers a unique set of PriceIDs and looks them up using the Terracost API

func NewLookup

func NewLookup() Lookup

NewLookup returns a new Lookup

type Price

type Price struct {
	PriceID
	Dimensions []Dimension
	Updated    string
}

Price represents AWS pricing information

type PriceID

type PriceID struct {
	ServiceCode    string
	UsageOperation string
}

PriceID is a composite key of AWS service code and usage operation

Jump to

Keyboard shortcuts

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