server

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package server provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.2.0 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 PathToRawSpec

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

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

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type ServerInterface

type ServerInterface interface {
	// Get all asset findings.
	// (GET /assetFindings)
	GetAssetFindings(ctx echo.Context, params GetAssetFindingsParams) error
	// Create an asset finding
	// (POST /assetFindings)
	PostAssetFindings(ctx echo.Context) error
	// Delete an asset finding.
	// (DELETE /assetFindings/{assetFindingID})
	DeleteAssetFindingsAssetFindingID(ctx echo.Context, assetFindingID AssetFindingID) error
	// Get the details for an asset finding.
	// (GET /assetFindings/{assetFindingID})
	GetAssetFindingsAssetFindingID(ctx echo.Context, assetFindingID AssetFindingID, params GetAssetFindingsAssetFindingIDParams) error
	// Patch an asset finding.
	// (PATCH /assetFindings/{assetFindingID})
	PatchAssetFindingsAssetFindingID(ctx echo.Context, assetFindingID AssetFindingID, params PatchAssetFindingsAssetFindingIDParams) error
	// Update an asset finding.
	// (PUT /assetFindings/{assetFindingID})
	PutAssetFindingsAssetFindingID(ctx echo.Context, assetFindingID AssetFindingID, params PutAssetFindingsAssetFindingIDParams) error
	// Get asset scan estimations according to the given filters
	// (GET /assetScanEstimations)
	GetAssetScanEstimations(ctx echo.Context, params GetAssetScanEstimationsParams) error
	// Create an asset scan estimation for a specified asset
	// (POST /assetScanEstimations)
	PostAssetScanEstimations(ctx echo.Context) error
	// Delete an asset scan estimation.
	// (DELETE /assetScanEstimations/{assetScanEstimationID})
	DeleteAssetScanEstimationsAssetScanEstimationID(ctx echo.Context, assetScanEstimationID AssetScanEstimationID) error
	// Get an asset scan estimation.
	// (GET /assetScanEstimations/{assetScanEstimationID})
	GetAssetScanEstimationsAssetScanEstimationID(ctx echo.Context, assetScanEstimationID AssetScanEstimationID, params GetAssetScanEstimationsAssetScanEstimationIDParams) error
	// Patch an asset scan estimation
	// (PATCH /assetScanEstimations/{assetScanEstimationID})
	PatchAssetScanEstimationsAssetScanEstimationID(ctx echo.Context, assetScanEstimationID AssetScanEstimationID, params PatchAssetScanEstimationsAssetScanEstimationIDParams) error
	// Update an asset scan estimation.
	// (PUT /assetScanEstimations/{assetScanEstimationID})
	PutAssetScanEstimationsAssetScanEstimationID(ctx echo.Context, assetScanEstimationID AssetScanEstimationID, params PutAssetScanEstimationsAssetScanEstimationIDParams) error
	// Get asset scans according to the given filters
	// (GET /assetScans)
	GetAssetScans(ctx echo.Context, params GetAssetScansParams) error
	// Create an asset scan for a specified asset
	// (POST /assetScans)
	PostAssetScans(ctx echo.Context) error
	// Get an asset scan.
	// (GET /assetScans/{assetScanID})
	GetAssetScansAssetScanID(ctx echo.Context, assetScanID AssetScanID, params GetAssetScansAssetScanIDParams) error
	// Patch an asset scan
	// (PATCH /assetScans/{assetScanID})
	PatchAssetScansAssetScanID(ctx echo.Context, assetScanID AssetScanID, params PatchAssetScansAssetScanIDParams) error
	// Update an asset scan.
	// (PUT /assetScans/{assetScanID})
	PutAssetScansAssetScanID(ctx echo.Context, assetScanID AssetScanID, params PutAssetScansAssetScanIDParams) error
	// Get assets
	// (GET /assets)
	GetAssets(ctx echo.Context, params GetAssetsParams) error
	// Create asset
	// (POST /assets)
	PostAssets(ctx echo.Context) error
	// Delete asset.
	// (DELETE /assets/{assetID})
	DeleteAssetsAssetID(ctx echo.Context, assetID AssetID) error
	// Get asset.
	// (GET /assets/{assetID})
	GetAssetsAssetID(ctx echo.Context, assetID AssetID, params GetAssetsAssetIDParams) error
	// Update asset.
	// (PATCH /assets/{assetID})
	PatchAssetsAssetID(ctx echo.Context, assetID AssetID, params PatchAssetsAssetIDParams) error
	// Update asset.
	// (PUT /assets/{assetID})
	PutAssetsAssetID(ctx echo.Context, assetID AssetID, params PutAssetsAssetIDParams) error
	// Get all findings.
	// (GET /findings)
	GetFindings(ctx echo.Context, params GetFindingsParams) error
	// Create a finding
	// (POST /findings)
	PostFindings(ctx echo.Context) error
	// Delete a finding.
	// (DELETE /findings/{findingID})
	DeleteFindingsFindingID(ctx echo.Context, findingID FindingID) error
	// Get the details for a finding.
	// (GET /findings/{findingID})
	GetFindingsFindingID(ctx echo.Context, findingID FindingID, params GetFindingsFindingIDParams) error
	// Patch a finding.
	// (PATCH /findings/{findingID})
	PatchFindingsFindingID(ctx echo.Context, findingID FindingID) error
	// Update a finding.
	// (PUT /findings/{findingID})
	PutFindingsFindingID(ctx echo.Context, findingID FindingID) error
	// Get this OpenAPI spec
	// (GET /openapi.json)
	GetOpenAPISpec(ctx echo.Context) error
	// Get providers
	// (GET /providers)
	GetProviders(ctx echo.Context, params GetProvidersParams) error
	// Create provider
	// (POST /providers)
	PostProviders(ctx echo.Context) error
	// Delete provider.
	// (DELETE /providers/{providerID})
	DeleteProvidersProviderID(ctx echo.Context, providerID ProviderID) error
	// Get provider.
	// (GET /providers/{providerID})
	GetProvidersProviderID(ctx echo.Context, providerID ProviderID, params GetProvidersProviderIDParams) error
	// Update provider.
	// (PATCH /providers/{providerID})
	PatchProvidersProviderID(ctx echo.Context, providerID ProviderID, params PatchProvidersProviderIDParams) error
	// Update provider.
	// (PUT /providers/{providerID})
	PutProvidersProviderID(ctx echo.Context, providerID ProviderID, params PutProvidersProviderIDParams) error
	// Get all scan configs.
	// (GET /scanConfigs)
	GetScanConfigs(ctx echo.Context, params GetScanConfigsParams) error
	// Create a scan config
	// (POST /scanConfigs)
	PostScanConfigs(ctx echo.Context) error
	// Delete a scan config.
	// (DELETE /scanConfigs/{scanConfigID})
	DeleteScanConfigsScanConfigID(ctx echo.Context, scanConfigID ScanConfigID) error
	// Get the details for a scan config.
	// (GET /scanConfigs/{scanConfigID})
	GetScanConfigsScanConfigID(ctx echo.Context, scanConfigID ScanConfigID, params GetScanConfigsScanConfigIDParams) error
	// Patch a scan config.
	// (PATCH /scanConfigs/{scanConfigID})
	PatchScanConfigsScanConfigID(ctx echo.Context, scanConfigID ScanConfigID, params PatchScanConfigsScanConfigIDParams) error
	// Update a scan config.
	// (PUT /scanConfigs/{scanConfigID})
	PutScanConfigsScanConfigID(ctx echo.Context, scanConfigID ScanConfigID, params PutScanConfigsScanConfigIDParams) error
	// Get all scan estimations. Each scan estimation contains details about a multi-asset scan estimation.
	// (GET /scanEstimations)
	GetScanEstimations(ctx echo.Context, params GetScanEstimationsParams) error
	// Create a multi-asset scan estimation
	// (POST /scanEstimations)
	PostScanEstimations(ctx echo.Context) error
	// Delete a scan estimation.
	// (DELETE /scanEstimations/{scanEstimationID})
	DeleteScanEstimationsScanEstimationID(ctx echo.Context, scanEstimationID ScanEstimationID) error
	// Get the details for a given multi-asset scan estimation.
	// (GET /scanEstimations/{scanEstimationID})
	GetScanEstimationsScanEstimationID(ctx echo.Context, scanEstimationID ScanEstimationID, params GetScanEstimationsScanEstimationIDParams) error
	// Patch a scan estimation.
	// (PATCH /scanEstimations/{scanEstimationID})
	PatchScanEstimationsScanEstimationID(ctx echo.Context, scanEstimationID ScanEstimationID, params PatchScanEstimationsScanEstimationIDParams) error
	// Update a scan estimation.
	// (PUT /scanEstimations/{scanEstimationID})
	PutScanEstimationsScanEstimationID(ctx echo.Context, scanEstimationID ScanEstimationID, params PutScanEstimationsScanEstimationIDParams) error
	// Get all scans. Each scan contains details about a multi-asset scheduled scan.
	// (GET /scans)
	GetScans(ctx echo.Context, params GetScansParams) error
	// Create a multi-asset scheduled scan
	// (POST /scans)
	PostScans(ctx echo.Context) error
	// Delete a scan.
	// (DELETE /scans/{scanID})
	DeleteScansScanID(ctx echo.Context, scanID ScanID) error
	// Get the details for a given multi-asset scheduled scan.
	// (GET /scans/{scanID})
	GetScansScanID(ctx echo.Context, scanID ScanID, params GetScansScanIDParams) error
	// Patch a scan.
	// (PATCH /scans/{scanID})
	PatchScansScanID(ctx echo.Context, scanID ScanID, params PatchScansScanIDParams) error
	// Update a scan.
	// (PUT /scans/{scanID})
	PutScansScanID(ctx echo.Context, scanID ScanID, params PutScansScanIDParams) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) DeleteAssetFindingsAssetFindingID added in v0.7.2

