Documentation ¶
Overview ¶
Package oapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 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 ChiServerOptions
- type History
- type InvalidParamFormatError
- type ListHistoriesParams
- type ListHistoriesResponse
- type Message
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DownloadImage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) HealthCheck(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListHistories(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UploadImage(w http.ResponseWriter, r *http.Request)
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) DownloadImage(w http.ResponseWriter, r *http.Request, jobID openapi_types.UUID)
- func (_ Unimplemented) HealthCheck(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListHistories(w http.ResponseWriter, r *http.Request, params ListHistoriesParams)
- func (_ Unimplemented) UploadImage(w http.ResponseWriter, r *http.Request)
- type UnmarshalingParamError
- type UploadImageMultipartBody
- type UploadImageMultipartRequestBody
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 ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type History ¶
type History struct { HistoryID *int `json:"historyID,omitempty"` IsrJobID *openapi_types.UUID `json:"isrJobID,omitempty"` Status *string `json:"status,omitempty"` Timestamp *string `json:"timestamp,omitempty"` }
History defines model for History.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListHistoriesParams ¶
type ListHistoriesParams struct { // Limit Maximum number to retrieve at once Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Offset Offset when retrieving Offset *int `form:"offset,omitempty" json:"offset,omitempty"` // Latest Get only latest histories Latest *bool `form:"latest,omitempty" json:"latest,omitempty"` }
ListHistoriesParams defines parameters for ListHistories.
type ListHistoriesResponse ¶
type ListHistoriesResponse struct { HasNext *bool `json:"hasNext,omitempty"` Histories *[]History `json:"histories,omitempty"` }
ListHistoriesResponse defines model for ListHistoriesResponse.
type Message ¶
type Message struct {
Message *string `json:"message,omitempty"`
}
Message defines model for Message.
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 /health) HealthCheck(w http.ResponseWriter, r *http.Request) // (GET /histories) ListHistories(w http.ResponseWriter, r *http.Request, params ListHistoriesParams) // (POST /images/upload) UploadImage(w http.ResponseWriter, r *http.Request) // (GET /images/{jobID}) DownloadImage(w http.ResponseWriter, r *http.Request, jobID openapi_types.UUID) }
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) DownloadImage ¶
func (siw *ServerInterfaceWrapper) DownloadImage(w http.ResponseWriter, r *http.Request)
DownloadImage operation middleware
func (*ServerInterfaceWrapper) HealthCheck ¶
func (siw *ServerInterfaceWrapper) HealthCheck(w http.ResponseWriter, r *http.Request)
HealthCheck operation middleware
func (*ServerInterfaceWrapper) ListHistories ¶
func (siw *ServerInterfaceWrapper) ListHistories(w http.ResponseWriter, r *http.Request)
ListHistories operation middleware
func (*ServerInterfaceWrapper) UploadImage ¶
func (siw *ServerInterfaceWrapper) UploadImage(w http.ResponseWriter, r *http.Request)
UploadImage 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 Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) DownloadImage ¶
func (_ Unimplemented) DownloadImage(w http.ResponseWriter, r *http.Request, jobID openapi_types.UUID)
(GET /images/{jobID})
func (Unimplemented) HealthCheck ¶
func (_ Unimplemented) HealthCheck(w http.ResponseWriter, r *http.Request)
(GET /health)
func (Unimplemented) ListHistories ¶
func (_ Unimplemented) ListHistories(w http.ResponseWriter, r *http.Request, params ListHistoriesParams)
(GET /histories)
func (Unimplemented) UploadImage ¶
func (_ Unimplemented) UploadImage(w http.ResponseWriter, r *http.Request)
(POST /images/upload)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UploadImageMultipartBody ¶
type UploadImageMultipartBody struct {
File *openapi_types.File `json:"file,omitempty"`
}
UploadImageMultipartBody defines parameters for UploadImage.
type UploadImageMultipartRequestBody ¶
type UploadImageMultipartRequestBody UploadImageMultipartBody
UploadImageMultipartRequestBody defines body for UploadImage for multipart/form-data ContentType.