Documentation ¶
Overview ¶
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Cvss
- type CvssType
- type GorillaServerOptions
- type Health
- type ImageID
- type ImageResult
- type ImageResults
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ScanResult
- type ScanResults
- type Scans
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) ApiV1GetImage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ApiV1GetImages(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ApiV1GetScan(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ApiV1GetScans(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ApiV1GetTest(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Healthz(w http.ResponseWriter, r *http.Request)
- type TestResult
- type Tests
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshallingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type GorillaServerOptions ¶
type GorillaServerOptions struct { BaseURL string BaseRouter *mux.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type ImageID ¶
type ImageID = string
ImageID The ID of an image for which to get the scan results for.
type ImageResult ¶ added in v0.3.0
type ImageResult struct { // ScanResults A list of scan results. ScanResults *Scans `json:"scanResults,omitempty"` // TestResults A collection of test results for an image. TestResults *Tests `json:"testResults,omitempty"` }
ImageResult A scan and test result combined.
type ImageResults ¶ added in v0.3.0
type ImageResults struct { // ImageID The ID of the image. ImageID *string `json:"imageID,omitempty"` // ImageName The ID of the image. ImageName *string `json:"imageName,omitempty"` // ScanStatus The status of the image scan. ScanStatus *string `json:"scanStatus,omitempty"` // TestStatus The status of the image test. TestStatus *string `json:"testStatus,omitempty"` }
ImageResults A list of image IDs from scan results.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ScanResults ¶ added in v0.3.0
type ScanResults struct { // ImageID The ID of the image. ImageID *string `json:"imageID,omitempty"` }
ScanResults A list of image IDs from scan results.
type ServerInterface ¶
type ServerInterface interface { // Get the scan and test results for an image. // (GET /api/v1/image/{image-id}) ApiV1GetImage(w http.ResponseWriter, r *http.Request, imageId ImageID) // Get a list of images based on the scan results. // (GET /api/v1/images) ApiV1GetImages(w http.ResponseWriter, r *http.Request) // Get a scan result. // (GET /api/v1/scan/{image-id}) ApiV1GetScan(w http.ResponseWriter, r *http.Request, imageId ImageID) // Get a list of scan results. // (GET /api/v1/scans) ApiV1GetScans(w http.ResponseWriter, r *http.Request) // Get a test result. // (GET /api/v1/test/{image-id}) ApiV1GetTest(w http.ResponseWriter, r *http.Request, imageId ImageID) // Returns ok when server is online. // (GET /healthz) Healthz(w http.ResponseWriter, r *http.Request) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) ApiV1GetImage ¶ added in v0.3.0
func (siw *ServerInterfaceWrapper) ApiV1GetImage(w http.ResponseWriter, r *http.Request)
ApiV1GetImage operation middleware
func (*ServerInterfaceWrapper) ApiV1GetImages ¶ added in v0.3.0
func (siw *ServerInterfaceWrapper) ApiV1GetImages(w http.ResponseWriter, r *http.Request)
ApiV1GetImages operation middleware
func (*ServerInterfaceWrapper) ApiV1GetScan ¶
func (siw *ServerInterfaceWrapper) ApiV1GetScan(w http.ResponseWriter, r *http.Request)
ApiV1GetScan operation middleware
func (*ServerInterfaceWrapper) ApiV1GetScans ¶ added in v0.3.0
func (siw *ServerInterfaceWrapper) ApiV1GetScans(w http.ResponseWriter, r *http.Request)
ApiV1GetScans operation middleware
func (*ServerInterfaceWrapper) ApiV1GetTest ¶ added in v0.3.0
func (siw *ServerInterfaceWrapper) ApiV1GetTest(w http.ResponseWriter, r *http.Request)
ApiV1GetTest operation middleware
func (*ServerInterfaceWrapper) Healthz ¶
func (siw *ServerInterfaceWrapper) Healthz(w http.ResponseWriter, r *http.Request)
Healthz operation middleware
type TestResult ¶ added in v0.3.0
type TestResult = Tests
TestResult A collection of test results for an image.
type Tests ¶ added in v0.3.0
type Tests = []interface{}
Tests A collection of test results for an image.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshallingParamError ¶
func (*UnmarshallingParamError) Error ¶
func (e *UnmarshallingParamError) Error() string
func (*UnmarshallingParamError) Unwrap ¶
func (e *UnmarshallingParamError) Unwrap() error