typecheckhttp

package
v1.169.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Register

func Register(mux *http.ServeMux, d Deps)

Register mounts the routes.

Types

type Caller

type Caller struct {
	SiteID string
	Actor  sitesvc.Actor
}

Caller is who asks of a site's type checks, and the site.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL