Documentation
¶
Overview ¶
Package typecheckhttp serves a site's type checks in the portal (#2793): the newest check of each release, one release's check, and checking a release again.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
// Site is the site a request names and who asks, for a caller who may
// see the site; on a refusal it has answered the request itself.
Site func(w http.ResponseWriter, r *http.Request) (Caller, *http.Request, bool)
// Queue holds the checks; nil where the deployment runs none.
Queue Queue
// Releases reads a release and authorizes a re-check.
Releases sitetypecheck.Releases
// Fail answers an error from the site service.
Fail func(w http.ResponseWriter, r *http.Request, err error)
}
Deps is what the routes read.
type Queue ¶
type Queue interface {
sitetypecheck.Enqueuer
Summaries(ctx context.Context, siteID string) (map[int]sitetypecheck.Summary, error)
Latest(ctx context.Context, siteID string, release int) (*sitetypecheck.Check, error)
}
Queue is the type checks as the routes read and queue them; the sitetypecheck Queue is one.
type TypecheckBody ¶
type TypecheckBody struct {
Environment string `json:"environment,omitempty" example:"dev"`
}
TypecheckBody names the environment whose incremental state a re-run uses.
type TypecheckSummaries ¶
type TypecheckSummaries struct {
Releases map[string]sitetypecheck.Summary `json:"releases"`
}
TypecheckSummaries are the newest check of each release, by number, for the Releases tab's column.
type TypecheckView ¶
type TypecheckView struct {
Release int `json:"release"`
Check *sitetypecheck.Check `json:"check"`
}
TypecheckView is a release's newest type check (#2793); Check is null when none has run.