generated

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

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

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

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

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

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

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

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) 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 AnalyzeDependencies200JSONResponse

type AnalyzeDependencies200JSONResponse struct{ PurlListJSONResponse }

func (AnalyzeDependencies200JSONResponse) VisitAnalyzeDependenciesResponse

func (response AnalyzeDependencies200JSONResponse) VisitAnalyzeDependenciesResponse(w http.ResponseWriter) error

type AnalyzeDependencies400JSONResponse

type AnalyzeDependencies400JSONResponse struct{ BadRequestJSONResponse }

func (AnalyzeDependencies400JSONResponse) VisitAnalyzeDependenciesResponse

func (response AnalyzeDependencies400JSONResponse) VisitAnalyzeDependenciesResponse(w http.ResponseWriter) error

type AnalyzeDependencies500JSONResponse

type AnalyzeDependencies500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (AnalyzeDependencies500JSONResponse) VisitAnalyzeDependenciesResponse

func (response AnalyzeDependencies500JSONResponse) VisitAnalyzeDependenciesResponse(w http.ResponseWriter) error

type AnalyzeDependencies502JSONResponse

type AnalyzeDependencies502JSONResponse struct{ BadGatewayJSONResponse }

func (AnalyzeDependencies502JSONResponse) VisitAnalyzeDependenciesResponse

func (response AnalyzeDependencies502JSONResponse) VisitAnalyzeDependenciesResponse(w http.ResponseWriter) error

type AnalyzeDependenciesParams

type AnalyzeDependenciesParams struct {
	// PaginationSpec The pagination configuration for the query.
	//   * 'PageSize' specifies the number of results returned
	//   * 'Cursor' is returned by previous calls and specifies what page to return
	PaginationSpec *PaginationSpec `form:"paginationSpec,omitempty" json:"paginationSpec,omitempty"`

	// Sort The sort order of the packages
	//   * 'frequency' - The packages with the highest number of dependents
	//   * 'scorecard' - The packages with the lowest OpenSSF scorecard score
	Sort AnalyzeDependenciesParamsSort `form:"sort" json:"sort"`
}

AnalyzeDependenciesParams defines parameters for AnalyzeDependencies.

type AnalyzeDependenciesParamsSort

type AnalyzeDependenciesParamsSort string

AnalyzeDependenciesParamsSort defines parameters for AnalyzeDependencies.

const (
	Frequency AnalyzeDependenciesParamsSort = "frequency"
	Scorecard AnalyzeDependenciesParamsSort = "scorecard"
)

Defines values for AnalyzeDependenciesParamsSort.

type AnalyzeDependenciesRequestObject

type AnalyzeDependenciesRequestObject struct {
	Params AnalyzeDependenciesParams
}

type AnalyzeDependenciesResponseObject

type AnalyzeDependenciesResponseObject interface {
	VisitAnalyzeDependenciesResponse(w http.ResponseWriter) error
}

type BadGateway

type BadGateway = Error

BadGateway defines model for BadGateway.

type BadGatewayJSONResponse

type BadGatewayJSONResponse Error

type BadRequest

type BadRequest = Error

BadRequest defines model for BadRequest.

type BadRequestJSONResponse

type BadRequestJSONResponse Error

type ChiServerOptions

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

type Error

type Error struct {
	Message string `json:"Message"`
}

Error defines model for Error.

type HealthCheck200JSONResponse

type HealthCheck200JSONResponse string

func (HealthCheck200JSONResponse) VisitHealthCheckResponse

func (response HealthCheck200JSONResponse) VisitHealthCheckResponse(w http.ResponseWriter) error

type HealthCheckRequestObject

type HealthCheckRequestObject struct {
}

type HealthCheckResponseObject

type HealthCheckResponseObject interface {
	VisitHealthCheckResponse(w http.ResponseWriter) error
}

type InternalServerError

type InternalServerError = Error

InternalServerError defines model for InternalServerError.

type InternalServerErrorJSONResponse

type InternalServerErrorJSONResponse Error

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.Handler) http.Handler

type PaginationInfo added in v0.5.1

type PaginationInfo struct {
	NextCursor *string `json:"NextCursor,omitempty"`
	TotalCount *int    `json:"TotalCount,omitempty"`
}

PaginationInfo Contains the cursor to retrieve more pages. If there are no more, NextCursor will be nil.

type PaginationSpec added in v0.5.1

type PaginationSpec struct {
	Cursor   *string `json:"Cursor,omitempty"`
	PageSize *int    `json:"PageSize,omitempty"`
}

PaginationSpec defines model for PaginationSpec.

type Purl

type Purl = string

Purl defines model for Purl.

type PurlList

type PurlList struct {
	// PaginationInfo Contains the cursor to retrieve more pages. If there are no more,  NextCursor will be nil.
	PaginationInfo PaginationInfo `json:"PaginationInfo"`
	PurlList       []Purl         `json:"PurlList"`
}

PurlList defines model for PurlList.

type PurlListJSONResponse

type PurlListJSONResponse struct {
	// PaginationInfo Contains the cursor to retrieve more pages. If there are no more,  NextCursor will be nil.
	PaginationInfo PaginationInfo `json:"PaginationInfo"`
	PurlList       []Purl         `json:"PurlList"`
}

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 RetrieveDependencies200JSONResponse