func (w *ServerInterfaceWrapper) DeleteAssetFindingsAssetFindingID(ctx echo.Context) error

DeleteAssetFindingsAssetFindingID converts echo context to params.

func (*ServerInterfaceWrapper) DeleteAssetScanEstimationsAssetScanEstimationID

func (w *ServerInterfaceWrapper) DeleteAssetScanEstimationsAssetScanEstimationID(ctx echo.Context) error

DeleteAssetScanEstimationsAssetScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) DeleteAssetsAssetID

func (w *ServerInterfaceWrapper) DeleteAssetsAssetID(ctx echo.Context) error

DeleteAssetsAssetID converts echo context to params.

func (*ServerInterfaceWrapper) DeleteFindingsFindingID

func (w *ServerInterfaceWrapper) DeleteFindingsFindingID(ctx echo.Context) error

DeleteFindingsFindingID converts echo context to params.

func (*ServerInterfaceWrapper) DeleteProvidersProviderID

func (w *ServerInterfaceWrapper) DeleteProvidersProviderID(ctx echo.Context) error

DeleteProvidersProviderID converts echo context to params.

func (*ServerInterfaceWrapper) DeleteScanConfigsScanConfigID

func (w *ServerInterfaceWrapper) DeleteScanConfigsScanConfigID(ctx echo.Context) error

