aws_costs

package
v1.0.0-costsupdate.6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MonthlyTaxHandler

func MonthlyTaxHandler(w http.ResponseWriter, r *http.Request)

func Register

func Register(ctx context.Context, mux *http.ServeMux, dbPath string) (err error)

Register attached the route to the list view

func SetCtx

func SetCtx(ctx context.Context)

func SetDBPath

func SetDBPath(path string)

func StandardHandler

func StandardHandler(w http.ResponseWriter, r *http.Request)

func YtdHandler

func YtdHandler(w http.ResponseWriter, r *http.Request)

Types

type CommonResult

type CommonResult struct {
	AccountID   string      `json:"account_id,omitempty"`
	Unit        string      `json:"unit,omitempty"`
	Environment interface{} `json:"environment,omitempty"`
	Service     string      `json:"service,omitempty"`
	Total       interface{} `json:"total,omitempty"`
	Interval    interface{} `json:"interval,omitempty"`
}

CommonResult used to cast results

func Common

func Common[T PossibleResults](results []T) (common []*CommonResult)

type CostResponse

type CostResponse struct {
	*apiresponse.Response
	Counters       *Counters              `json:"counters,omitempty"`
	Columns        map[string][]string    `json:"columns,omitempty"`
	ColumnOrdering []string               `json:"column_ordering,omitempty"`
	QueryFilters   map[string]interface{} `json:"query_filters,omitempty"`
	Result         []*CommonResult        `json:"result"`
}

-- Standard how to cast result to common type?

func NewResponse

func NewResponse() *CostResponse

type CountValues

type CountValues struct {
	Count int `json:"count"`
}

type Counters

type Counters struct {
	Totals *CountValues `json:"totals"`
	This   *CountValues `json:"current"`
}

Jump to

Keyboard shortcuts

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