Documentation ¶
Index ¶
- Constants
- func CompareTargetReleases(a, b string) (int, error)
- func CreateCloneHandler(client bugzilla.Client, sortedTargetReleases []string, m *metrics.Metrics) http.HandlerFunc
- func GetBugHandler(client bugzilla.Client, m *metrics.Metrics) http.HandlerFunc
- func GetClonesHandler(client bugzilla.Client, allTargetVersions []string, m *metrics.Metrics) http.HandlerFunc
- func GetHelpHandler(m *metrics.Metrics) http.HandlerFunc
- func GetLandingHandler(metrics *metrics.Metrics) http.HandlerFunc
- func NewCachingTransport() http.RoundTripper
- func SortTargetReleases(versions []string, ascending bool) error
- type ClonesTemplateData
- type HandlerFuncWithErrorReturn
Constants ¶
const (
// BugIDQuery stores the query for bug ID
BugIDQuery = "ID"
)
Variables ¶
This section is empty.
Functions ¶
func CompareTargetReleases ¶
CompareTargetReleases compares two target release strings (e.g. "4.10.0" or "4.8.z") and returns then semantic versioning order. ".z" is not actually a valid .<patch> in semantic versioning, so we can rely completely on semver Compare.
func CreateCloneHandler ¶
func CreateCloneHandler(client bugzilla.Client, sortedTargetReleases []string, m *metrics.Metrics) http.HandlerFunc
CreateCloneHandler will create a clone of the specified ID and return success/error
func GetBugHandler ¶
GetBugHandler returns a function with bug details in JSON format
func GetClonesHandler ¶
func GetClonesHandler(client bugzilla.Client, allTargetVersions []string, m *metrics.Metrics) http.HandlerFunc
GetClonesHandler returns an HTML page with detais about the bug and its clones
func GetHelpHandler ¶
func GetHelpHandler(m *metrics.Metrics) http.HandlerFunc
GetHelpHandler returns the help page
func GetLandingHandler ¶
func GetLandingHandler(metrics *metrics.Metrics) http.HandlerFunc
GetLandingHandler will return a simple bug search page
func NewCachingTransport ¶
func NewCachingTransport() http.RoundTripper
NewCachingTransport is a constructor for cachingTransport If an entry is present in the cache, it is immediately returned while also generating an async HTTP call to the bugzilla server to get the latest value which is stored in the cache. Therefore this cache does *NOT* reduce the HTTP traffic, and is only used to speed up the response.
func SortTargetReleases ¶
SortTargetReleases sorts a slice of entries like "4.1.z" and "4.10.0" in increasing order.
Types ¶
type ClonesTemplateData ¶
type ClonesTemplateData struct { Bug *bugzilla.Bug // bug details Clones []*bugzilla.Bug // List of clones for the bug Parent *bugzilla.Bug // Root bug if it is a a bug, otherwise holds itself PRs []bugzilla.ExternalBug // Details of linked PR CloneTargets []string NewCloneIDs []string MissingReleases []string DependenceTree *dependenceNode }
ClonesTemplateData holds the UI data for the clones page
type HandlerFuncWithErrorReturn ¶
type HandlerFuncWithErrorReturn func(http.ResponseWriter, *http.Request) error
HandlerFuncWithErrorReturn allows returning errors to be logged