Documentation
¶
Index ¶
- Variables
- func BuildPromptText(rows [][]string) string
- func ConvertServiceMapToArray(s map[int]model.Service, granularity string) [][]string
- func ConvertServiceSliceToArray(s []model.Service, granularity string) [][]string
- func ConvertServiceToSlice(s model.Service, granularity string) [][]string
- func ConvertToChartInputType(r model.CostAndUsageOutputType, s []model.Service) model.InputType
- func ConvertToCommaDelimitedString(rows [][]string) string
- func ConvertToForecastStdoutType(r model.ForecastPrintData, filteredBy string) model.ForecastStdoutType
- func ConvertToStdoutType(s []model.Service, granularity string) model.CostAndUsageStdoutType
- func CostAndUsageToCSV(sortFn func(r map[int]model.Service) []model.Service, ...) error
- func CostAndUsageToChart(sortFn func(r map[int]model.Service) []model.Service, ...) error
- func CostAndUsageToOpenAI(sortFn func(r map[int]model.Service) []model.Service, ...) error
- func CostAndUsageToStdout(sortFn func(r map[int]model.Service) []model.Service, ...) error
- func CostUsageToRows(s []model.Service, granularity string) model.CostAndUsage
- func CreateChatCompletionMessage(userMessage string) []...
- func CreateSubTitle(granularity string, start string, end string) string
- func CreateTitle(dimension string) string
- func CurateCostAndUsageReport(d *costexplorer.GetCostAndUsageOutput, query model.CostAndUsageRequestType) model.CostAndUsageOutputType
- func ForecastToRows(r model.ForecastStdoutType) []table.Row
- func ForecastToStdout(r model.ForecastPrintData, dimensions []string)
- func MaxSupportedRows(rows [][]string, maxRows int) int
- func MetricsToService(m map[string]types.MetricValue) []model.Metrics
- func NewCSVFile(dir string, file string) (*os.File, error)
- func NewCSVWriter(f io.Writer, header []string) (*csv.Writer, error)
- func NewStdoutWriter(variant string) (model.Table, error)
- func PopulatePieDate(services []model.Service, key int) []...
- func ResultsToServicesMap(res []types.ResultByTime) map[int]model.Service
- func SortFunction(sortBy string) func(r map[int]model.Service) []model.Service
- func SortServicesByMetricAmount(r map[int]model.Service) []model.Service
- func SortServicesByStartDate(r map[int]model.Service) []model.Service
- func Summarize(apiKey string, userMessage string) (gogpt.ChatCompletionResponse, error)
- func ToCostAndUsageOutputType(r *costexplorer.GetCostAndUsageOutput, u model.CostAndUsageRequestType) model.CostAndUsageOutputType
- func WriteToCSV(f *os.File, header []string, rows [][]string) error
- func WriteToChart(p *components.Page) error
- func WriteToHTML(completions string) error
- type Builder
- type CostAndUsageTable
- type ForecastTable
Constants ¶
This section is empty.
Variables ¶
View Source
var (
OutputDir = "./output"
)
Functions ¶
func BuildPromptText ¶
func ConvertServiceToSlice ¶
func ConvertToChartInputType ¶
func ConvertToForecastStdoutType ¶
func ConvertToForecastStdoutType(r model.ForecastPrintData, filteredBy string) model.ForecastStdoutType
func ConvertToStdoutType ¶
func ConvertToStdoutType(s []model.Service, granularity string) model.CostAndUsageStdoutType
func CostAndUsageToCSV ¶
func CostAndUsageToChart ¶
func CostAndUsageToOpenAI ¶
func CostAndUsageToStdout ¶
func CostUsageToRows ¶
func CostUsageToRows(s []model.Service, granularity string) model.CostAndUsage
func CreateChatCompletionMessage ¶
func CreateChatCompletionMessage(userMessage string) []gogpt. ChatCompletionMessage
func CreateTitle ¶
func CurateCostAndUsageReport ¶
func CurateCostAndUsageReport( d *costexplorer.GetCostAndUsageOutput, query model.CostAndUsageRequestType) model.CostAndUsageOutputType
func ForecastToRows ¶
func ForecastToRows(r model.ForecastStdoutType) []table.Row
func ForecastToStdout ¶
func ForecastToStdout(r model.ForecastPrintData, dimensions []string)
func MaxSupportedRows ¶
func MetricsToService ¶
func MetricsToService(m map[string]types.MetricValue) []model.Metrics
func ResultsToServicesMap ¶
func ResultsToServicesMap(res []types.ResultByTime) map[int]model.Service
func SortServicesByStartDate ¶
func Summarize ¶
func Summarize(apiKey string, userMessage string) (gogpt.ChatCompletionResponse, error)
func ToCostAndUsageOutputType ¶
func ToCostAndUsageOutputType(r *costexplorer.GetCostAndUsageOutput, u model.CostAndUsageRequestType) model.CostAndUsageOutputType
func WriteToChart ¶
func WriteToChart(p *components.Page) error
func WriteToHTML ¶
Types ¶
type CostAndUsageTable ¶
func (CostAndUsageTable) AddRows ¶
func (c CostAndUsageTable) AddRows(rows []table.Row)
func (CostAndUsageTable) Footer ¶
func (c CostAndUsageTable) Footer(row table.Row)
func (CostAndUsageTable) Header ¶
func (c CostAndUsageTable) Header()
func (CostAndUsageTable) Style ¶
func (c CostAndUsageTable) Style()
func (CostAndUsageTable) Writer ¶
func (c CostAndUsageTable) Writer(output interface{})
type ForecastTable ¶
func (ForecastTable) AddRows ¶
func (f ForecastTable) AddRows(rows []table.Row)
func (ForecastTable) Footer ¶
func (f ForecastTable) Footer(row table.Row)
func (ForecastTable) Header ¶
func (f ForecastTable) Header()
func (ForecastTable) Style ¶
func (f ForecastTable) Style()
func (ForecastTable) Writer ¶
func (f ForecastTable) Writer(output interface{})
Click to show internal directories.
Click to hide internal directories.