blob: bcf5219555d23ef11bcff17156e40c1421fffa57 [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/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,
// 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.DigestList, error)
}