Documentation ¶
Index ¶
- Constants
- func AddAllocationDisplayOptionsFlags(cmd *cobra.Command, options *AllocationDisplayOptions)
- func AddAssetDisplayOptionsFlags(cmd *cobra.Command, options *AssetDisplayOptions)
- func AddPredictDisplayOptionsFlags(cmd *cobra.Command, options *PredictDisplayOptions)
- func MakeAllocationTable(aggregation []string, allocations map[string]opencost.Allocation, ...) table.Writer
- func MakeAssetTable(assetType string, assets map[string]query.AssetNode, opts AssetDisplayOptions, ...) table.Writer
- func MakePredictionTable(specDiffs []query.SpecCostDiff, currencyCode string, ...) table.Writer
- func WriteAllocationTable(out io.Writer, aggregation []string, ...)
- func WriteAssetTable(out io.Writer, assetType string, assets map[string]query.AssetNode, ...)
- func WritePredictionTable(out io.Writer, rowData []query.SpecCostDiff, currencyCode string, ...)
- type AllocationDisplayOptions
- type AssetDisplayOptions
- type PredictDisplayOptions
Constants ¶
View Source
const ( ClusterCol = "Cluster" NamespaceCol = "Namespace" CPUCol = "CPU" CPUEfficiencyCol = "CPU Eff." MemoryCol = "Memory" MemoryEfficiencyCol = "Memory Eff." GPUCol = "GPU" PVCol = "PV" NetworkCol = "Network" LoadBalancerCol = "Load Balancer Cost" NameCol = "Name" AssetTypeCol = "Asset Type" CPUCostCol = "CPU Cost" RAMCostCol = "RAM Cost" )
View Source
const ( ColObject = "object" ColResourceUnit = "resource unit" ColMoDiffResource = "Δ qty" ColMoDiffCost = "Δ cost/mo" ColMoResource = "qty" ColMoCost = "cost/mo" ColCostPerUnit = "cost per unit" ColPctChange = "% change" )
Variables ¶
This section is empty.
Functions ¶
func AddAllocationDisplayOptionsFlags ¶
func AddAllocationDisplayOptionsFlags(cmd *cobra.Command, options *AllocationDisplayOptions)
func AddAssetDisplayOptionsFlags ¶
func AddAssetDisplayOptionsFlags(cmd *cobra.Command, options *AssetDisplayOptions)
func AddPredictDisplayOptionsFlags ¶
func AddPredictDisplayOptionsFlags(cmd *cobra.Command, options *PredictDisplayOptions)
func MakeAllocationTable ¶
func MakeAllocationTable(aggregation []string, allocations map[string]opencost.Allocation, opts AllocationDisplayOptions, currencyCode string, projectToMonthlyRate bool) table.Writer
func MakeAssetTable ¶
func MakePredictionTable ¶
func MakePredictionTable(specDiffs []query.SpecCostDiff, currencyCode string, opts PredictDisplayOptions) table.Writer
func WriteAllocationTable ¶
func WriteAllocationTable(out io.Writer, aggregation []string, allocations map[string]opencost.Allocation, opts AllocationDisplayOptions, currencyCode string, projectToMonthlyRate bool)
func WriteAssetTable ¶
func WritePredictionTable ¶
func WritePredictionTable(out io.Writer, rowData []query.SpecCostDiff, currencyCode string, opts PredictDisplayOptions)
Types ¶
type AllocationDisplayOptions ¶
type AllocationDisplayOptions struct { ShowCPUCost bool ShowMemoryCost bool ShowGPUCost bool ShowPVCost bool ShowNetworkCost bool ShowEfficiency bool ShowLoadBalancerCost bool ShowAll bool }
func (*AllocationDisplayOptions) Complete ¶
func (do *AllocationDisplayOptions) Complete()
type AssetDisplayOptions ¶
type AssetDisplayOptions struct { ShowCPUCost bool ShowMemoryCost bool ShowAssetType bool ShowAll bool }
func (*AssetDisplayOptions) Complete ¶
func (do *AssetDisplayOptions) Complete()
type PredictDisplayOptions ¶
type PredictDisplayOptions struct { // ShowTotal determines if "After" cost info will be shown alongside the // diff ShowTotal bool // HideDiff will disable diff information if true HideDiff bool }
func (*PredictDisplayOptions) Validate ¶
func (o *PredictDisplayOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.