blob: 66aef3dd6ed5efb465557516078ed20ee31aac68 [file] [log] [blame]
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.
GetDigestDetails(context.Context, types.TestName, types.Digest) (*frontend.DigestDetails, error)
// DiffDigests compares two digests that were generated by the given test.
DiffDigests(ctx context.Context, t types.TestName, left, right types.Digest) (*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)
}