Documentation ¶
Overview ¶
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type AnalyzeDependencies200JSONResponse
- type AnalyzeDependencies400JSONResponse
- type AnalyzeDependencies500JSONResponse
- type AnalyzeDependencies502JSONResponse
- type AnalyzeDependenciesParams
- type AnalyzeDependenciesParamsSort
- type AnalyzeDependenciesRequestObject
- type AnalyzeDependenciesResponseObject
- type BadGateway
- type BadGatewayJSONResponse
- type BadRequest
- type BadRequestJSONResponse
- type ChiServerOptions
- type Error
- type HealthCheck200JSONResponse
- type HealthCheckRequestObject
- type HealthCheckResponseObject
- type InternalServerError
- type InternalServerErrorJSONResponse
- type InvalidParamFormatError
- type MiddlewareFunc
- type PackageName
- type PackageNameList
- type PackageNameListJSONResponse
- type PaginationInfo
- type PaginationSpec
- type Purl
- type PurlList
- type PurlListJSONResponse
- type RequiredHeaderError
- type RequiredParamError
- type RetrieveDependencies200JSONResponse
- type RetrieveDependencies400JSONResponse
- type RetrieveDependencies500JSONResponse
- type RetrieveDependencies502JSONResponse
- type RetrieveDependenciesParams
- type RetrieveDependenciesParamsLinkCondition
- type RetrieveDependenciesRequestObject
- type RetrieveDependenciesResponseObject
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) AnalyzeDependencies(w http.ResponseWriter, r *http.Request, params AnalyzeDependenciesParams)
- func (_ Unimplemented) HealthCheck(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) RetrieveDependencies(w http.ResponseWriter, r *http.Request, params RetrieveDependenciesParams)
- type UnmarshalingParamError
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 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
Types ¶
type AnalyzeDependencies200JSONResponse ¶
type AnalyzeDependencies200JSONResponse struct{ PackageNameListJSONResponse }
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 BadGatewayJSONResponse ¶
type BadGatewayJSONResponse Error
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 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 ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type PackageName ¶ added in v0.7.0
PackageName defines model for PackageName.
type PackageNameList ¶ added in v0.7.0
type PackageNameList = []PackageName
PackageNameList defines model for PackageNameList.
type PackageNameListJSONResponse ¶ added in v0.7.0
type PackageNameListJSONResponse []PackageName
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 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 ¶
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.
const ( Digest RetrieveDependenciesParamsLinkCondition = "digest" Name RetrieveDependenciesParamsLinkCondition = "name" )
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 StrictHandlerFunc ¶
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
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 ¶
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 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 ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error