metadata

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 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 MetadataFactory

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

func NewMetadataFactory

func NewMetadataFactory(
	astQueryIDProvider interfaces.ASTQueryIDRepo,
	similarityIDProvider similarity.SimilarityIDProvider,
	sourceProvider interfaces.SourceFileRepo,
	methodLineProvider interfaces.MethodLineRepo,
	tmpDir string,
) *MetadataFactory

func (*MetadataFactory) GetMetadataRecord

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

type MetadataProvider

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

type Node

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

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"`
}

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
	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