analyze

package
v0.30.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSeverityThreshold = pkgerrors.CmdError{
		ExitCode: 2,
		Err:      errors.New("results did not meet severity threshold"),
	}
)

Functions

func InspectE added in v0.25.0

func InspectE(ctx context.Context, bundlePath string) (map[string][]collecttypes.Result, error)

func RunE

func RunE(ctx context.Context, bundlePath string) ([]api.Result, error)

Types

type Analyze

type Analyze struct {
	Logger log.Logger

	Resolver *resolver.Resolver
	Getter   getter.Interface
	Analyzer *analyzer.Analyzer

	SpecFiles         []string
	Specs             []string
	SkipDefault       bool
	BundleRootSubpath string
	CustomerID        string // deprecated
	ChannelID         string
	Endpoint          string

	// analyze
	SeverityThreshold string
}

func Get

func Get(v *viper.Viper) (*Analyze, error)

func New

func New(v *viper.Viper, logger log.Logger, resolver *resolver.Resolver, getter *getter.Getter, analyzer *analyzer.Analyzer) *Analyze

New gets an instance using viper to pull config

func (*Analyze) Execute

func (a *Analyze) Execute(ctx context.Context, bundlePath string) ([]api.Result, error)

func (*Analyze) Inspect added in v0.25.0

func (a *Analyze) Inspect(ctx context.Context, bundlePath string) (map[string][]collecttypes.Result, error)

Jump to

Keyboard shortcuts

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