view

package
v0.68.10 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package view contains the rendering logic for terragrunt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HumanRender

type HumanRender struct {
	// contains filtered or unexported fields
}

func (*HumanRender) Diagnostic

func (render *HumanRender) Diagnostic(diag *diagnostic.Diagnostic) (string, error)

Diagnostic formats a single diagnostic message.

func (*HumanRender) Diagnostics

func (render *HumanRender) Diagnostics(diags diagnostic.Diagnostics) (string, error)

func (*HumanRender) ShowConfigPath added in v0.64.5

func (render *HumanRender) ShowConfigPath(filenames []string) (string, error)

func (*HumanRender) SourceSnippets

func (render *HumanRender) SourceSnippets(diag *diagnostic.Diagnostic) (string, error)

type JSONRender

type JSONRender struct{}

func (*JSONRender) Diagnostics

func (render *JSONRender) Diagnostics(diags diagnostic.Diagnostics) (string, error)

func (*JSONRender) ShowConfigPath added in v0.64.5

func (render *JSONRender) ShowConfigPath(filenames []string) (string, error)

type Render

type Render interface {
	// Diagnostics renders early diagnostics, resulting from argument parsing.
	Diagnostics(diags diagnostic.Diagnostics) (string, error)

	// ShowConfigPath renders paths to configurations that contain errors.
	ShowConfigPath(filenames []string) (string, error)
}

func NewHumanRender

func NewHumanRender(disableColor bool) Render

func NewJSONRender

func NewJSONRender() Render

type Writer

type Writer struct {
	io.Writer
	// contains filtered or unexported fields
}

Writer is the base layer for command views, encapsulating a set of I/O streams, a colorize implementation, and implementing a human friendly view for diagnostics.

func NewWriter

func NewWriter(writer io.Writer, render Render) *Writer

func (*Writer) Diagnostics

func (writer *Writer) Diagnostics(diags diagnostic.Diagnostics) error

func (*Writer) ShowConfigPath added in v0.64.5

func (writer *Writer) ShowConfigPath(diags diagnostic.Diagnostics) error

Directories

Path Synopsis
Package diagnostic provides a way to represent diagnostics in a way that can be easily marshalled to JSON.
Package diagnostic provides a way to represent diagnostics in a way that can be easily marshalled to JSON.

Jump to

Keyboard shortcuts

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