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 ( VulnerabilityReportPath = apiRoot + "vulnerability_report/" IndexAPIPath = apiRoot + "index_report" IndexReportAPIPath = apiRoot + "index_report/" IndexStateAPIPath = apiRoot + "index_state" NotificationAPIPath = apiRoot + "notification/" KeysAPIPath = apiRoot + "services/notifier/keys" KeyByIDAPIPath = apiRoot + "services/notifier/keys/" AffectedManifestAPIPath = internalRoot + "affected_manifest/" UpdateOperationAPIPath = internalRoot + "update_operation/" UpdateDiffAPIPath = internalRoot + "update_diff/" 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)
NotificaitonsHandler 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.