Documentation
¶
Overview ¶
Package rest provides primitives to interact with the openapi HTTP API.
Code generated by unknown module path version unknown version DO NOT EDIT.
Package rest provides primitives to interact with the openapi HTTP API.
Code generated by unknown module path version unknown version DO NOT EDIT.
Index ¶
- Constants
- 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 AddInputJSONBody
- type AddInputJSONRequestBody
- type AddInputReqBody
- type ChiServerOptions
- type ErrorResp
- type HttpServer
- type MiddlewareFunc
- type ServerInterface
- type ServerInterfaceWrapper
- type SuccessResp
Constants ¶
const (
BasicAuthScopes = "basicAuth.Scopes"
)
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 AddInputJSONBody ¶
type AddInputJSONBody AddInputReqBody
AddInputJSONBody defines parameters for AddInput.
type AddInputJSONRequestBody ¶
type AddInputJSONRequestBody AddInputJSONBody
AddInputJSONRequestBody defines body for AddInput for application/json ContentType.
type AddInputReqBody ¶
type AddInputReqBody struct {
ChatId int64 `json:"chatId"`
Description string `json:"description"`
InputType string `json:"inputType"`
Name string `json:"name"`
UserId int64 `json:"userId"`
}
AddInputReqBody defines model for AddInputReqBody.
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
}
type ErrorResp ¶
type ErrorResp struct {
HttpStatus int `json:"http_status"`
Message *string `json:"message,omitempty"`
Name string `json:"name"`
}
ErrorResp defines model for ErrorResp.
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(app app.App) HttpServer
func (HttpServer) AddInput ¶
func (h HttpServer) AddInput(w http.ResponseWriter, r *http.Request)
(POST /addInput)
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type ServerInterface ¶
type ServerInterface interface {
// (POST /addInput)
AddInput(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) AddInput ¶
func (siw *ServerInterfaceWrapper) AddInput(w http.ResponseWriter, r *http.Request)
AddInput operation middleware
type SuccessResp ¶
type SuccessResp struct {
Success bool `json:"success"`
}
SuccessResp defines model for SuccessResp.