mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
aff7d360e1
* prep for processing the structured run output * undo unwanted change to a json key * Add skeleton functions and API for refactored renderer * goimports * Fix documentation of the RenderOpts struct * Add README explaining implementation details for renderer and plans for future expansion * Update internal/command/jsonformat/README.md Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com> * address comments Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
30 lines
818 B
Go
30 lines
818 B
Go
package jsonformat
|
|
|
|
import (
|
|
"github.com/mitchellh/colorstring"
|
|
|
|
"github.com/hashicorp/terraform/internal/command/jsonplan"
|
|
"github.com/hashicorp/terraform/internal/command/jsonprovider"
|
|
"github.com/hashicorp/terraform/internal/terminal"
|
|
)
|
|
|
|
type Plan struct {
|
|
OutputChanges map[string]jsonplan.Change `json:"output_changes"`
|
|
ResourceChanges []jsonplan.ResourceChange `json:"resource_changes"`
|
|
ResourceDrift []jsonplan.ResourceChange `json:"resource_drift"`
|
|
ProviderSchemas map[string]*jsonprovider.Provider `json:"provider_schemas"`
|
|
}
|
|
|
|
type Renderer struct {
|
|
Streams *terminal.Streams
|
|
Colorize *colorstring.Colorize
|
|
}
|
|
|
|
func (r Renderer) RenderPlan(plan Plan) {
|
|
panic("not implemented")
|
|
}
|
|
|
|
func (r Renderer) RenderLog(message map[string]interface{}) {
|
|
panic("not implemented")
|
|
}
|