types

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Msg string
}

func (APIError) Error

func (e APIError) Error() string

type Command

type Command interface {
	Run(cmd *cobra.Command, args []string) error
	SynthesizeRequest(input interface{}) (interface{}, error)
	InputHandler(cmd *cobra.Command) interface{}
	Execute(req interface{}) error
	DefineFlags()
}

type CommandLineInput

type CommandLineInput struct {
	GroupByDimension    []string
	GroupByTag          []string
	FilterByValues      map[string]string
	IsFilterByTag       bool
	TagFilterValue      string
	IsFilterByDimension bool
	Start               string
	End                 string
	ExcludeDiscounts    bool
	Interval            string
	PrintFormat         string
	Metrics             []string
	SortByDate          bool
	OpenAIAPIKey        string
	PineconeIndex       string
	PineconeAPIKey      string
}

type CostAndUsage

type CostAndUsage struct {
	Rows  []table.Row
	Total string
}

type CostAndUsageOutputType

type CostAndUsageOutputType struct {
	Services       map[int]Service
	Granularity    string
	Start          string
	End            string
	Dimensions     []string
	Tags           []string
	SortBy         string
	OpenAIAPIKey   string
	PineconeAPIKey string
	PineconeIndex  string
}

type CostAndUsageRequestType

type CostAndUsageRequestType struct {
	Granularity                string
	GroupBy                    []string
	GroupByTag                 []string
	Time                       Time
	IsFilterByTagEnabled       bool
	IsFilterByDimensionEnabled bool
	TagFilterValue             string
	DimensionFilter            map[string]string
	ExcludeDiscounts           bool
	Alias                      string
	Rates                      []string
	PrintFormat                string
	Metrics                    []string
	SortByDate                 bool
	OpenAIAPIKey               string
	PineconeIndex              string
	PineconeAPIKey             string
}

func (CostAndUsageRequestType) Equals

type CostAndUsageRequestWithResourcesType

type CostAndUsageRequestWithResourcesType struct {
	Granularity      string
	GroupBy          []string
	Tag              string
	Time             Time
	IsFilterEnabled  bool
	FilterType       string
	TagFilterValue   string
	Rates            []string
	ExcludeDiscounts bool
}

type CostAndUsageStdoutType

type CostAndUsageStdoutType struct {
	Granularity string
	Services    []Service
}

type CostDataReader

type CostDataReader interface {
	ExtractGroupBySelections() ([]string, []string)
	ExtractFilterBySelection() (FilterBySelections, error)
	ExtractStartAndEndDates() (string, string, error)
	ExtractPrintPreferences() PrintOptions
}

type DateInterval

type DateInterval struct {
	End   string
	Start string
}

type Dimension

type Dimension struct {
	Key   string
	Value []string
}

type Error

type Error struct {
	Msg string
}

func (Error) Error

func (e Error) Error() string

type Filter

type Filter struct {
	Dimensions []Dimension
	Tags       []Tag
}

type FilterBySelections

type FilterBySelections struct {
	Tags                string
	Dimensions          map[string]string
	IsFilterByTag       bool
	IsFilterByDimension bool
}

type ForecastCommandLineInput

type ForecastCommandLineInput struct {
	FilterByValues          Filter
	Granularity             string
	PredictionIntervalLevel int32
	Start                   string
	End                     string
}

type ForecastPrintData

type ForecastPrintData struct {
	Forecast *costexplorer.GetCostForecastOutput
	Filters  []string
}

type ForecastResults

type ForecastResults struct {
	MeanValue                    string
	PredictionIntervalLowerBound string
	PredictionIntervalUpperBound string
	TimePeriod                   DateInterval
}

type ForecastStdoutType

type ForecastStdoutType struct {
	Forecast   []ForecastResults
	FilteredBy string
	Total      Total
}

type GetCostAndUsageAPI

type GetCostAndUsageAPI interface {
	GetCostAndUsage(ctx context.Context,
		optFns ...func(*costexplorer.Options)) (*costexplorer.GetCostAndUsageOutput, error)
}

type GetCostForecastAPI

type GetCostForecastAPI interface {
	GetCostForecast(ctx context.Context, params *costexplorer.GetCostForecastInput, optFns ...func(*costexplorer.Options)) (*costexplorer.GetCostForecastOutput, error)
}

type GetCostForecastReport

type GetCostForecastReport struct{}

type GetCostForecastRequest

type GetCostForecastRequest struct {
	Time                    Time
	Granularity             string
	Metric                  string
	Filter                  Filter
	PredictionIntervalLevel int32
}

type GetDimensionValuesRequest

type GetDimensionValuesRequest struct {
	Dimension string
	Time      Time
}

type InputType

type InputType struct {
	Services     []Service
	Granularity  string
	Start        string
	End          string
	Dimensions   []string
	Tags         []string
	SortBy       string
	OpenAIAPIKey string
}

type Metrics

type Metrics struct {
	Name          string
	Amount        string
	NumericAmount float64
	Unit          string
	UsageQuantity float64
}

type PresetError

type PresetError struct {
	Msg string
}

func (PresetError) Error

func (e PresetError) Error() string

type PresetParams

type PresetParams struct {
	Alias             string
	Dimension         []string
	Tag               string
	Filter            map[string]string
	FilterType        string
	FilterByDimension bool
	FilterByTag       bool
	ExcludeDiscounts  bool
	CommandSyntax     string
	Description       []string
	Granularity       string
	PrintFormat       string
	Metric            []string
}

type PrintOptions

type PrintOptions struct {
	IsSortByDate     bool
	ExcludeDiscounts bool
	Format           string
	OpenAIKey        string
	Granularity      string
	Metric           string
	PineconeIndex    string
	PineconeAPIKey   string
}

type PrintWriterType

type PrintWriterType int
const (
	Stdout PrintWriterType = iota
	CSV
	Chart
	OpenAPI
	Pinecone
)

type Service

type Service struct {
	Keys    []string
	Name    string
	Metrics []Metrics
	Start   string
	End     string
}

type SortBy

type SortBy int

type Table

type Table interface {
	Writer(interface{})
	Header()
	Footer(row table.Row)
	AddRows(rows []table.Row)
	Style()
}

type Tag

type Tag struct {
	Key   string
	Value []string
}

type Time

type Time struct {
	Start string
	End   string
}

func (Time) Equals

func (t Time) Equals(other Time) bool

type Total

type Total struct {
	Amount string
	Unit   string
}

type UpsertResponse

type UpsertResponse struct {
	UpsertedCount int `json:"upsertedCount"`
}

type VectorStoreInput

type VectorStoreInput struct {
	Items []VectorStoreItem
}

type VectorStoreItem

type VectorStoreItem struct {
	ID              string
	EmbeddingText   string
	EmbeddingVector []float32
	Metadata        VectorStoreItemMetadata
}

type VectorStoreItemMetadata

type VectorStoreItemMetadata struct {
	StartDate   string
	EndDate     string
	Granularity string
	Dimensions  string
	Tags        string
	Cost        string
}

Jump to

Keyboard shortcuts

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