Documentation
¶
Overview ¶
Package firestore helps interact with the rebuild results stored in firestore.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BenchmarkMode ¶
type BenchmarkMode string
const ( SmoketestMode BenchmarkMode = "smoketest" AttestMode BenchmarkMode = "attest" )
type Client ¶
Client is a wrapper around the external firestore client.
func (*Client) FetchRebuilds ¶
func (f *Client) FetchRebuilds(ctx context.Context, req *FetchRebuildRequest) (rebuilds map[string]Rebuild, err error)
FetchRebuilds fetches the Rebuild objects out of firestore.
type FetchRebuildOpts ¶
type FetchRebuildRequest ¶
type FetchRebuildRequest struct { Bench *benchmark.PackageSet Executors []string Runs []string Opts FetchRebuildOpts }
FetchRebuildRequest describes which Rebuild results you would like to fetch from firestore.
type FetchRunsOpts ¶
type FetchRunsOpts struct {
BenchmarkHash string
}
FetchRunsOpts describes which Runs you would like to fetch from firestore.
type Rebuild ¶
type Rebuild struct { Ecosystem string Package string Version string Artifact string Success bool Message string Strategy string Executor string Run string Created time.Time Timings rebuild.Timings }
Rebuild represents the result of a specific rebuild.
func NewRebuildFromFirestore ¶
func NewRebuildFromFirestore(doc *firestore.DocumentSnapshot) Rebuild
NewRebuildFromFirestore creates a Rebuild instance from a "attempt" collection document.
type Run ¶
type Run struct { ID string BenchmarkName string BenchmarkHash string Type BenchmarkMode Created time.Time }
Run represents a group of one or more rebuild executions.
func NewRunFromFirestore ¶
func NewRunFromFirestore(doc *firestore.DocumentSnapshot) Run
NewRunFromFirestore creates a Run instance from a "runs" collection document.
type VerdictGroup ¶
VerdictGroup is a collection of Rebuild objects, grouped by the same Message.
func GroupRebuilds ¶
func GroupRebuilds(rebuilds map[string]Rebuild) (byCount []*VerdictGroup)
GroupRebuilds will create VerdictGroup objects, grouping rebuilds by Message.