type RetrieveDependencies200JSONResponse struct{ PurlListJSONResponse }

func (RetrieveDependencies200JSONResponse) VisitRetrieveDependenciesResponse

func (response RetrieveDependencies200JSONResponse) VisitRetrieveDependenciesResponse(w http.ResponseWriter) error

type RetrieveDependencies400JSONResponse

type RetrieveDependencies400JSONResponse struct{ BadRequestJSONResponse }

func (RetrieveDependencies400JSONResponse) VisitRetrieveDependenciesResponse

func (response RetrieveDependencies400JSONResponse) VisitRetrieveDependenciesResponse(w http.ResponseWriter) error

type RetrieveDependencies500JSONResponse

type RetrieveDependencies500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (RetrieveDependencies500JSONResponse) VisitRetrieveDependenciesResponse

func (response RetrieveDependencies500JSONResponse) VisitRetrieveDependenciesResponse(w http.ResponseWriter) error

type RetrieveDependencies502JSONResponse

type RetrieveDependencies502JSONResponse struct{ BadGatewayJSONResponse }

func (RetrieveDependencies502JSONResponse) VisitRetrieveDependenciesResponse

func (response RetrieveDependencies502JSONResponse) VisitRetrieveDependenciesResponse(w http.ResponseWriter) error

type RetrieveDependenciesParams

type RetrieveDependenciesParams struct {
	// PaginationSpec The pagination configuration for the query.
	//   * 'PageSize' specifies the number of results returned
	//   * 'Cursor' is returned by previous calls and specifies what page to return
	PaginationSpec *PaginationSpec `form:"paginationSpec,omitempty" json:"paginationSpec,omitempty"`

	// LinkCondition Whether links between nouns must be made by digest or if they  can be made just by name (i.e. purl). Specify 'name' to allow using SBOMs that don't provide the digest of the subject. The default is  'digest'. To search by purl, 'name' must be specified.
	LinkCondition *RetrieveDependenciesParamsLinkCondition `form:"linkCondition,omitempty" json:"linkCondition,omitempty"`

	// Purl The purl of the dependent package.
	Purl *string `form:"purl,omitempty" json:"purl,omitempty"`

	// Digest The digest of the dependent package.
	Digest *string `form:"digest,omitempty" json:"digest,omitempty"`
}

RetrieveDependenciesParams defines parameters for RetrieveDependencies.

type RetrieveDependenciesParamsLinkCondition added in v0.6.0

type RetrieveDependenciesParamsLinkCondition string

RetrieveDependenciesParamsLinkCondition defines parameters for RetrieveDependencies.

Defines values for RetrieveDependenciesParamsLinkCondition.

type RetrieveDependenciesRequestObject

type RetrieveDependenciesRequestObject struct {
	Params RetrieveDependenciesParams
}

type RetrieveDependenciesResponseObject

type RetrieveDependenciesResponseObject interface {
	VisitRetrieveDependenciesResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// Identify the most important dependencies
	// (GET /analysis/dependencies)
	AnalyzeDependencies(w http.ResponseWriter, r *http.Request, params AnalyzeDependenciesParams)
	// Health check the server
	// (GET /healthz)
	HealthCheck(w http.ResponseWriter, r *http.Request)
	// Retrieve transitive dependencies
	// (GET /query/dependencies)
	RetrieveDependencies(w http.ResponseWriter, r *http.Request, params RetrieveDependenciesParams)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

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) AnalyzeDependencies

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

AnalyzeDependencies operation middleware

func (*ServerInterfaceWrapper) HealthCheck

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

HealthCheck operation middleware

func (*ServerInterfaceWrapper) RetrieveDependencies

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

RetrieveDependencies operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// Identify the most important dependencies
	// (GET /analysis/dependencies)
	AnalyzeDependencies(ctx context.Context, request AnalyzeDependenciesRequestObject) (AnalyzeDependenciesResponseObject, error)
	// Health check the server
	// (GET /healthz)
	HealthCheck(ctx context.Context, request HealthCheckRequestObject) (HealthCheckResponseObject, error)
	// Retrieve transitive dependencies
	// (GET /query/dependencies)
	RetrieveDependencies(ctx context.Context, request RetrieveDependenciesRequestObject) (RetrieveDependenciesResponseObject, error)
}

StrictServerInterface represents all server handlers.

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 Unimplemented

type Unimplemented struct{}

func (Unimplemented) AnalyzeDependencies

func (_ Unimplemented) AnalyzeDependencies(w http.ResponseWriter, r *http.Request, params AnalyzeDependenciesParams)

Identify the most important dependencies (GET /analysis/dependencies)

func (Unimplemented) HealthCheck

func (_ Unimplemented) HealthCheck(w http.ResponseWriter, r *http.Request)

Health check the server (GET /healthz)

func (Unimplemented) RetrieveDependencies

func (_ Unimplemented) RetrieveDependencies(w http.ResponseWriter, r *http.Request, params RetrieveDependenciesParams)

Retrieve transitive dependencies (GET /query/dependencies)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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