collector

package
v0.0.0-...-3f26420 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulateCode

func PopulateCode(ctx context.Context, db *sql.DB, pkgDirs []string) error

func PopulateCoverageResults

func PopulateCoverageResults(ctx context.Context, db *sql.DB, pkgDirs []string) error

func PopulateTestCoverageResults

func PopulateTestCoverageResults(ctx context.Context, db *sql.DB, pkgDirs []string, testResults []TestEvent) error

Types

type CodeLine

type CodeLine struct {
	Package    string `json:"package"`
	File       string `json:"file"`
	LineNumber int    `json:"line_number"`
	Content    string `json:"content"`
}

type CoverageResult

type CoverageResult struct {
	Package         string `json:"package"`
	File            string `json:"file"`
	StartLine       int    `json:"start_line"`
	StartColumn     int    `json:"start_col"`
	EndLine         int    `json:"end_line"`
	EndColumn       int    `json:"end_col"`
	StatementNumber int    `json:"stmt_num"`
	Count           int    `json:"count"`
	FunctionName    string `json:"function_name"`
}

CoverageResult represents the structure of a coverage result

type TestCoverageResult

type TestCoverageResult struct {
	TestName        string `json:"test_name"`
	Package         string `json:"package"`
	File            string `json:"file"`
	StartLine       int    `json:"start_line"`
	StartColumn     int    `json:"start_col"`
	EndLine         int    `json:"end_line"`
	EndColumn       int    `json:"end_col"`
	StatementNumber int    `json:"stmt_num"`
	Count           int    `json:"count"`
	FunctionName    string `json:"function_name"`
}

TestCoverageResult represents the structure of a test-specific coverage result

type TestEvent

type TestEvent struct {
	Time    time.Time `json:"time"`
	Action  string    `json:"action"`
	Package string    `json:"package"`
	Test    string    `json:"test"`
	Elapsed *float64  `json:"elapsed,omitempty"`
	Output  *string   `json:"output,omitempty"`
}

TestResult represents the structure of a test result

func PopulateTestResults

func PopulateTestResults(ctx context.Context, db *sql.DB, pkgDirs []string) ([]TestEvent, error)

Jump to

Keyboard shortcuts

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