| 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/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) |
| |
| // GetDigestTable allows comparison of the digests within one test. It assumes that |
| // the provided instance of query.DigestTable is consistent in that the row query and |
| // column query contain the same test names and the same corpus field. |
| GetDigestTable(*query.DigestTable) (*frontend.DigestTable, error) |
| } |