Documentation ¶
Index ¶
- func MonthlyTaxHandler(w http.ResponseWriter, r *http.Request)
- func Register(ctx context.Context, mux *http.ServeMux, dbPath string) (err error)
- func SetCtx(ctx context.Context)
- func SetDBPath(path string)
- func StandardHandler(w http.ResponseWriter, r *http.Request)
- func YtdHandler(w http.ResponseWriter, r *http.Request)
- type CommonResult
- type CostResponse
- type CountValues
- type Counters
- type PossibleResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MonthlyTaxHandler ¶
func MonthlyTaxHandler(w http.ResponseWriter, r *http.Request)
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"` }
type PossibleResults ¶
type PossibleResults interface { awsc.MonthlyCostsDetailedRow | awsc.MonthlyCostsPerUnitRow | awsc.MonthlyCostsPerUnitEnvironmentRow | awsc.DailyCostsDetailedRow | awsc.DailyCostsPerUnitRow | awsc.DailyCostsPerUnitEnvironmentRow | awsc.MonthlyTotalsTaxSplitRow }
Click to show internal directories.
Click to hide internal directories.