Documentation
¶
Overview ¶
Package engineserver provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- 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
- type BadRequest
- type BadRequestJSONResponse
- type ChiServerOptions
- type Error
- type EvaluateRequest
- type EvaluateRequest200JSONResponse
- type EvaluateRequest400JSONResponse
- type EvaluateRequest401JSONResponse
- type EvaluateRequest403JSONResponse
- type EvaluateRequest406JSONResponse
- type EvaluateRequest409JSONResponse
- type EvaluateRequest500JSONResponse
- type EvaluateRequestJSONRequestBody
- type EvaluateRequestRequestObject
- type EvaluateRequestResponseObject
- type EvaluateResponse
- type EvaluateResponseStatus
- type Forbidden
- type ForbiddenJSONResponse
- type InternalServerError
- type InternalServerErrorJSONResponse
- type InvalidParamFormatError
- type MiddlewareFunc
- type PolicyConflict
- type PolicyConflictJSONResponse
- type Rejected
- type RejectedJSONResponse
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type ServiceInstance
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type Unauthorized
- type UnauthorizedJSONResponse
- type UnescapedCookieParamError
- type Unimplemented
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
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 {
// Detail Detailed error message
Detail *string `json:"detail,omitempty"`
// Instance Request identifier
Instance *string `json:"instance,omitempty"`
// Status HTTP status code
Status int32 `json:"status"`
// Title Short error summary
Title string `json:"title"`
// Type Error type identifier
Type string `json:"type"`
}
Error defines model for Error.
type EvaluateRequest ¶
type EvaluateRequest struct {
ServiceInstance ServiceInstance `json:"service_instance"`
}
EvaluateRequest defines model for EvaluateRequest.
type EvaluateRequest200JSONResponse ¶
type EvaluateRequest200JSONResponse EvaluateResponse
func (EvaluateRequest200JSONResponse) VisitEvaluateRequestResponse ¶
func (response EvaluateRequest200JSONResponse) VisitEvaluateRequestResponse(w http.ResponseWriter) error
type EvaluateRequest400JSONResponse ¶
type EvaluateRequest400JSONResponse struct{ BadRequestJSONResponse }
func (EvaluateRequest400JSONResponse) VisitEvaluateRequestResponse ¶
func (response EvaluateRequest400JSONResponse) VisitEvaluateRequestResponse(w http.ResponseWriter) error
type EvaluateRequest401JSONResponse ¶
func (EvaluateRequest401JSONResponse) VisitEvaluateRequestResponse ¶
func (response EvaluateRequest401JSONResponse) VisitEvaluateRequestResponse(w http.ResponseWriter) error
type EvaluateRequest403JSONResponse ¶
type EvaluateRequest403JSONResponse struct{ ForbiddenJSONResponse }
func (EvaluateRequest403JSONResponse) VisitEvaluateRequestResponse ¶
func (response EvaluateRequest403JSONResponse) VisitEvaluateRequestResponse(w http.ResponseWriter) error
type EvaluateRequest406JSONResponse ¶
type EvaluateRequest406JSONResponse struct{ RejectedJSONResponse }
func (EvaluateRequest406JSONResponse) VisitEvaluateRequestResponse ¶
func (response EvaluateRequest406JSONResponse) VisitEvaluateRequestResponse(w http.ResponseWriter) error
type EvaluateRequest409JSONResponse ¶
type EvaluateRequest409JSONResponse struct{ PolicyConflictJSONResponse }
func (EvaluateRequest409JSONResponse) VisitEvaluateRequestResponse ¶
func (response EvaluateRequest409JSONResponse) VisitEvaluateRequestResponse(w http.ResponseWriter) error
type EvaluateRequest500JSONResponse ¶
type EvaluateRequest500JSONResponse struct {
InternalServerErrorJSONResponse
}
func (EvaluateRequest500JSONResponse) VisitEvaluateRequestResponse ¶
func (response EvaluateRequest500JSONResponse) VisitEvaluateRequestResponse(w http.ResponseWriter) error
type EvaluateRequestJSONRequestBody ¶
type EvaluateRequestJSONRequestBody = EvaluateRequest
EvaluateRequestJSONRequestBody defines body for EvaluateRequest for application/json ContentType.
type EvaluateRequestRequestObject ¶
type EvaluateRequestRequestObject struct {
Body *EvaluateRequestJSONRequestBody
}
type EvaluateRequestResponseObject ¶
type EvaluateRequestResponseObject interface {
VisitEvaluateRequestResponse(w http.ResponseWriter) error
}
type EvaluateResponse ¶
type EvaluateResponse struct {
EvaluatedServiceInstance ServiceInstance `json:"evaluated_service_instance"`
// SelectedProvider Service provider selected by policies
SelectedProvider string `json:"selected_provider"`
// Status APPROVED - Request unchanged by policies
// MODIFIED - Request was modified by policies
Status EvaluateResponseStatus `json:"status"`
}
EvaluateResponse defines model for EvaluateResponse.
type EvaluateResponseStatus ¶
type EvaluateResponseStatus string
EvaluateResponseStatus APPROVED - Request unchanged by policies MODIFIED - Request was modified by policies
const ( APPROVED EvaluateResponseStatus = "APPROVED" MODIFIED EvaluateResponseStatus = "MODIFIED" )
Defines values for EvaluateResponseStatus.
type ForbiddenJSONResponse ¶
type ForbiddenJSONResponse 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 PolicyConflictJSONResponse ¶
type PolicyConflictJSONResponse Error
type RejectedJSONResponse ¶
type RejectedJSONResponse 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 {
// Evaluate request payload against policies
// (POST /policies:evaluateRequest)
EvaluateRequest(w http.ResponseWriter, r *http.Request)
}
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) EvaluateRequest ¶
func (siw *ServerInterfaceWrapper) EvaluateRequest(w http.ResponseWriter, r *http.Request)
EvaluateRequest operation middleware
type ServiceInstance ¶
type ServiceInstance struct {
// Spec Service specification (flexible schema)
Spec map[string]interface{} `json:"spec"`
}
ServiceInstance defines model for ServiceInstance.
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 {
// Evaluate request payload against policies
// (POST /policies:evaluateRequest)
EvaluateRequest(ctx context.Context, request EvaluateRequestRequestObject) (EvaluateRequestResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnauthorizedJSONResponse ¶
type UnauthorizedJSONResponse Error
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) EvaluateRequest ¶
func (_ Unimplemented) EvaluateRequest(w http.ResponseWriter, r *http.Request)
Evaluate request payload against policies (POST /policies:evaluateRequest)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error