github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/dashboard/api/api.go (about) 1 // Copyright 2024 syzkaller project authors. All rights reserved. 2 // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 // Package api provides data structures and helper methods to work with the dashboard JSON API. 5 // All structures in this package are backwards compatible. 6 package api 7 8 const Version = 1 9 10 type BugGroup struct { 11 Version int `json:"version"` 12 Bugs []BugSummary 13 } 14 15 type BugSummary struct { 16 Title string `json:"title,omitempty"` 17 Link string `json:"link"` 18 LastUpdated string `json:"last-updated,omitempty"` 19 FixCommits []Commit `json:"fix-commits,omitempty"` 20 } 21 22 type Bug struct { 23 Version int `json:"version"` 24 Title string `json:"title,omitempty"` 25 ID string `json:"id"` 26 FixCommits []Commit `json:"fix-commits,omitempty"` 27 CauseCommit *Commit `json:"cause-commit,omitempty"` 28 // Links to the discussions. 29 Discussions []string `json:"discussions,omitempty"` 30 Crashes []Crash `json:"crashes,omitempty"` 31 } 32 33 type Crash struct { 34 Title string `json:"title"` 35 SyzReproducerLink string `json:"syz-reproducer,omitempty"` 36 CReproducerLink string `json:"c-reproducer,omitempty"` 37 KernelConfigLink string `json:"kernel-config,omitempty"` 38 KernelSourceGit string `json:"kernel-source-git,omitempty"` 39 KernelSourceCommit string `json:"kernel-source-commit,omitempty"` 40 SyzkallerGit string `json:"syzkaller-git,omitempty"` 41 SyzkallerCommit string `json:"syzkaller-commit,omitempty"` 42 CompilerDescription string `json:"compiler-description,omitempty"` 43 Architecture string `json:"architecture,omitempty"` 44 CrashReportLink string `json:"crash-report-link,omitempty"` 45 } 46 47 type Commit struct { 48 Title string `json:"title"` 49 Link string `json:"link,omitempty"` 50 Hash string `json:"hash,omitempty"` 51 Repo string `json:"repo,omitempty"` 52 Branch string `json:"branch,omitempty"` 53 }