output

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatResults

func FormatResults(logE *logrus.Entry, results []*domain.Result, errLevel errlevel.Level) []*domain.Error

Types

type Getter

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

func NewGetter

func NewGetter(stdout io.Writer, fs afero.Fs, importer gojsonnet.Importer) *Getter

func (*Getter) Get

func (g *Getter) Get(outputs config.Outputs, param *ParamGet, cfgDir string) (Outputter, error)

Get returns an outputter.

type Output

type Output struct {
	LintnetVersion string          `json:"lintnet_version"`
	Env            string          `json:"env"`
	Errors         []*domain.Error `json:"errors,omitempty"`
	Config         map[string]any  `json:"config,omitempty"`
}

type Outputter

type Outputter interface {
	// Outputter outputs the result.
	// Outputter compromises of transformer and renderer.
	Output(result *Output) error
}

type ParamGet

type ParamGet struct {
	RootDir string
	Output  string
}

Jump to

Keyboard shortcuts

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