terrafactor

package module
v0.0.0-...-75dc125 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 4 Imported by: 0

README

TerraFactor

Add Terraform functionalities to your software

Description

Provide Terraform like output functionality that you can integrate to your software. Takes JSON objects and outputs them in a Terraform-like format. It processes the structure, applying colored prefixes (+ for creation, - for destruction) to indicate changes, and formats the output with customizable indentation.

Module installation

  • Install module: go get github.com/cloudputation/terrafactor
  • Import the module in application code: import "github.com/cloudputation/terrafactor"

Terraform Output Usage

operationTag should be set to either create or destroy.

Error Handling

Not providing a value for operationTag will return the following error: invalid operation: <operation>. Supported operations are 'create' or 'destroy'

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(data interface{}, operationTag string, indentStr string, w io.Writer) error

Print converts JSON data into Terraform-like output. It prepends colored plus or minus signs based on the operationTag ("create" or "destroy"). It also allows controlling the indentation style.

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