Documentation ¶
Index ¶
- func FinishOutput(outputFile *os.File) error
- func GenerateJsonOut(f *os.File, res []resources.ResourceState) error
- func GenerateWebPage(f *os.File, res []resources.ResourceState) error
- func GetOutputWriter(outputPath string) (*os.File, error)
- func GetPlan(inputName string) (*tfjson.Plan, error)
- func GetSummaryTable(states []resources.ResourceState) *table.Table
- func OutputPricing(states []resources.ResourceState, f *os.File)
- func RenderJson(states []resources.ResourceState) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FinishOutput ¶
FinishOutput closes the file when the output is done and returns an error where is the case. If the output file is Stdout, thenit is not closed and 2 newlines are printed so that different plan file outputs can be separated.
func GenerateJsonOut ¶
func GenerateJsonOut(f *os.File, res []resources.ResourceState) error
GenerateJsonOut generates a json file with the pricing information of the specified resources.
func GenerateWebPage ¶
func GenerateWebPage(f *os.File, res []resources.ResourceState) error
GenerateWebPage generates a html output with the pricing information of the specified resources.
func GetOutputWriter ¶
GetOutputWriter returns the output os.File (stdout/file) for a given output path or an error.
func GetPlan ¶
GetPlan receives the input file name to extract the plan structure or return an error. The file is also closed if it was successfully opened.
func GetSummaryTable ¶
func GetSummaryTable(states []resources.ResourceState) *table.Table
GetSummaryTable returns the table with brief cost changes info about all resources (Compute Instances and Compute Disks).
func OutputPricing ¶
func OutputPricing(states []resources.ResourceState, f *os.File)
OutputPricing writes pricing information about each resource and summary.
func RenderJson ¶
func RenderJson(states []resources.ResourceState) (string, error)
RenderJson returns the string with json output struct for all resources.
Types ¶
This section is empty.