analysis

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis

type Analysis struct {
	Context            context.Context
	Filters            []string
	Client             *kubernetes.Client
	Language           string
	AIClient           ai.IAI
	Results            []common.Result
	Errors             []string
	Namespace          string
	Cache              cache.ICache
	Explain            bool
	MaxConcurrency     int
	AnalysisAIProvider string // The name of the AI Provider used for this analysis
	WithDoc            bool
}

func NewAnalysis

func NewAnalysis(
	backend string,
	language string,
	filters []string,
	namespace string,
	noCache bool,
	explain bool,
	maxConcurrency int,
	withDoc bool,
	interactiveMode bool,
) (*Analysis, error)

func (*Analysis) Close

func (a *Analysis) Close()

func (*Analysis) GetAIResults

func (a *Analysis) GetAIResults(output string, anonymize bool) error

func (*Analysis) PrintOutput

func (a *Analysis) PrintOutput(format string) ([]byte, error)

func (*Analysis) RunAnalysis

func (a *Analysis) RunAnalysis()

func (*Analysis) RunCustomAnalysis

func (a *Analysis) RunCustomAnalysis()

type AnalysisErrors

type AnalysisErrors []string

type AnalysisStatus

type AnalysisStatus string
const (
	StateOK              AnalysisStatus = "OK"
	StateProblemDetected AnalysisStatus = "ProblemDetected"
)

type JsonOutput

type JsonOutput struct {
	Provider string          `json:"provider"`
	Errors   AnalysisErrors  `json:"errors"`
	Status   AnalysisStatus  `json:"status"`
	Problems int             `json:"problems"`
	Results  []common.Result `json:"results"`
}

Jump to

Keyboard shortcuts

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