Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator struct {
// contains filtered or unexported fields
}
Calculator struct for calculating the cost of resources
func NewCalculator ¶
func NewCalculator(substrateConn subi.SubstrateExt, identity substrate.Identity) Calculator
NewCalculator creates a new Calculator
func (*Calculator) CalculateCost ¶
func (c *Calculator) CalculateCost(cru, mru, hru, sru int64, publicIP, certified bool) (float64, error)
CalculateCost calculates the cost in $ per month of the given resources without a discount
func (*Calculator) CalculateDiscount ¶
func (c *Calculator) CalculateDiscount(cost float64) (dedicatedPrice, sharedPrice float64, err error)
CalculateDiscount calculates the discount of a given cost
Click to show internal directories.
Click to hide internal directories.