opentofu/internal/command/jsonformat/renderer.go
Liam Cervante aff7d360e1
Add skeleton functions and API for refactored renderer (#32368)
* 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>
2023-01-09 11:05:25 +01:00

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")
}