Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DockerDistributionHeaderName defines the header used by clients to verify if the // registry implements the OCI Distribution spec. DockerDistributionHeaderName = "Docker-Distribution-Api-Version" // DockerDistributionHeaderValue defines the value of // DockerDistributionHeaderName DockerDistributionHeaderValue = "registry/2.0" )
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(props *stori.HandlerProperties, opts *HandlerOpts) http.Handler
Handler returns an http.Handler for the Stori API.
func OCIHandler ¶
func OCIHandler(props *stori.HandlerProperties) http.Handler
OCIHandler returns an http.Handler for the API. This can be used on its own to mount an OCI-compliant image registry within another web server.
Types ¶
type HandlerOpts ¶
type HandlerOpts struct { // TLSAuth if enabled, uses the Common Name of the certificate provided by // the client to authenticate the request. TLSAuth bool // Metrics if enable, configures the server to expose Prometheus metrics. Metrics bool }
HandlerOpts defines what supplemental endpoints and middleware to add to the handler.
Click to show internal directories.
Click to hide internal directories.