Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultResponseLimitBytes is the default soft limit on the number of bytes // that should be returned by a Test Variants query. DefaultResponseLimitBytes = 20 * 1000 * 1000 // 20 MB )
Variables ¶
View Source
var AllFields = mask.All(&pb.TestVariant{})
AllFields is a field mask that selects all TestVariant fields.
Functions ¶
func AdjustResultLimit ¶
AdjustResultLimit takes the given requested resultLimit and adjusts as necessary.
func QueryMask ¶
func QueryMask(readMask *field_mask.FieldMask) (*mask.Mask, error)
QueryMask returns mask.Mask converted from field_mask.FieldMask. It returns a default mask with all fields if readMask is empty.
func ValidateResultLimit ¶
ValidateResultLimit returns a non-nil error if resultLimit is invalid. Returns nil if resultLimit is 0.
Types ¶
type AccessLevel ¶
type AccessLevel int
const ( // The access level is invalid; either an error occurred when checking the // caller's access, or the caller does not have any kind of access to data in // the realms of the invocations being queried. AccessLevelInvalid AccessLevel = iota // Limited access. The caller has access to metadata only, such as // pass/fail status of tests, test IDs and sanitised failure reasons. AccessLevelLimited // The caller has access to all data in the realms of the invocations being // queried. AccessLevelUnrestricted )
type Page ¶
type Page struct { // TestVariants are the test variants in the page. TestVariants []*pb.TestVariant // DistinctSources are the sources referenced by each test variant's // source_id, stored by their ID. The ID itself should be treated // as an opaque value; its generation is an implementation detail. DistinctSources map[string]*pb.Sources // NextPageToken is used to iterate to the next page of results. NextPageToken string }
Page represents a page of test variants fetched in response to a query.
type Query ¶
type Query struct { ReachableInvocations graph.ReachableInvocations Predicate *pb.TestVariantPredicate // ResultLimit is a limit on the number of test results returned // per test variant. Must be postiive. ResultLimit int // PageSize is a limit on the number of test variants returned // per page. The actual number of test variants returned may be // less than this, or even zero. (It may be zero even if there are // more test variants in later pages). Must be positive. PageSize int // ResponseLimitBytes is the soft limit on the number of bytes returned // by a query. The soft limit is on JSON-serialised form of the // result. A page will be truncated once it exceeds this value. // Must be positive. ResponseLimitBytes int // Consists of test variant status, test id and variant hash. PageToken string Mask *mask.Mask TestIDs []string // The level of access the user has to test results and test exoneration data. AccessLevel AccessLevel // contains filtered or unexported fields }
Query specifies test variants to fetch.
Click to show internal directories.
Click to hide internal directories.