DeleteScanConfigsScanConfigID converts echo context to params.

func (*ServerInterfaceWrapper) DeleteScanEstimationsScanEstimationID

func (w *ServerInterfaceWrapper) DeleteScanEstimationsScanEstimationID(ctx echo.Context) error

DeleteScanEstimationsScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) DeleteScansScanID

func (w *ServerInterfaceWrapper) DeleteScansScanID(ctx echo.Context) error

DeleteScansScanID converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetFindings added in v0.7.2

func (w *ServerInterfaceWrapper) GetAssetFindings(ctx echo.Context) error

GetAssetFindings converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetFindingsAssetFindingID added in v0.7.2

func (w *ServerInterfaceWrapper) GetAssetFindingsAssetFindingID(ctx echo.Context) error

GetAssetFindingsAssetFindingID converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetScanEstimations

func (w *ServerInterfaceWrapper) GetAssetScanEstimations(ctx echo.Context) error

GetAssetScanEstimations converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetScanEstimationsAssetScanEstimationID

func (w *ServerInterfaceWrapper) GetAssetScanEstimationsAssetScanEstimationID(ctx echo.Context) error

GetAssetScanEstimationsAssetScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetScans

func (w *ServerInterfaceWrapper) GetAssetScans(ctx echo.Context) error

GetAssetScans converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetScansAssetScanID

func (w *ServerInterfaceWrapper) GetAssetScansAssetScanID(ctx echo.Context) error

