v2

package
v0.0.104 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PostureReportMockPassedSingleResource = `` /* 6734-byte string literal not displayed */
View Source
var ResourcesListMock = `` /* 69799-byte string literal not displayed */

Functions

func GetResourcesListMock

func GetResourcesListMock() []reporthandling.Resource

Types

type PaginationMarks added in v0.0.94

type PaginationMarks struct {
	ReportNumber int  `json:"chunkNumber"` // serial number of report, used in pagination
	IsLastReport bool `json:"isLastChunk"` //specify this is the last report, used in pagination
}

type PostureReport

type PostureReport struct {
	Attributes           []reportsummary.PostureAttributes `json:"attributes"` //allow flexible properties for posture reports
	CustomerGUID         string                            `json:"customerGUID"`
	ClusterName          string                            `json:"clusterName"`
	ClusterCloudProvider string                            `json:"clusterCloudProvider"`
	ReportID             string                            `json:"reportGUID"`
	JobID                string                            `json:"jobID"`
	PaginationInfo       PaginationMarks                   `json:"paginationInfo"`
	ClusterAPIServerInfo *version.Info                     `json:"clusterAPIServerInfo"`
	ReportGenerationTime time.Time                         `json:"generationTime"`
	SummaryDetails       reportsummary.SummaryDetails      `json:"summaryDetails,omitempty"` // Developing
	Results              []resourcesresults.Result         `json:"results,omitempty"`        // Developing
	Resources            []reporthandling.Resource         `json:"resources,omitempty"`
}

PostureReport posture scanning report structure

func GetPostureReportMockPassedSingleResource

func GetPostureReportMockPassedSingleResource() *PostureReport

func (*PostureReport) AppendResourceResultToSummary added in v0.0.81

func (postureReport *PostureReport) AppendResourceResultToSummary(resourceResult *resourcesresults.Result)

AppendResourceResultToSummary get the result of a single resource. If resource not found will return nil

func (*PostureReport) GetClusterName added in v0.0.90

func (postureReport *PostureReport) GetClusterName() string

func (*PostureReport) GetCustomerGUID added in v0.0.90

func (postureReport *PostureReport) GetCustomerGUID() string

========IPostureReport implementations =======

func (*PostureReport) GetJobID added in v0.0.90

func (postureReport *PostureReport) GetJobID() string

func (*PostureReport) GetReportGUID added in v0.0.90

func (postureReport *PostureReport) GetReportGUID() string

func (*PostureReport) GetResource added in v0.0.77

func (postureReport *PostureReport) GetResource(resourceID string) workloadinterface.IMetadata

GetResource get single resource in IMetadata interface representation

func (*PostureReport) GetStatus added in v0.0.79

func (postureReport *PostureReport) GetStatus() *helpersv1.Status

Status get the overall scanning status

func (*PostureReport) GetTimestamp added in v0.0.90

func (postureReport *PostureReport) GetTimestamp() *time.Time

func (*PostureReport) InitializeSummary added in v0.0.81

func (postureReport *PostureReport) InitializeSummary()

UpdateSummary get the result of a single resource. If resource not found will return nil

func (*PostureReport) ListControls added in v0.0.80

func (postureReport *PostureReport) ListControls() *reportsummary.ListPolicies

=========================================== List Controls ==================================== ListControls list all controls policies summary

func (*PostureReport) ListControlsIDs added in v0.0.80

func (postureReport *PostureReport) ListControlsIDs() *helpersv1.AllLists

ListControlsIDs list all controls names

func (*PostureReport) ListControlsNames added in v0.0.80

func (postureReport *PostureReport) ListControlsNames() *helpersv1.AllLists

ListControlsNames list all controls names

func (*PostureReport) ListFrameworks added in v0.0.80

func (postureReport *PostureReport) ListFrameworks() *reportsummary.ListPolicies

ListFrameworksNames list all framework policies summary

func (*PostureReport) ListFrameworksNames added in v0.0.80

func (postureReport *PostureReport) ListFrameworksNames() *helpersv1.AllLists

ListFrameworksNames list all frameworks names

func (*PostureReport) ListResourcesIDs added in v0.0.80

func (postureReport *PostureReport) ListResourcesIDs(f *helpersv1.Filters) *helpersv1.AllLists

func (*PostureReport) ListResultsWithControlID added in v0.0.81

func (postureReport *PostureReport) ListResultsWithControlID(controlID string) []resourcesresults.Result

func (*PostureReport) ListResultsWithControlName added in v0.0.81

func (postureReport *PostureReport) ListResultsWithControlName(name string) []resourcesresults.Result

func (*PostureReport) ListResultsWithRuleName added in v0.0.81

func (postureReport *PostureReport) ListResultsWithRuleName(ruleName string) []resourcesresults.Result

func (*PostureReport) NKeys added in v0.0.83

func (file *PostureReport) NKeys() int

func (*PostureReport) ResourceResult added in v0.0.77

func (postureReport *PostureReport) ResourceResult(resourceID string) *resourcesresults.Result

ResourceResult get the result of a single resource. If resource not found will return nil

func (*PostureReport) ResourceStatus added in v0.0.77

func (postureReport *PostureReport) ResourceStatus(resourceID string, f *helpersv1.Filters) apis.IStatus

ResourceStatus get single resource status. If resource not found will return an empty string

func (*PostureReport) ToBytes

func (pr *PostureReport) ToBytes() ([]byte, error)

func (*PostureReport) ToString

func (pr *PostureReport) ToString() string

func (*PostureReport) UnmarshalJSONObject added in v0.0.83

func (r *PostureReport) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
responsible on fast unmarshaling of various COMMON posture report v2 structure for basic validation

UnmarshalJSONObject - File inside a pkg

Jump to

Keyboard shortcuts

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