metadata

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory added in v1.2.0

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

func NewMetadataFactory

func NewMetadataFactory(
	astQueryIDProvider interfaces.ASTQueryIDProvider,
	similarityIDProvider similarity.IDProvider,
	sourceProvider interfaces.SourceFileRepo,
	methodLineProvider interfaces.MethodLineRepo,
	tmpDir string,
) *Factory

func (*Factory) GetMetadataRecord added in v1.2.0

func (e *Factory) GetMetadataRecord(scanID string, queries []*Query) (*Record, error)

type Node

type Node struct {
	FileName string
	Name     string
	Line     string
	Column   string
}

type Provider added in v1.2.0

type Provider interface {
	GetMetadataRecord(scanID string, queries []*Query) (*Record, error)
}

type Query

type Query struct {
	QueryID  string
	Language string
	Name     string
	Group    string
	Results  []*Result
}

func GetQueriesFromReport

func GetQueriesFromReport(reportReader *report.CxXMLResults) []*Query

type Record

type Record struct {
	Queries []*RecordQuery `json:"queries"`
}

type RecordPath

type RecordPath struct {
	PathID           string `json:"pathId"`
	SimilarityID     string `json:"similarityId"`
	ResultID         string `json:"-"`
	SASTSimilarityID string `json:"-"`
}

type RecordQuery

type RecordQuery struct {
	QueryID string          `json:"queryId"`
	Results []*RecordResult `json:"results"`
}

type RecordResult

type RecordResult struct {
	ResultID string        `json:"resultId"`
	Paths    []*RecordPath `json:"paths"`
}

type Result

type Result struct {
	PathID       string
	ResultID     string
	SimilarityID string
	FirstNode    Node
	LastNode     Node
}

type SimilarityCalculationJob

type SimilarityCalculationJob struct {
	ResultID, PathID,
	Filename1, Name1, Line1, Column1, MethodLine1,
	Filename2, Name2, Line2, Column2, MethodLine2,
	QueryID string
}

type SimilarityCalculationResult

type SimilarityCalculationResult struct {
	Err                            error
	ResultID, PathID, SimilarityID string
}

Jump to

Keyboard shortcuts

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