GetAssetScansAssetScanID converts echo context to params.

func (*ServerInterfaceWrapper) GetAssets

func (w *ServerInterfaceWrapper) GetAssets(ctx echo.Context) error

GetAssets converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetsAssetID

func (w *ServerInterfaceWrapper) GetAssetsAssetID(ctx echo.Context) error

GetAssetsAssetID converts echo context to params.

func (*ServerInterfaceWrapper) GetFindings

func (w *ServerInterfaceWrapper) GetFindings(ctx echo.Context) error

GetFindings converts echo context to params.

func (*ServerInterfaceWrapper) GetFindingsFindingID

func (w *ServerInterfaceWrapper) GetFindingsFindingID(ctx echo.Context) error

GetFindingsFindingID converts echo context to params.

func (*ServerInterfaceWrapper) GetOpenAPISpec

func (w *ServerInterfaceWrapper) GetOpenAPISpec(ctx echo.Context) error

GetOpenAPISpec converts echo context to params.

func (*ServerInterfaceWrapper) GetProviders

func (w *ServerInterfaceWrapper) GetProviders(ctx echo.Context) error

GetProviders converts echo context to params.

func (*ServerInterfaceWrapper) GetProvidersProviderID

func (w *ServerInterfaceWrapper) GetProvidersProviderID(ctx echo.Context) error

GetProvidersProviderID converts echo context to params.

func (*ServerInterfaceWrapper) GetScanConfigs

func (w *ServerInterfaceWrapper) GetScanConfigs(ctx echo.Context) error

GetScanConfigs converts echo context to params.

func (*ServerInterfaceWrapper) GetScanConfigsScanConfigID

func (w *ServerInterfaceWrapper) GetScanConfigsScanConfigID(ctx echo.Context) error

GetScanConfigsScanConfigID converts echo context to params.

func (*ServerInterfaceWrapper) GetScanEstimations

func (w *ServerInterfaceWrapper) GetScanEstimations(ctx echo.Context) error

GetScanEstimations converts echo context to params.

func (*ServerInterfaceWrapper) GetScanEstimationsScanEstimationID

func (w *ServerInterfaceWrapper) GetScanEstimationsScanEstimationID(ctx echo.Context) error

GetScanEstimationsScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) GetScans

func (w *ServerInterfaceWrapper) GetScans(ctx echo.Context) error

GetScans converts echo context to params.

func (*ServerInterfaceWrapper) GetScansScanID

func (w *ServerInterfaceWrapper) GetScansScanID(ctx echo.Context) error

GetScansScanID converts echo context to params.

func (*ServerInterfaceWrapper) PatchAssetFindingsAssetFindingID added in v0.7.2

func (w *ServerInterfaceWrapper) PatchAssetFindingsAssetFindingID(ctx echo.Context) error

PatchAssetFindingsAssetFindingID converts echo context to params.

func (*ServerInterfaceWrapper) PatchAssetScanEstimationsAssetScanEstimationID

func (w *ServerInterfaceWrapper) PatchAssetScanEstimationsAssetScanEstimationID(ctx echo.Context) error

PatchAssetScanEstimationsAssetScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) PatchAssetScansAssetScanID

func (w *ServerInterfaceWrapper) PatchAssetScansAssetScanID(ctx echo.Context) error

PatchAssetScansAssetScanID converts echo context to params.

func (*ServerInterfaceWrapper) PatchAssetsAssetID

func (w *ServerInterfaceWrapper) PatchAssetsAssetID(ctx echo.Context) error

PatchAssetsAssetID converts echo context to params.

func (*ServerInterfaceWrapper) PatchFindingsFindingID

func (w *ServerInterfaceWrapper) PatchFindingsFindingID(ctx echo.Context) error

PatchFindingsFindingID converts echo context to params.

func (*ServerInterfaceWrapper) PatchProvidersProviderID

func (w *ServerInterfaceWrapper) PatchProvidersProviderID(ctx echo.Context) error

PatchProvidersProviderID converts echo context to params.

func (*ServerInterfaceWrapper) PatchScanConfigsScanConfigID

func (w *ServerInterfaceWrapper) PatchScanConfigsScanConfigID(ctx echo.Context) error

PatchScanConfigsScanConfigID converts echo context to params.

