github.com/GoogleCloudPlatform/testgrid@v0.0.174/resultstore/README.md (about) 1 # TestGrid ResultStore 2 The ResultStore client creates a CRUD interface for users to interact with the Google ResultStore. 3 4 ## ResultStore invocation searching 5 The ResultStore client allows users to directly search invocations stored in a 6 GCP project given a query. The query format is documented in the 7 [SearchInvocationsRequest 8 type](https://godoc.org/google.golang.org/genproto/googleapis/devtools/resultstore/v2#SearchInvocationsRequest). 9 Search will return a list of `resultstore.Invocation` that satisfies the query condition. 10 11 Sample search code snippet 12 ```go 13 conn, err := resultstore.Connect(ctx, serviceAccountPath) 14 if err != nil { 15 // error handling 16 } 17 client := resultstore.NewClient(conn).WithContext(ctx) 18 invocationClient := client.Invocations() 19 20 projectID := "GCP Project ID" 21 queryTime := time.Unix(1567800000, 0).Format(time.RFC3339) 22 query := fmt.Sprintf("timing.start_time>%q", queryTime) 23 invocationsFieldMask := []string{ 24 "invocations.name", 25 "invocations.timing", 26 "next_page_token", 27 } 28 result, err := invocationClient.Search(ctx, projectID, query, invocationsFieldMask...) 29 ``` 30