Documentation ¶
Overview ¶
Package restapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.1-0.20220609223533-7da811e1cf30 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 Annotation
- type Annotations
- type ChiServerOptions
- type GetApiFindingsParams
- type GetEventAnnotationsParams
- type InvalidParamFormatError
- type MiddlewareFunc
- type Redacted
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetApiFindings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetEventAnnotations(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ResetApiFindings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) StartTraceAnalysis(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) StopTraceAnalysis(w http.ResponseWriter, r *http.Request)
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- 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 Annotation ¶
type Annotation struct { Annotation string `json:"annotation"` Kind string `json:"kind"` Name string `json:"name"` Severity string `json:"severity"` }
Annotation defines model for Annotation.
type Annotations ¶
type Annotations struct { Items *[]Annotation `json:"items,omitempty"` // Total event annotations count Total int `json:"total"` }
Annotations defines model for Annotations.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type GetApiFindingsParams ¶
type GetApiFindingsParams struct { // Should findings include sensitive data ? Sensitive *externalRef0.Sensitive `form:"sensitive,omitempty" json:"sensitive,omitempty"` }
GetApiFindingsParams defines parameters for GetApiFindings.
type GetEventAnnotationsParams ¶
type GetEventAnnotationsParams struct {
Redacted *Redacted `form:"redacted,omitempty" json:"redacted,omitempty"`
}
GetEventAnnotationsParams defines parameters for GetEventAnnotations.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
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 ServerInterface ¶
type ServerInterface interface { // Get findings for an API and module // (GET /apiFindings/{apiID}) GetApiFindings(w http.ResponseWriter, r *http.Request, apiID externalRef0.ApiID, params GetApiFindingsParams) // Delete all API findings for an API // (POST /apiFindings/{apiID}/reset) ResetApiFindings(w http.ResponseWriter, r *http.Request, apiID externalRef0.ApiID) // Get Annotations for an event // (GET /eventAnnotations/{eventID}) GetEventAnnotations(w http.ResponseWriter, r *http.Request, eventID int64, params GetEventAnnotationsParams) // Start Trace Analysis for an API // (POST /{apiID}/start) StartTraceAnalysis(w http.ResponseWriter, r *http.Request, apiID externalRef0.ApiID) // Stop Trace Analysis for an API // (POST /{apiID}/stop) StopTraceAnalysis(w http.ResponseWriter, r *http.Request, apiID externalRef0.ApiID) }
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) GetApiFindings ¶
func (siw *ServerInterfaceWrapper) GetApiFindings(w http.ResponseWriter, r *http.Request)
GetApiFindings operation middleware
func (*ServerInterfaceWrapper) GetEventAnnotations ¶
func (siw *ServerInterfaceWrapper) GetEventAnnotations(w http.ResponseWriter, r *http.Request)
GetEventAnnotations operation middleware
func (*ServerInterfaceWrapper) ResetApiFindings ¶
func (siw *ServerInterfaceWrapper) ResetApiFindings(w http.ResponseWriter, r *http.Request)
ResetApiFindings operation middleware
func (*ServerInterfaceWrapper) StartTraceAnalysis ¶
func (siw *ServerInterfaceWrapper) StartTraceAnalysis(w http.ResponseWriter, r *http.Request)
StartTraceAnalysis operation middleware
func (*ServerInterfaceWrapper) StopTraceAnalysis ¶
func (siw *ServerInterfaceWrapper) StopTraceAnalysis(w http.ResponseWriter, r *http.Request)
StopTraceAnalysis operation middleware
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 UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error