costestimator

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePrice

type BasePrice struct {
	Amount currency.Amount
	Unit   Unit
}

type Estimation

type Estimation struct {
	MonthlyTotalCost currency.Amount

	LineItems []EstimationLineItem

	OnDemandCharges struct {
		Storage BasePrice
		Stages  BasePrice
	}
}

type EstimationLineItem

type EstimationLineItem struct {
	Subject     string
	Quantity    Quantity
	MonthlyCost currency.Amount
}

type Estimator

type Estimator interface {
	Estimate(params Params) (*Estimation, error)
}

func New

func New(plans []payment.Plan) Estimator

type Params

type Params struct {
	PlanID                string
	Storage               uint64
	Stages                int
	StagesOnDemand        int
	Scaling               uint64
	BackupIntervalMinutes uint64
}

type Quantity

type Quantity struct {
	Value int
	Unit  Unit
}

func (*Quantity) String

func (q *Quantity) String() string

type SimpleUnit

type SimpleUnit struct {
	// contains filtered or unexported fields
}

func (*SimpleUnit) Format

func (u *SimpleUnit) Format(n int) string

type Unit

type Unit interface {
	Format(n int) string
}

func NewUnit

func NewUnit(name string) Unit

Jump to

Keyboard shortcuts

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