Documentation ¶
Overview ¶
Package ChatSwaggerOpenapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT.
Package ChatSwaggerOpenapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.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 CreateUserJSONBody
- type CreateUserJSONRequestBody
- type CreateUserRequest
- type CreateUserResponse
- type InvalidParamFormatError
- type LoginUserJSONBody
- type LoginUserJSONRequestBody
- type LoginUserRequest
- type LoginUserResonse
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- 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 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 CreateUserJSONBody ¶
type CreateUserJSONBody CreateUserRequest
CreateUserJSONBody defines parameters for CreateUser.
type CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody CreateUserJSONBody
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserRequest ¶
type CreateUserRequest struct { Password string `json:"password"` UserName string `json:"userName"` }
CreateUserRequest defines model for CreateUserRequest.
type CreateUserResponse ¶
type CreateUserResponse struct { Id *string `json:"id,omitempty"` UserName *string `json:"userName,omitempty"` }
CreateUserResponse defines model for CreateUserResponse.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type LoginUserJSONBody ¶
type LoginUserJSONBody LoginUserRequest
LoginUserJSONBody defines parameters for LoginUser.
type LoginUserJSONRequestBody ¶
type LoginUserJSONRequestBody LoginUserJSONBody
LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType.
type LoginUserRequest ¶
type LoginUserRequest struct { // The password for login in clear text Password string `json:"password"` // The user name for login UserName string `json:"userName"` }
LoginUserRequest defines model for LoginUserRequest.
type LoginUserResonse ¶
type LoginUserResonse struct { // A url for websoket API with a one-time token for starting chat Url string `json:"url"` }
LoginUserResonse defines model for LoginUserResonse.
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
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 { // Register (create) user // (POST /user) CreateUser(w http.ResponseWriter, r *http.Request) // Logs user into the system // (POST /user/login) LoginUser(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) CreateUser ¶
func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser operation middleware
func (*ServerInterfaceWrapper) LoginUser ¶
func (siw *ServerInterfaceWrapper) LoginUser(w http.ResponseWriter, r *http.Request)
LoginUser 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