presenter

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Defines a Presenter interface for displaying catalog results to an io.Writer as well as a helper utility to obtain a specific Presenter implementation given user configuration.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Option

type Option string
const (
	UnknownPresenter   Option = "UnknownPresenter"
	JSONPresenter      Option = "json"
	TextPresenter      Option = "text"
	TablePresenter     Option = "table"
	CycloneDxPresenter Option = "cyclonedx"
)

func ParseOption

func ParseOption(userStr string) Option

type Presenter

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

Presenter defines the expected behavior for an object responsible for displaying arbitrary input and processed data to a given io.Writer.

func GetPresenter

func GetPresenter(option Option, srcMetadata source.Metadata, catalog *pkg.Catalog, d *distro.Distro) Presenter

GetPresenter returns a presenter for images or directories

Directories

Path Synopsis
Package cyclonedx is responsible for generating a CycloneDX XML report for the given container image or file system.
Package cyclonedx is responsible for generating a CycloneDX XML report for the given container image or file system.

Jump to

Keyboard shortcuts

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