reservation

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PreInstalled = map[string]string{
	"Amazon Linux":                "NA",
	"Linux/UNIX":                  "NA",
	"Linux/UNIX (Amazon VPC)":     "NA",
	"Linux with SQL Standard":     "SQL Standard",
	"Linux with SQL Web":          "SQL Web",
	"Linux with SQL Enterprise":   "SQL Enterprise",
	"Red Hat Enterprise Linux":    "NA",
	"SUSE Linux":                  "NA",
	"Windows":                     "NA",
	"Windows (Amazon VPC)":        "NA",
	"Windows with SQL Standard":   "SQL Standard",
	"Windows with SQL Web":        "SQL Web",
	"Windows with SQL Enterprise": "SQL Enterprise",
	"Windows (BYOL)":              "",
	"NoOperatingSystem":           "",
}

Functions

func AddOnDemandConversionCost

func AddOnDemandConversionCost(plist []pricing.Price, u []Utilization) []error

func GroupBy

func GroupBy(u []Utilization) (map[string][]Utilization, []string)

func Serialize

func Serialize(dir string, date []calendar.Date) error

func Sort

func Sort(u []Utilization)

func SortedKey

func SortedKey(group map[string][]Utilization) []string

Types

type Utilization

type Utilization struct {
	AccountID              string  `json:"account_id"`
	Description            string  `json:"description"`
	Region                 string  `json:"region"`
	InstanceType           string  `json:"instance_type"`
	Platform               string  `json:"platform,omitempty"`
	CacheEngine            string  `json:"cache_engine,omitempty"`
	DatabaseEngine         string  `json:"database_engine,omitempty"`
	DeploymentOption       string  `json:"deployment_option,omitempty"`
	Date                   string  `json:"date"`
	Hours                  float64 `json:"hours"`
	Num                    float64 `json:"num"`
	Percentage             float64 `json:"percentage"`
	OnDemandConversionCost float64 `json:"ondemand_conversion_cost"`
}

func Deserialize

func Deserialize(dir string, date []calendar.Date) ([]Utilization, error)

func Fetch

func Fetch(start, end string) ([]Utilization, error)

func FetchWith

func FetchWith(start, end string, fn []fetchInputFunc) ([]Utilization, error)

func Merge

func Merge(u []Utilization) []Utilization

func Normalize

func Normalize(u []Utilization, mini map[string]pricing.Tuple) []Utilization

func (Utilization) JSON

func (u Utilization) JSON() string

func (Utilization) OSEngine

func (u Utilization) OSEngine() string

func (Utilization) PFEngine

func (u Utilization) PFEngine() string

func (Utilization) Pretty

func (u Utilization) Pretty() string

func (Utilization) String

func (u Utilization) String() string

func (Utilization) Usage

func (u Utilization) Usage() string

func (Utilization) UsageType

func (u Utilization) UsageType() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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