querycost

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: EPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAccountsMap

func FetchAccountsMap(profileName string) (map[string]string, error)

func GetConfigForProfile

func GetConfigForProfile(profile string) (aws.Config, error)

func NewNewQuery

func NewNewQuery(_profile string, _start string, _end string, _granularity string, _groupby string, _filter string, _metrics string, _output string, _filterType string, _formatter string)

func NewQuery

func NewQuery(_profile string, _start string, _end string, _granularity string, _groupby string, _filter string, _metrics string, output Output, _filterType string, _formatter string)

func QueryCostWithQuery

func QueryCostWithQuery(query Query, out Output)

Types

type ArrayOutput

type ArrayOutput struct {
	Array *[][]string
}

func NewArrayOutput

func NewArrayOutput(a *[][]string) ArrayOutput

func (ArrayOutput) DisplayResult

func (a ArrayOutput) DisplayResult(res FormattedResult)

type CSVOutput

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

func NewCSVOutput

func NewCSVOutput(_output string) CSVOutput

func (CSVOutput) DisplayResult

func (s CSVOutput) DisplayResult(res FormattedResult)

type CustomFormatter

type CustomFormatter struct{}

func (CustomFormatter) Format

func (s CustomFormatter) Format(res Result) FormattedResult

type FormattedResult

type FormattedResult struct {
	Value [][]string
	Query Query
}

type Formatter

type Formatter interface {
	Format(res Result) FormattedResult
}

type Output

type Output interface {
	DisplayResult(res FormattedResult)
}

type Query

type Query struct {
	Profile     string
	StartDate   string
	EndDate     string
	Granularity types.Granularity
	Dimension   string
	Filter      []string
	Metrics     []string
	Output      Output
	FilterType  string
	Formatter   Formatter
}

type ReplaceAccountAliasFormatter

type ReplaceAccountAliasFormatter struct{}

*

func (ReplaceAccountAliasFormatter) Format

type Result

type Result struct {
	Output *costexplorer.GetCostAndUsageOutput
	Query  Query
}

type SimpleFormatter

type SimpleFormatter struct{}

func (SimpleFormatter) Format

func (s SimpleFormatter) Format(res Result) FormattedResult

type StandardOutput

type StandardOutput struct{}

func (StandardOutput) DisplayResult

func (s StandardOutput) DisplayResult(res FormattedResult)

Jump to

Keyboard shortcuts

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