Documentation
¶
Overview ¶
Package server provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 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 ChiServerOptions
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type Service
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- type UnmarshalingParamError
- type UpdateAgentStatus200Response
- type UpdateAgentStatus201Response
- type UpdateAgentStatus400JSONResponse
- type UpdateAgentStatus401JSONResponse
- type UpdateAgentStatus403JSONResponse
- type UpdateAgentStatus404JSONResponse
- type UpdateAgentStatus500JSONResponse
- type UpdateAgentStatusRequestObject
- type UpdateAgentStatusResponseObject
- type UpdateSourceInventory200JSONResponse
- type UpdateSourceInventory400JSONResponse
- type UpdateSourceInventory401JSONResponse
- type UpdateSourceInventory403JSONResponse
- type UpdateSourceInventory404JSONResponse
- type UpdateSourceInventory500JSONResponse
- type UpdateSourceInventoryRequestObject
- type UpdateSourceInventoryResponseObject
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 ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
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 {
// (PUT /api/v1/agents/{id}/status)
UpdateAgentStatus(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
// (PUT /api/v1/sources/{id}/status)
UpdateSourceInventory(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
}
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) UpdateAgentStatus ¶
func (siw *ServerInterfaceWrapper) UpdateAgentStatus(w http.ResponseWriter, r *http.Request)
UpdateAgentStatus operation middleware
func (*ServerInterfaceWrapper) UpdateSourceInventory ¶
func (siw *ServerInterfaceWrapper) UpdateSourceInventory(w http.ResponseWriter, r *http.Request)
UpdateSourceInventory operation middleware
type Service ¶
type Service interface {
StrictServerInterface
}
Service is a wrapper around the generated server interface.
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 {
// (PUT /api/v1/agents/{id}/status)
UpdateAgentStatus(ctx context.Context, request UpdateAgentStatusRequestObject) (UpdateAgentStatusResponseObject, error)
// (PUT /api/v1/sources/{id}/status)
UpdateSourceInventory(ctx context.Context, request UpdateSourceInventoryRequestObject) (UpdateSourceInventoryResponseObject, 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) UpdateAgentStatus ¶
func (_ Unimplemented) UpdateAgentStatus(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
(PUT /api/v1/agents/{id}/status)
func (Unimplemented) UpdateSourceInventory ¶
func (_ Unimplemented) UpdateSourceInventory(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
(PUT /api/v1/sources/{id}/status)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateAgentStatus200Response ¶
type UpdateAgentStatus200Response struct {
}
func (UpdateAgentStatus200Response) VisitUpdateAgentStatusResponse ¶
func (response UpdateAgentStatus200Response) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
type UpdateAgentStatus201Response ¶
type UpdateAgentStatus201Response struct {
}
func (UpdateAgentStatus201Response) VisitUpdateAgentStatusResponse ¶
func (response UpdateAgentStatus201Response) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
type UpdateAgentStatus400JSONResponse ¶
type UpdateAgentStatus400JSONResponse externalRef0.Error
func (UpdateAgentStatus400JSONResponse) VisitUpdateAgentStatusResponse ¶
func (response UpdateAgentStatus400JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
type UpdateAgentStatus401JSONResponse ¶
type UpdateAgentStatus401JSONResponse externalRef0.Error
func (UpdateAgentStatus401JSONResponse) VisitUpdateAgentStatusResponse ¶
func (response UpdateAgentStatus401JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
type UpdateAgentStatus403JSONResponse ¶
type UpdateAgentStatus403JSONResponse externalRef0.Error
func (UpdateAgentStatus403JSONResponse) VisitUpdateAgentStatusResponse ¶
func (response UpdateAgentStatus403JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
type UpdateAgentStatus404JSONResponse ¶
type UpdateAgentStatus404JSONResponse externalRef0.Error
func (UpdateAgentStatus404JSONResponse) VisitUpdateAgentStatusResponse ¶
func (response UpdateAgentStatus404JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
type UpdateAgentStatus500JSONResponse ¶
type UpdateAgentStatus500JSONResponse externalRef0.Error
func (UpdateAgentStatus500JSONResponse) VisitUpdateAgentStatusResponse ¶
func (response UpdateAgentStatus500JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
type UpdateAgentStatusRequestObject ¶
type UpdateAgentStatusRequestObject struct {
Id openapi_types.UUID `json:"id"`
Body *UpdateAgentStatusJSONRequestBody
}
type UpdateAgentStatusResponseObject ¶
type UpdateAgentStatusResponseObject interface {
VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
}
type UpdateSourceInventory200JSONResponse ¶
type UpdateSourceInventory200JSONResponse externalRef0.Source
func (UpdateSourceInventory200JSONResponse) VisitUpdateSourceInventoryResponse ¶
func (response UpdateSourceInventory200JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
type UpdateSourceInventory400JSONResponse ¶
type UpdateSourceInventory400JSONResponse externalRef0.Error
func (UpdateSourceInventory400JSONResponse) VisitUpdateSourceInventoryResponse ¶
func (response UpdateSourceInventory400JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
type UpdateSourceInventory401JSONResponse ¶
type UpdateSourceInventory401JSONResponse externalRef0.Error
func (UpdateSourceInventory401JSONResponse) VisitUpdateSourceInventoryResponse ¶
func (response UpdateSourceInventory401JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
type UpdateSourceInventory403JSONResponse ¶
type UpdateSourceInventory403JSONResponse externalRef0.Error
func (UpdateSourceInventory403JSONResponse) VisitUpdateSourceInventoryResponse ¶
func (response UpdateSourceInventory403JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
type UpdateSourceInventory404JSONResponse ¶
type UpdateSourceInventory404JSONResponse externalRef0.Error
func (UpdateSourceInventory404JSONResponse) VisitUpdateSourceInventoryResponse ¶
func (response UpdateSourceInventory404JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
type UpdateSourceInventory500JSONResponse ¶
type UpdateSourceInventory500JSONResponse externalRef0.Error
func (UpdateSourceInventory500JSONResponse) VisitUpdateSourceInventoryResponse ¶
func (response UpdateSourceInventory500JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
type UpdateSourceInventoryRequestObject ¶
type UpdateSourceInventoryRequestObject struct {
Id openapi_types.UUID `json:"id"`
Body *UpdateSourceInventoryJSONRequestBody
}
type UpdateSourceInventoryResponseObject ¶
type UpdateSourceInventoryResponseObject interface {
VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
}