MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / FeatureDiffEvent

Struct FeatureDiffEvent

lib/event/featurediff/v1/types.go:41–68  ·  view source on GitHub ↗

FeatureDiffEvent represents a change event for a saved search query. It is the contract between the Event Producer and downstream workers (e.g. Push Delivery Worker).

Source from the content-addressed store, hash-verified

39// FeatureDiffEvent represents a change event for a saved search query.
40// It is the contract between the Event Producer and downstream workers (e.g. Push Delivery Worker).
41type FeatureDiffEvent struct {
42 // EventID is the unique identifier for this specific execution/trigger.
43 EventID string `json:"event_id"`
44 // SearchID is the identifier of the saved search that was checked.
45 SearchID string `json:"search_id"`
46 // SearchName is the user-provided name for the saved search.
47 SearchName string `json:"search_name"`
48 // Query is the actual text of the query (e.g. "browsers:chrome").
49 // Provided here so consumers don't need to look it up.
50 Query string `json:"query"`
51 // Reasons contains machine-readable tags explaining why this event was generated
52 // (e.g. ["DATA_UPDATED", "QUERY_EDITED"]).
53 Reasons []Reason `json:"reasons"`
54 // Summary is a JSON string summarizing the changes (e.g. '{"added": 1, "removed": 0}').
55 Summary []byte `json:"summary"`
56 // StateID is the ID of the full snapshot blob in storage.
57 StateID string `json:"state_id"`
58 // StateBlobPath is the path to the full snapshot blob in storage.
59 StateBlobPath string `json:"state_blob_path"`
60 // DiffID is the ID of the diff blob in storage.
61 DiffID string `json:"diff_id"`
62 // DiffBlobPath is the path to the diff blob in storage.
63 DiffBlobPath string `json:"diff_blob_path"`
64 // GeneratedAt is the timestamp when the event was created.
65 GeneratedAt time.Time `json:"generated_at"`
66 // Frequency is the frequency that triggered the generation of this diff.
67 Frequency JobFrequency `json:"frequency"`
68}
69
70func (FeatureDiffEvent) Kind() string { return "FeatureDiffEvent" }
71func (FeatureDiffEvent) APIVersion() string { return "v1" }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected