output

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ConsoleOutputExample = "console://"
View Source
const ConsoleOutputType = "console"
View Source
const FormatVersion = "0.1"
View Source
const HTMLOutputExample = "html://PATH/TO/FILE.html"
View Source
const HTMLOutputType = "html"
View Source
const JSONOutputExample = "json://PATH/TO/FILE.json"
View Source
const JSONOutputType = "json"
View Source
const PlanOutputExample = "plan://PATH/TO/FILE.json"
View Source
const PlanOutputType = "plan"

Variables

This section is empty.

Functions

func Example

func Example(key string) string

func GetPrinter

func GetPrinter(config OutputConfig, quiet bool) output.Printer

func IsSupported

func IsSupported(key string) bool

func ShouldPrint

func ShouldPrint(outputs []OutputConfig, quiet bool) bool

ShouldPrint indicate if we should use the global output or not (e.g. when outputting to stdout).

func SupportedOutputsExample

func SupportedOutputsExample() []string

Types

type Console

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

func NewConsole

func NewConsole() *Console

func (*Console) Write

func (c *Console) Write(analysis *analyser.Analysis) error

type HTML

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

func NewHTML

func NewHTML(path string) *HTML

func (*HTML) Write

func (c *HTML) Write(analysis *analyser.Analysis) error

type HTMLTemplateParams

type HTMLTemplateParams struct {
	IsSync          bool
	ScanDate        string
	Coverage        int
	Summary         analyser.Summary
	Unmanaged       []*resource.Resource
	Differences     []analyser.Difference
	Deleted         []*resource.Resource
	Alerts          alerter.Alerts
	Stylesheet      template.CSS
	ScanDuration    string
	ProviderName    string
	ProviderVersion string
	LogoSvg         template.HTML
	FaviconBase64   string
}

type JSON

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

func NewJSON

func NewJSON(path string) *JSON

func (*JSON) Write

func (c *JSON) Write(analysis *analyser.Analysis) error

type Output

type Output interface {
	Write(analysis *analyser.Analysis) error
}

func GetOutput

func GetOutput(config OutputConfig) Output

type OutputConfig

type OutputConfig struct {
	Key  string
	Path string
}

func (*OutputConfig) String

func (o *OutputConfig) String() string

type Plan

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

func NewPlan

func NewPlan(path string) *Plan

func (*Plan) Write

func (c *Plan) Write(analysis *analyser.Analysis) error

Jump to

Keyboard shortcuts

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