Versions in this module Expand all Collapse all v0 v0.7.4 Feb 22, 2024 Changes in this version + var OutputDir = "./writer" + func CostAndUsageToCSVMapper(sortFn func(r map[int]types.Service) []types.Service, ...) error + func CostAndUsageToChartMapper(sortFn func(r map[int]types.Service) []types.Service, ...) error + func CostAndUsageToStdoutMapper(sortFn func(r map[int]types.Service) []types.Service, ...) error + func CostAndUsageToVectorMapper(r types.CostAndUsageOutputType) error + func CostUsageToRows(s []types.Service, granularity string) types.CostAndUsage + func CreateTitle(dimension string) string + func ForecastToRows(r types.ForecastStdoutType) []table.Row + func ForecastToStdoutMapper(r types.ForecastPrintData, dimensions []string) + func NewCSVFile(dir string, file string) (*os.File, error) + func NewCSVWriter(f io.Writer, header []string) (*csv.Writer, error) + func NewStdoutWriter(variant string) (types.Table, error) + func PopulatePieDate(services []types.Service, key int) []... + func WriteToCSV(f *os.File, header []string, rows [][]string) error + func WriteToChart(p *components.Page) error + type Builder struct + func (Builder) NewCharts(r types.InputType) (*components.Page, error) + type ChartPrinter struct + Variant string + func (p *ChartPrinter) Write(f interface{}, c interface{}) error + type CostAndUsageTable struct + Table table.Writer + func (c CostAndUsageTable) AddRows(rows []table.Row) + func (c CostAndUsageTable) Footer(row table.Row) + func (c CostAndUsageTable) Header() + func (c CostAndUsageTable) Style() + func (c CostAndUsageTable) Writer(output interface{}) + type CsvPrinter struct + Variant string + func (p *CsvPrinter) Write(f interface{}, c interface{}) error + type ForecastTable struct + Table table.Writer + func (f ForecastTable) AddRows(rows []table.Row) + func (f ForecastTable) Footer(row table.Row) + func (f ForecastTable) Header() + func (f ForecastTable) Style() + func (f ForecastTable) Writer(output interface{}) + type OpenAIPrinter struct + Variant string + type PineconePrinter struct + Variant string + func (p *PineconePrinter) Write(f interface{}, c interface{}) error + type Printer interface + Write func(interface{}, interface{}) error + func NewPrintWriter(printType types.PrintWriterType, variant string) Printer + type StdoutPrinter struct + Variant string + func (p *StdoutPrinter) Write(f interface{}, c interface{}) error + type VectorStore interface + CreateEmbeddings func(items []*types.VectorStoreItem) ([]gogpt.Embedding, error) + CreateVectorStoreInput func(r types.CostAndUsageOutputType) ([]*types.VectorStoreItem, error) + Upsert func(context context.Context, data []pinecone2.PineconeStruct) (resp types.UpsertResponse, err error) + func NewVectorStoreClient(builder http.Builder, openAIAPIKey, indexUrl, pineconeAPIKey string) VectorStore + type VectorStoreClient struct + func (v *VectorStoreClient) CreateEmbeddings(items []*types.VectorStoreItem) ([]gogpt.Embedding, error) + func (v *VectorStoreClient) CreateVectorStoreInput(r types.CostAndUsageOutputType) ([]*types.VectorStoreItem, error) + func (v *VectorStoreClient) Upsert(context context.Context, items []pinecone2.PineconeStruct) (resp types.UpsertResponse, err error)