analyser

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis

type Analysis struct {
	Duration        time.Duration
	Date            time.Time
	ProviderName    string
	ProviderVersion string
	// contains filtered or unexported fields
}

func NewAnalysis

func NewAnalysis(options AnalyzerOptions) *Analysis

func (*Analysis) AddDeleted

func (a *Analysis) AddDeleted(resources ...*resource.Resource)

func (*Analysis) AddDifference

func (a *Analysis) AddDifference(diffs ...Difference)

func (*Analysis) AddManaged

func (a *Analysis) AddManaged(resources ...*resource.Resource)

func (*Analysis) AddUnmanaged

func (a *Analysis) AddUnmanaged(resources ...*resource.Resource)

func (*Analysis) Alerts

func (a *Analysis) Alerts() alerter.Alerts

func (*Analysis) Coverage

func (a *Analysis) Coverage() int

func (*Analysis) Deleted

func (a *Analysis) Deleted() []*resource.Resource

func (*Analysis) Differences

func (a *Analysis) Differences() []Difference

func (*Analysis) DriftIgnoreList

func (a *Analysis) DriftIgnoreList(opts GenDriftIgnoreOptions) (int, string)

func (*Analysis) IsSync

func (a *Analysis) IsSync() bool

func (*Analysis) Managed

func (a *Analysis) Managed() []*resource.Resource

func (Analysis) MarshalJSON

func (a Analysis) MarshalJSON() ([]byte, error)

func (*Analysis) Options

func (a *Analysis) Options() AnalyzerOptions

func (*Analysis) SetAlerts

func (a *Analysis) SetAlerts(alerts alerter.Alerts)

func (*Analysis) SetIaCSourceCount added in v0.23.0

func (a *Analysis) SetIaCSourceCount(i uint)

func (*Analysis) SetOptions added in v0.22.0

func (a *Analysis) SetOptions(options AnalyzerOptions)

func (*Analysis) SortResources

func (a *Analysis) SortResources()

func (*Analysis) Summary

func (a *Analysis) Summary() Summary

func (*Analysis) Unmanaged

func (a *Analysis) Unmanaged() []*resource.Resource

func (*Analysis) UnmarshalJSON

func (a *Analysis) UnmarshalJSON(bytes []byte) error

type Analyzer

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

func NewAnalyzer

func NewAnalyzer(alerter *alerter.Alerter, options AnalyzerOptions, filter filter.Filter) *Analyzer

func (Analyzer) Analyze added in v0.18.3

func (a Analyzer) Analyze(remoteResources, resourcesFromState []*resource.Resource) (Analysis, error)

type AnalyzerOptions

type AnalyzerOptions struct {
	Deep          bool `json:"deep"`
	OnlyManaged   bool `json:"only_managed"`
	OnlyUnmanaged bool `json:"only_unmanaged"`
}

type Change

type Change struct {
	diff.Change
	Computed   bool `json:"computed"`
	JsonString bool `json:"-"`
}

func SortChanges

func SortChanges(changes []Change) []Change

type Changelog

type Changelog []Change

type ComputedDiffAlert

type ComputedDiffAlert struct{}

func NewComputedDiffAlert

func NewComputedDiffAlert() *ComputedDiffAlert

func (*ComputedDiffAlert) Message

func (c *ComputedDiffAlert) Message() string

func (*ComputedDiffAlert) Resource added in v0.38.0

func (c *ComputedDiffAlert) Resource() *resource.Resource

func (*ComputedDiffAlert) ShouldIgnoreResource

func (c *ComputedDiffAlert) ShouldIgnoreResource() bool

type Difference

type Difference struct {
	Res       *resource.Resource
	Changelog Changelog
}

func SortDifferences

func SortDifferences(diffs []Difference) []Difference

type GenDriftIgnoreOptions

type GenDriftIgnoreOptions struct {
	ExcludeUnmanaged bool
	ExcludeDeleted   bool
	ExcludeDrifted   bool
	InputPath        string
	OutputPath       string
}

type Summary

type Summary struct {
	TotalResources      int  `json:"total_resources"`
	TotalDrifted        int  `json:"total_changed"`
	TotalUnmanaged      int  `json:"total_unmanaged"`
	TotalDeleted        int  `json:"total_missing"`
	TotalManaged        int  `json:"total_managed"`
	TotalIaCSourceCount uint `json:"total_iac_source_count"`
}

type UnmanagedSecurityGroupRulesAlert

type UnmanagedSecurityGroupRulesAlert struct{}

func (*UnmanagedSecurityGroupRulesAlert) Message

func (*UnmanagedSecurityGroupRulesAlert) Resource added in v0.38.0

func (*UnmanagedSecurityGroupRulesAlert) ShouldIgnoreResource

func (u *UnmanagedSecurityGroupRulesAlert) ShouldIgnoreResource() bool

Jump to

Keyboard shortcuts

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