Documentation
¶
Index ¶
- Constants
- func DiscoveryHandler() http.Handler
- func IndexHandler(serv indexer.StateIndexer) http.HandlerFunc
- func IndexReportHandler(serv indexer.StateReporter) http.HandlerFunc
- func StateHandler(service indexer.Stater) http.HandlerFunc
- func UpdateDiffHandler(d matcher.Differ) (http.Handler, error)
- func VulnerabilityReportHandler(service matcher.Service, indexer indexer.Service) http.HandlerFunc
- type Server
Constants ¶
const ( VulnerabilityReportPath = apiRoot + "vulnerability_report/" IndexAPIPath = apiRoot + "index_report" IndexReportAPIPath = apiRoot + "index_report/" StateAPIPath = apiRoot + "index_state" UpdatesAPIPath = internalRoot + "updates/" OpenAPIV1Path = "/openapi/v1" )
const IntraserviceIssuer = `clair-intraservice`
IntraserviceIssuer is the issuer that will be used if Clair is configured to mint its own JWTs.
Variables ¶
This section is empty.
Functions ¶
func DiscoveryHandler ¶
DiscoveryHandler serves the embedded OpenAPI spec.
func IndexHandler ¶
func IndexHandler(serv indexer.StateIndexer) http.HandlerFunc
IndexHandler utilizes an Indexer to begin a Index of a manifest.
func IndexReportHandler ¶
func IndexReportHandler(serv indexer.StateReporter) http.HandlerFunc
IndexReportHandler utilizes a Reporter to serialize and return a claircore.IndexReport given a path parameter
func StateHandler ¶
func StateHandler(service indexer.Stater) http.HandlerFunc
StateHandler utilizes a Stater to report the curent runtime state of an Indexer.
Indexers running with different scanner versions will produce unique states and indicate to clients a re-index is necessary.
func UpdateDiffHandler ¶
UpdateDiffHandler returns a Handler that services the following endpoints rooted at "/api/v1/internal/updates".
/api/v1/internal/updates /api/v1/internal/updates/
These endpoints return the set of the latest update operations per-updater. GET is the only allowed method.
/api/v1/internal/updates/$ref
This endpoint is used with DELETE to mark a ref as no longer being needed. No other methods are allowed.
/api/v1/internal/updates/diff
This endpoint reports the difference of two update operations. It is used with two query parameters, "prev" and "cur", which are update operation references. "Prev" may be omitted, in which case the first known operation will be used. GET is the only allowed method.
func VulnerabilityReportHandler ¶
VulnerabilityReportHandler utilizes a Service to serialize and return a claircore.VulnerabilityReport