Documentation ¶
Index ¶
Constants ¶
View Source
const (
HeaderContentType = "Content-Type"
)
Variables ¶
View Source
var MimeTypeDockerImageManifest = MimeType{Type: "application", Subtype: "vnd.docker.distribution.manifest.v2+json"}
View Source
var MimeTypeError = MimeType{Type: "application", Subtype: "vnd.scanner.adapter.error", Params: MimeTypeVersion}
View Source
var MimeTypeHarborVulnerabilityReport = MimeType{Type: "application", Subtype: "vnd.scanner.adapter.vuln.report.harbor+json", Params: MimeTypeVersion}
View Source
var MimeTypeMetadata = MimeType{Type: "application", Subtype: "vnd.scanner.adapter.metadata+json", Params: MimeTypeVersion}
View Source
var MimeTypeOCIImageManifest = MimeType{Type: "application", Subtype: "vnd.oci.image.manifest.v1+json"}
View Source
var MimeTypeScanResponse = MimeType{Type: "application", Subtype: "vnd.scanner.adapter.scan.response+json", Params: MimeTypeVersion}
View Source
var MimeTypeVersion = map[string]string{"version": "1.0"}
Functions ¶
This section is empty.
Types ¶
type BaseHandler ¶
type BaseHandler struct { }
func (*BaseHandler) SendInternalServerError ¶
func (h *BaseHandler) SendInternalServerError(res http.ResponseWriter)
func (*BaseHandler) WriteJSON ¶
func (h *BaseHandler) WriteJSON(res http.ResponseWriter, data interface{}, mimeType MimeType, statusCode int)
func (*BaseHandler) WriteJSONError ¶
func (h *BaseHandler) WriteJSONError(res http.ResponseWriter, err harbor.Error)
type MimeType ¶
type MimeType struct { Type string Subtype string Params MimeTypeParams }
type MimeTypeParams ¶
Click to show internal directories.
Click to hide internal directories.