presenter

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package presenter provides utilities for showing results to the user in different format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	// OutputFormat is the output format of result format (table, json) of the report
	OutputFormat string
	// Limit is the number of rows to show in the result (table format only)
	Limit int
}

Option is the option used for presenter.

type Presenter

type Presenter interface {
	Present(io.Writer) error
	Title() string
	Footer() string
}

Presenter will show the analysis result to a given io.Writer.

func NewPresenter

func NewPresenter(provider Provider, opts Option) Presenter

NewPresenter will init a Presenter based on format.

type Provider

type Provider interface {
	Title() string
	Footer() string
}

Provider is the base interface of present provider.

Directories

Path Synopsis
Package cyclondx provides utilities for showing results in cyclondx format
Package cyclondx provides utilities for showing results in cyclondx format
Package json provides utilities for showing results in json format
Package json provides utilities for showing results in json format
Package table provides utilities for showing results in table format
Package table provides utilities for showing results in table format

Jump to

Keyboard shortcuts

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