Documentation
¶
Overview ¶
Package read provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
- type GetQueryParams
- type GetTestQueryParams
- type GorillaServerOptions
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ResultsResponse
- type Router
- type SearchResponse
- type Server
- func (srv *Server) Configure()
- func (srv *Server) GetHealth(w http.ResponseWriter, r *http.Request)
- func (srv *Server) GetQuery(w http.ResponseWriter, r *http.Request, params GetQueryParams)
- func (srv *Server) GetResults(w http.ResponseWriter, r *http.Request)
- func (srv *Server) GetTestQuery(w http.ResponseWriter, r *http.Request, params GetTestQueryParams)
- func (srv *Server) ListenAndServe() error
- func (srv *Server) Shutdown(ctx context.Context) error
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetQuery(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetResults(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTestQuery(w http.ResponseWriter, r *http.Request)
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- 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 *mux.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type GetQueryParams ¶
type GetQueryParams struct {
// Q query
Q *string `form:"q,omitempty" json:"q,omitempty"`
}
GetQueryParams defines parameters for GetQuery.
type GetTestQueryParams ¶
type GetTestQueryParams struct {
// Q query
Q *string `form:"q,omitempty" json:"q,omitempty"`
}
GetTestQueryParams defines parameters for GetTestQuery.
type GorillaServerOptions ¶
type GorillaServerOptions struct {
BaseURL string
BaseRouter *mux.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 ResultsResponse ¶
type ResultsResponse = externalRef0.ResultsResponse
ResultsResponse defines model for ResultsResponse.
type SearchResponse ¶
type SearchResponse = externalRef0.SearchResponse
SearchResponse defines model for SearchResponse.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server struct
func (*Server) GetQuery ¶
func (srv *Server) GetQuery(w http.ResponseWriter, r *http.Request, params GetQueryParams)
func (*Server) GetResults ¶
func (srv *Server) GetResults(w http.ResponseWriter, r *http.Request)
func (*Server) GetTestQuery ¶
func (srv *Server) GetTestQuery(w http.ResponseWriter, r *http.Request, params GetTestQueryParams)
func (*Server) ListenAndServe ¶
type ServerInterface ¶
type ServerInterface interface {
// Health check endpoint
// (GET /health)
GetHealth(w http.ResponseWriter, r *http.Request)
// (GET /query)
GetQuery(w http.ResponseWriter, r *http.Request, params GetQueryParams)
// (GET /results)
GetResults(w http.ResponseWriter, r *http.Request)
// (GET /test/query)
GetTestQuery(w http.ResponseWriter, r *http.Request, params GetTestQueryParams)
}
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) GetHealth ¶
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetQuery ¶
func (siw *ServerInterfaceWrapper) GetQuery(w http.ResponseWriter, r *http.Request)
GetQuery operation middleware
func (*ServerInterfaceWrapper) GetResults ¶
func (siw *ServerInterfaceWrapper) GetResults(w http.ResponseWriter, r *http.Request)
GetResults operation middleware
func (*ServerInterfaceWrapper) GetTestQuery ¶
func (siw *ServerInterfaceWrapper) GetTestQuery(w http.ResponseWriter, r *http.Request)
GetTestQuery 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