github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/syz-cluster/pkg/api/urls.go (about) 1 // Copyright 2025 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 5 6 import "fmt" 7 8 // URLGenerator creates URLs for accessing the web dashboard. 9 type URLGenerator struct { 10 baseURL string 11 } 12 13 func NewURLGenerator(baseURL string) *URLGenerator { 14 return &URLGenerator{baseURL} 15 } 16 17 func (g *URLGenerator) FindingLog(findingID string) string { 18 return fmt.Sprintf("%s/findings/%s/log", g.baseURL, findingID) 19 } 20 21 func (g *URLGenerator) FindingSyzRepro(findingID string) string { 22 return fmt.Sprintf("%s/findings/%s/syz_repro", g.baseURL, findingID) 23 } 24 25 func (g *URLGenerator) FindingCRepro(findingID string) string { 26 return fmt.Sprintf("%s/findings/%s/c_repro", g.baseURL, findingID) 27 } 28 29 func (g *URLGenerator) Series(seriesID string) string { 30 return fmt.Sprintf("%s/series/%s", g.baseURL, seriesID) 31 } 32 33 func (g *URLGenerator) BuildConfig(buildID string) string { 34 return fmt.Sprintf("%s/builds/%s/config", g.baseURL, buildID) 35 } 36 37 func (g *URLGenerator) BuildLog(buildID string) string { 38 return fmt.Sprintf("%s/builds/%s/log", g.baseURL, buildID) 39 }