generated

package
v0.1.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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 HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type Cvss

type Cvss = map[string]interface{}

Cvss The name of the package

type CvssType

type CvssType = map[string]interface{}

CvssType The name of the package

type GorillaServerOptions

type GorillaServerOptions struct {
	BaseURL          string
	BaseRouter       *mux.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Health

type Health = string

Health A response to a health request

type ImageID

type ImageID = string

ImageID The ID of an image for which to get the scan results for.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

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

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

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 ScanResult

type ScanResult struct {
	// Cvss The name of the package
	Cvss *Cvss `json:"cvss,omitempty"`

	// Description The name of the package
	Description *string `json:"description,omitempty"`

	// FixedVersion The name of the package
	FixedVersion *string `json:"fixedVersion,omitempty"`

	// InstalledVersion The name of the package
	InstalledVersion *string `json:"installedVersion,omitempty"`

	// PkgName The name of the package
	PkgName *string `json:"pkgName,omitempty"`

	// Severity The name of the package
	Severity *string `json:"severity,omitempty"`

	// VulnerabilityID The name of the package
	VulnerabilityID *string `json:"vulnerabilityID,omitempty"`
}

ScanResult A scan result.

type ServerInterface

type ServerInterface interface {
	// Get a scan result
	// (GET /api/v1/scan/{image-id})
	ApiV1GetScan(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) ApiV1GetScan

func (siw *ServerInterfaceWrapper) ApiV1GetScan(w http.ResponseWriter, r *http.Request)

ApiV1GetScan operation middleware

func (*ServerInterfaceWrapper) Healthz

Healthz operation middleware

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshallingParamError

type UnmarshallingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshallingParamError) Error

func (e *UnmarshallingParamError) Error() string

func (*UnmarshallingParamError) Unwrap

func (e *UnmarshallingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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