Documentation ¶
Index ¶
- Variables
- func ListMask(readMask *field_mask.FieldMask) (*mask.Mask, error)
- func MustParseName(name string) (invID invocations.ID, testID, resultID string)
- func PopulateDurationField(tr *pb.TestResult, micros spanner.NullInt64)
- func PopulateExpectedField(tr *pb.TestResult, maybeUnexpected spanner.NullBool)
- func PopulateFailureReason(tr *pb.TestResult, fr spanutil.Compressed) error
- func PopulateProperties(tr *pb.TestResult, properties spanutil.Compressed) error
- func PopulateSkipReasonField(tr *pb.TestResult, skipReason spanner.NullInt64)
- func PopulateTestMetadata(tr *pb.TestResult, tmd spanutil.Compressed) error
- func PopulateVariantParams(params map[string]any, variantPredicate *pb.VariantPredicate)
- func Read(ctx context.Context, name string) (*pb.TestResult, error)
- func ToLimitedData(ctx context.Context, tr *pb.TestResult) error
- type Query
Constants ¶
This section is empty.
Variables ¶
var AllFields = mask.All(&pb.TestResult{})
AllFields is a field mask that selects all TestResults fields.
Functions ¶
func ListMask ¶
func ListMask(readMask *field_mask.FieldMask) (*mask.Mask, error)
ListMask returns mask.Mask converted from field_mask.FieldMask. It returns a default mask with all fields except summary_html if readMask is empty.
func MustParseName ¶
func MustParseName(name string) (invID invocations.ID, testID, resultID string)
MustParseName retrieves the invocation ID, unescaped test id, and result ID.
Panics if the name is invalid. Should be used only with trusted data.
MustParseName is faster than pbutil.ParseTestResultName.
func PopulateDurationField ¶
func PopulateDurationField(tr *pb.TestResult, micros spanner.NullInt64)
PopulateDurationField populates tr.Duration from NullInt64.
func PopulateExpectedField ¶
func PopulateExpectedField(tr *pb.TestResult, maybeUnexpected spanner.NullBool)
PopulateExpectedField populates tr.Expected from NullBool.
func PopulateFailureReason ¶
func PopulateFailureReason(tr *pb.TestResult, fr spanutil.Compressed) error
func PopulateProperties ¶
func PopulateProperties(tr *pb.TestResult, properties spanutil.Compressed) error
func PopulateSkipReasonField ¶
func PopulateSkipReasonField(tr *pb.TestResult, skipReason spanner.NullInt64)
PopulateSkipReasonField populates tr.SkipReason from NullInt64.
func PopulateTestMetadata ¶
func PopulateTestMetadata(tr *pb.TestResult, tmd spanutil.Compressed) error
func PopulateVariantParams ¶
func PopulateVariantParams(params map[string]any, variantPredicate *pb.VariantPredicate)
PopulateVariantParams populates variantHashEquals and variantContains parameters based on the predicate.
func Read ¶
Read reads specified TestResult within the transaction. If the TestResult does not exist, the returned error is annotated with NotFound GRPC code.
func ToLimitedData ¶
func ToLimitedData(ctx context.Context, tr *pb.TestResult) error
ToLimitedData limits the given TestResult to the fields allowed when the caller only has the listLimited permission for test results.
Types ¶
type Query ¶
type Query struct { InvocationIDs invocations.IDSet Predicate *pb.TestResultPredicate PageSize int // must be positive PageToken string Mask *mask.Mask }
Query specifies test results to fetch.