Documentation ¶
Index ¶
- Constants
- func AffectedManifestHandler(serv indexer.Affected) http.HandlerFunc
- func DiscoveryHandler() http.Handler
- func IndexHandler(serv indexer.StateIndexer) http.HandlerFunc
- func IndexReportHandler(serv indexer.StateReporter) http.HandlerFunc
- func IndexStateHandler(service indexer.Stater) http.HandlerFunc
- func KeyByIDHandler(keystore notifier.KeyStore) http.HandlerFunc
- func KeysHandler(keystore notifier.KeyStore) http.HandlerFunc
- func UpdateDiffHandler(serv matcher.Differ) http.HandlerFunc
- func VulnerabilityReportHandler(service matcher.Service, indexer indexer.Service) http.HandlerFunc
- type NotifHandler
- type Response
- type Server
- type UOHandler
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 ¶
This section is empty.
Functions ¶
func AffectedManifestHandler ¶
func AffectedManifestHandler(serv indexer.Affected) http.HandlerFunc
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 IndexStateHandler ¶
func IndexStateHandler(service indexer.Stater) http.HandlerFunc
IndexStateHandler 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 KeyByIDHandler ¶
func KeyByIDHandler(keystore notifier.KeyStore) http.HandlerFunc
KeyByIDHandler returns a particular key queried by ID in JWK format.
func KeysHandler ¶
func KeysHandler(keystore notifier.KeyStore) http.HandlerFunc
KeysHandler returns all keys persisted in the keystore in JWK set format.
func UpdateDiffHandler ¶
func UpdateDiffHandler(serv matcher.Differ) http.HandlerFunc
UpdateDiffHandler provides an endpoint to GET update diffs when provided an UpdateOperation ref.
func VulnerabilityReportHandler ¶
VulnerabilityReportHandler utilizes a Service to serialize and return a claircore.VulnerabilityReport
Types ¶
type NotifHandler ¶
type NotifHandler struct {
// contains filtered or unexported fields
}
func NotificationHandler ¶
func NotificationHandler(serv service.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.