reports

package
v0.0.0-...-dca94c8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintBanner

func PrintBanner(colors *common.ColorStruct)

Types

type Report

type Report struct {
	Summary             ReportSummary `json:"summary"`
	NewResourceTags     []TagRecord   `json:"newResourceTags"`
	UpdatedResourceTags []TagRecord   `json:"updatedResourceTags"`
}

func (*Report) AsJSONBytes

func (r *Report) AsJSONBytes() ([]byte, error)

type ReportService

type ReportService struct {
	// contains filtered or unexported fields
}
var ReportServiceInst *ReportService

func (*ReportService) Changed

func (r *ReportService) Changed() bool

func (*ReportService) CreateReport

func (r *ReportService) CreateReport() *Report

func (*ReportService) GetReport

func (r *ReportService) GetReport() *Report

func (*ReportService) PrintJSONToFile

func (r *ReportService) PrintJSONToFile(file string)

func (*ReportService) PrintJSONToStdout

func (r *ReportService) PrintJSONToStdout()

func (*ReportService) PrintTagGroupTags

func (r *ReportService) PrintTagGroupTags(tagsByGroup map[string][]tags.ITag)

func (*ReportService) PrintToStdout

func (r *ReportService) PrintToStdout(colors *common.ColorStruct)

PrintToStdout prints the Report to the normal std::out. The structure: <Banner> Scanned Resources: <int> New Resources Traced: <int> Updated Resources: <int> <New Resources Table> as generated by printNewResourcesToStdout, if not empty <Updated Resources Table> as generated by printUpdatedResourcesToStdout, if not empty

type ReportSummary

type ReportSummary struct {
	Scanned          int `json:"scanned"`
	NewResources     int `json:"newResources"`
	UpdatedResources int `json:"updatedResources"`
}

type TagChangeAccumulator

type TagChangeAccumulator struct {
	ScannedBlocks      []structure.IBlock
	NewBlockTraces     []structure.IBlock
	UpdatedBlockTraces []structure.IBlock
}
var TagChangeAccumulatorInstance *TagChangeAccumulator

func (*TagChangeAccumulator) AccumulateChanges

func (a *TagChangeAccumulator) AccumulateChanges(block structure.IBlock)

AccumulateChanges saves the results of the scan of each block. If a block has no changes, it will be saved only to ScannedBlocks Otherwise it will be saved to NewBlockTraces if it is new or to UpdatedBlockTraces otherwise

func (*TagChangeAccumulator) GetBlockChanges

func (a *TagChangeAccumulator) GetBlockChanges() ([]structure.IBlock, []structure.IBlock)

GetBlockChanges returns both the NewBlockTraces and the UpdatedBlockTraces that were found by the parsers

func (*TagChangeAccumulator) GetScannedBlocks

func (a *TagChangeAccumulator) GetScannedBlocks() []structure.IBlock

type TagRecord

type TagRecord struct {
	File         string `json:"file"`
	ResourceID   string `json:"resourceId"`
	TagKey       string `json:"key"`
	OldValue     string `json:"oldValue"`
	UpdatedValue string `json:"updatedValue"`
	YorTraceID   string `json:"yorTraceId"`
}

Jump to

Keyboard shortcuts

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