Documentation ¶
Index ¶
Constants ¶
const ( IndexAPIPath = indexerRoot + apiRoot + "index_report" IndexReportAPIPath = indexerRoot + apiRoot + "index_report/" IndexStateAPIPath = indexerRoot + apiRoot + "index_state" AffectedManifestAPIPath = indexerRoot + internalRoot + "affected_manifest/" VulnerabilityReportPath = matcherRoot + apiRoot + "vulnerability_report/" UpdateOperationAPIPath = matcherRoot + internalRoot + "update_operation/" UpdateDiffAPIPath = matcherRoot + internalRoot + "update_diff/" NotificationAPIPath = notifierRoot + apiRoot + "notification/" KeysAPIPath = notifierRoot + apiRoot + "services/notifier/keys" KeyByIDAPIPath = notifierRoot + apiRoot + "services/notifier/keys/" OpenAPIV1Path = "/openapi/v1" )
const (
DefaultPageSize = 500
)
const IntraserviceIssuer = `clair-intraservice`
IntraserviceIssuer is the issuer that will be used if Clair is configured to mint its own JWTs.
Variables ¶
var ErrMediaType = errors.New("no common media type")
ErrMediaType is returned if no common media types can be found for a given request.
Functions ¶
func AffectedManifestHandler ¶
func AffectedManifestHandler(serv indexer.Affected) http.HandlerFunc
func DiscoveryHandler ¶
DiscoveryHandler serves the embedded OpenAPI spec.
func UpdateDiffHandler ¶
func UpdateDiffHandler(serv matcher.Differ) http.HandlerFunc
UpdateDiffHandler provides an endpoint to GET update diffs when provided an UpdateOperation ref.
Types ¶
type IndexerV1 ¶ added in v4.4.0
type IndexerV1 struct {
// contains filtered or unexported fields
}
IndexerV1 is a consolidated Indexer endpoint.
type NotifHandler ¶
type NotifHandler struct {
// contains filtered or unexported fields
}
func NotificationHandler ¶
func NotificationHandler(serv notifier.Service) *NotifHandler
func (*NotifHandler) Delete ¶
func (h *NotifHandler) Delete(w http.ResponseWriter, r *http.Request)
func (*NotifHandler) Get ¶
func (h *NotifHandler) Get(w http.ResponseWriter, r *http.Request)
Get will return paginated notifications to the caller.
func (*NotifHandler) ServeHTTP ¶
func (h *NotifHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Response ¶
type Response struct { Page notifier.Page `json:"page"` Notifications []notifier.Notification `json:"notifications"` }
type UOHandler ¶
type UOHandler struct {
// contains filtered or unexported fields
}
UOHandler implements http.Handler and provides http.HandlerFunc(s) for GET and DELETE operations.
func UpdateOperationHandler ¶
UpdateOperationHandler creates a new UOHandler
func (*UOHandler) Delete ¶
func (h *UOHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete removes an UpdateOperation models from the system.
type VulnerabilityReportHandler ¶
type VulnerabilityReportHandler struct { Matcher matcher.Service Indexer indexer.Service Cache time.Duration }
VulnerabilityReportHandler produces VulnerabilityReports.
func (*VulnerabilityReportHandler) ServeHTTP ¶ added in v4.3.0
func (h *VulnerabilityReportHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler.
Notes ¶
Bugs ¶
Content type negotiation does an O(n*m) comparison driven on user input, which may be a DoS issue.