io

package
v0.0.0-...-7bdeeeb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FinishOutput

func FinishOutput(outputFile *os.File) error

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

func GetOutputWriter(outputPath string) (*os.File, error)

GetOutputWriter returns the output os.File (stdout/file) for a given output path or an error.

func GetPlan

func GetPlan(inputName string) (*tfjson.Plan, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL