Documentation
¶
Overview ¶
Package export writes a rows file in the import format of another cost tool: FOCUS 1.4 CSV, a Vantage custom provider's CSV, Datadog's Custom Costs CSV, Harness's custom cost CSV, a Cloudability FOCUS drop, Ternary's daily FOCUS 1.2 files, or FOCUS 1.5's candidate release. Every amount leaves as the row wrote it. Nothing is converted, rounded or added up, and a tool that takes one currency refuses a row in another.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoRootDir = errors.New("a Cloudability manifest names its bucket or container, so cloudability needs --root-dir")
ErrNoRootDir is a Cloudability export without the bucket its manifest names.
var ErrNoRows = errors.New("the rows file holds no rows")
ErrNoRows is a rows file that holds no row, of which no format writes a file.
var Formats = []Format{FocusCSV, Vantage, Datadog, Harness, Cloudability, Ternary, Focus15CR}
Formats are the formats in the order the help names them.
Functions ¶
This section is empty.
Types ¶
type Export ¶
type Export struct {
Files []File
// OmittedTags are the tag keys a Datadog file has no column for, because
// a row lacks them and Datadog takes no blank cell.
OmittedTags []string
}
Export is what a format made of a rows file.
type File ¶
type File struct {
// Name is the file's path under the directory a layout format writes,
// and empty in a format that writes one file.
Name string
Body []byte
Rows int
// Note says what the file holds where its rows do not: what a file of no
// rows is, or the billing period of a part.
Note string
}
File is one file of an export and the number of rows it holds.
type Format ¶
type Format string
Format is a value of costroid export --format.
const ( FocusCSV Format = "focus-csv" Vantage Format = "vantage" Datadog Format = "datadog" Harness Format = "harness" Cloudability Format = "cloudability" Ternary Format = "ternary" // Focus15CR is FOCUS 1.5's candidate release, v1.5-cr. Ratification may // change its content, and the format is then named focus-1.5. Focus15CR Format = "focus-1.5-cr" )
The formats export writes.
func ParseFormat ¶
ParseFormat reads a --format value.