httptransport

package
v4.0.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VulnerabilityReportPath = apiRoot + "vulnerability_report/"
	IndexAPIPath            = apiRoot + "index_report"
	IndexReportAPIPath      = apiRoot + "index_report/"
	StateAPIPath            = apiRoot + "index_state"
	UpdatesAPIPath          = internalRoot + "updates/"
	OpenAPIV1Path           = "/openapi/v1"
)
View Source
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

func DiscoveryHandler() http.Handler

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

func UpdateDiffHandler(d matcher.Differ) (http.Handler, error)

func VulnerabilityReportHandler

func VulnerabilityReportHandler(service matcher.Service, indexer indexer.Service) http.HandlerFunc

VulnerabilityReportHandler utilizes a Service to serialize and return a claircore.VulnerabilityReport

Types

type Server

type Server struct {
	*http.Server
	*http.ServeMux
	// contains filtered or unexported fields
}

Server is the primary http server Clair exposes it's functionality on.

func New

func New(ctx context.Context, conf config.Config, indexer indexer.Service, matcher matcher.Service) (*Server, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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