history

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBillingDataIncomplete = errors.New("Billing data are not completed")

Functions

func CheckBillingDataCompleted

func CheckBillingDataCompleted(ctx context.Context, startDate time.Time, endDate time.Time, aa aws.AwsAccount) (bool, error)

CheckBillingDataCompleted checks if billing data in ES are complete. If they are complete it returns true, otherwise it returns false.

func FetchHistoryInfos

func FetchHistoryInfos(ctx context.Context, aa aws.AwsAccount) (bool, error)

FetchHistoryInfos fetches billing data and stats of EC2 and RDS instances of the last month

func GetHistoryDate

func GetHistoryDate() (time.Time, time.Time)

GetHistoryDate return the begin and the end date of the last month

Types

type EsCostPerRegionResult

type EsCostPerRegionResult struct {
	Buckets []struct {
		Region string `json:"key"`
		Cost   struct {
			Value float64 `json:"value"`
		} `json:"cost"`
	} `json:"buckets"`
}

type EsRegionPerResourceResult

type EsRegionPerResourceResult struct {
	Resources struct {
		Buckets []struct {
			Resource string                `json:"key"`
			Regions  EsCostPerRegionResult `json:"regions"`
		} `json:"buckets"`
	} `json:"products"`
}

structures that allows to parse ES result

Jump to

Keyboard shortcuts

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