| package search |
| |
| import ( |
| "context" |
| |
| "go.skia.org/infra/golden/go/search/frontend" |
| "go.skia.org/infra/golden/go/search/query" |
| "go.skia.org/infra/golden/go/tjstore" |
| "go.skia.org/infra/golden/go/types" |
| ) |
| |
| // SearchAPI provides multiple ways to query the current tile for digests. |
| // A common usage is to find all untriaged digests associated with |
| // a given commit. |
| type SearchAPI interface { |
| // Search queries the current tile based on the parameters specified in |
| // the instance of the *query.Search. |
| Search(context.Context, *query.Search) (*frontend.SearchResponse, error) |
| |
| // GetDigestDetails returns details about a digest such as the closest |
| // negative and positive images. If clID is specified, the expectations from the given |
| // CL and Code Review System (e.g. "gerrit") will be used instead of those at master. |
| GetDigestDetails(ctx context.Context, t types.TestName, d types.Digest, clID string, crs string) (*frontend.DigestDetails, error) |
| |
| // DiffDigests compares two digests that were generated by the given test. If clID is specified, |
| // the expectations from the given CL and Code Review System (e.g. "gerrit") will be used |
| // instead of those at master. |
| DiffDigests(ctx context.Context, t types.TestName, left, right types.Digest, clID string, crs string) (*frontend.DigestComparison, error) |
| |
| // UntriagedUnignoredTryJobExclusiveDigests returns a list of untriaged, non-ignored, non-flaky, |
| // digests that are exclusive to a given CL (i.e. they don't also show up on the master branch |
| // in the last N commits). |
| UntriagedUnignoredTryJobExclusiveDigests(context.Context, tjstore.CombinedPSID) (*frontend.UntriagedDigestList, error) |
| } |
| |
| // UseSQLDiffMetricsKey suggests to the implementation to use the SQL diff metrics instead of |
| // the older Firestore ones. |
| const UseSQLDiffMetricsKey = contextKey("use_sql_diffmetrics") |
| |
| type contextKey string |