func (*ServerInterfaceWrapper) PatchScanEstimationsScanEstimationID

func (w *ServerInterfaceWrapper) PatchScanEstimationsScanEstimationID(ctx echo.Context) error

PatchScanEstimationsScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) PatchScansScanID

func (w *ServerInterfaceWrapper) PatchScansScanID(ctx echo.Context) error

PatchScansScanID converts echo context to params.

func (*ServerInterfaceWrapper) PostAssetFindings added in v0.7.2

func (w *ServerInterfaceWrapper) PostAssetFindings(ctx echo.Context) error

PostAssetFindings converts echo context to params.

func (*ServerInterfaceWrapper) PostAssetScanEstimations

func (w *ServerInterfaceWrapper) PostAssetScanEstimations(ctx echo.Context) error

PostAssetScanEstimations converts echo context to params.

func (*ServerInterfaceWrapper) PostAssetScans

func (w *ServerInterfaceWrapper) PostAssetScans(ctx echo.Context) error

PostAssetScans converts echo context to params.

func (*ServerInterfaceWrapper) PostAssets

func (w *ServerInterfaceWrapper) PostAssets(ctx echo.Context) error

PostAssets converts echo context to params.

func (*ServerInterfaceWrapper) PostFindings

func (w *ServerInterfaceWrapper) PostFindings(ctx echo.Context) error

PostFindings converts echo context to params.

func (*ServerInterfaceWrapper) PostProviders

func (w *ServerInterfaceWrapper) PostProviders(ctx echo.Context) error

PostProviders converts echo context to params.

func (*ServerInterfaceWrapper) PostScanConfigs

func (w *ServerInterfaceWrapper) PostScanConfigs(ctx echo.Context) error

PostScanConfigs converts echo context to params.

func (*ServerInterfaceWrapper) PostScanEstimations

func (w *ServerInterfaceWrapper) PostScanEstimations(ctx echo.Context) error

PostScanEstimations converts echo context to params.

func (*ServerInterfaceWrapper) PostScans

func (w *ServerInterfaceWrapper) PostScans(ctx echo.Context) error

PostScans converts echo context to params.

func (*ServerInterfaceWrapper) PutAssetFindingsAssetFindingID added in v0.7.2

func (w *ServerInterfaceWrapper) PutAssetFindingsAssetFindingID(ctx echo.Context) error

PutAssetFindingsAssetFindingID converts echo context to params.

func (*ServerInterfaceWrapper) PutAssetScanEstimationsAssetScanEstimationID

func (w *ServerInterfaceWrapper) PutAssetScanEstimationsAssetScanEstimationID(ctx echo.Context) error

PutAssetScanEstimationsAssetScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) PutAssetScansAssetScanID

func (w *ServerInterfaceWrapper) PutAssetScansAssetScanID(ctx echo.Context) error

PutAssetScansAssetScanID converts echo context to params.

func (*ServerInterfaceWrapper) PutAssetsAssetID

func (w *ServerInterfaceWrapper) PutAssetsAssetID(ctx echo.Context) error

PutAssetsAssetID converts echo context to params.

func (*ServerInterfaceWrapper) PutFindingsFindingID

func (w *ServerInterfaceWrapper) PutFindingsFindingID(ctx echo.Context) error

PutFindingsFindingID converts echo context to params.

func (*ServerInterfaceWrapper) PutProvidersProviderID

func (w *ServerInterfaceWrapper) PutProvidersProviderID(ctx echo.Context) error

PutProvidersProviderID converts echo context to params.

func (*ServerInterfaceWrapper) PutScanConfigsScanConfigID

func (w *ServerInterfaceWrapper) PutScanConfigsScanConfigID(ctx echo.Context) error

PutScanConfigsScanConfigID converts echo context to params.

func (*ServerInterfaceWrapper) PutScanEstimationsScanEstimationID

func (w *ServerInterfaceWrapper) PutScanEstimationsScanEstimationID(ctx echo.Context) error

PutScanEstimationsScanEstimationID converts echo context to params.

func (*ServerInterfaceWrapper) PutScansScanID

func (w *ServerInterfaceWrapper) PutScansScanID(ctx echo.Context) error

PutScansScanID converts echo context to params.

Jump to

Keyboard shortcuts

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