testmetadata

package
v0.0.0-...-01cd1ea Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package testmetadata implements methods to query from TestMetadata spanner table.

Package testmetadata implements methods to query from TestMetadata spanner table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadTestMetadata

func ReadTestMetadata(ctx context.Context, opts ReadTestMetadataOptions, f func(*TestMetadataRow) error) error

ReadTestMetadata read rows from TestMetadata table.

Types

type Query

type Query struct {
	Project   string
	SubRealms []string
	Predicate *pb.TestMetadataPredicate

	PageSize  int
	PageToken string
}

Query a set of TestMetadataRow for a list of tests which have the same same subRealm and sourceRef in a LUCI project.

func (*Query) Fetch

func (q *Query) Fetch(ctx context.Context) (tmr []*pb.TestMetadataDetail, nextPageToken string, err error)

Fetch distinct matching TestMetadataDetails from on the TestMetadata table. The returned TestMetadataDetails are ordered by testID, refHash ascendingly. If the test exists in multiples subRealms, lexicographically minimum subRealm is returned.

type ReadTestMetadataOptions

type ReadTestMetadataOptions struct {
	Project   string
	SubRealm  string
	TestIDs   []string
	SourceRef *pb.SourceRef
}

ReadTestMetadataOptions is the input for the ReadTestMetadata function.

type TestMetadataRow

type TestMetadataRow struct {
	Project      string
	TestID       string
	RefHash      []byte
	SubRealm     string
	LastUpdated  time.Time
	TestMetadata *pb.TestMetadata
	SourceRef    *pb.SourceRef
	Position     int64
}

TestMetadataRow represents a row in the TestMetadata table.

Jump to

Keyboard shortcuts

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