Documentation
¶
Overview ¶
Package write 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 ApiResponse
- type GorillaServerOptions
- type InvalidParamFormatError
- type MiddlewareFunc
- type PostRecordJSONRequestBody
- type PostSelectionJSONRequestBody
- type RecordRequest
- type RequiredHeaderError
- type RequiredParamError
- type Router
- type SelectionRequest
- type Server
- func (srv *Server) Configure()
- func (srv *Server) GetHealth(w http.ResponseWriter, r *http.Request)
- func (srv *Server) ListenAndServe() error
- func (srv *Server) PostRecord(w http.ResponseWriter, r *http.Request)
- func (srv *Server) PostSelection(w http.ResponseWriter, r *http.Request)
- func (srv *Server) Shutdown(ctx context.Context) error
- type ServerInterface
- type ServerInterfaceWrapper
- 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 ApiResponse ¶
type ApiResponse = externalRef0.ApiResponse
ApiResponse defines model for ApiResponse.
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 PostRecordJSONRequestBody ¶
type PostRecordJSONRequestBody = RecordRequest
PostRecordJSONRequestBody defines body for PostRecord for application/json ContentType.
type PostSelectionJSONRequestBody ¶
type PostSelectionJSONRequestBody = SelectionRequest
PostSelectionJSONRequestBody defines body for PostSelection for application/json ContentType.
type RecordRequest ¶
type RecordRequest = externalRef0.RecordRequest
RecordRequest defines model for RecordRequest.
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 SelectionRequest ¶
type SelectionRequest = externalRef0.SelectionRequest
SelectionRequest defines model for SelectionRequest.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server struct
func (*Server) ListenAndServe ¶
func (*Server) PostRecord ¶
func (srv *Server) PostRecord(w http.ResponseWriter, r *http.Request)
func (*Server) PostSelection ¶
func (srv *Server) PostSelection(w http.ResponseWriter, r *http.Request)
type ServerInterface ¶
type ServerInterface interface { // Health check endpoint // (GET /health) GetHealth(w http.ResponseWriter, r *http.Request) // (POST /record) PostRecord(w http.ResponseWriter, r *http.Request) // (POST /selection) PostSelection(w http.ResponseWriter, r *http.Request) }
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) PostRecord ¶
func (siw *ServerInterfaceWrapper) PostRecord(w http.ResponseWriter, r *http.Request)
PostRecord operation middleware
func (*ServerInterfaceWrapper) PostSelection ¶
func (siw *ServerInterfaceWrapper) PostSelection(w http.ResponseWriter, r *http.Request)
PostSelection 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