Documentation ¶
Overview ¶
Package api 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.
Package api 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 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 DeleteUserParams
- type Error
- type GetUserParams
- type IdmStore
- func (h *IdmStore) DeleteUser(w http.ResponseWriter, r *http.Request, params DeleteUserParams)
- func (h *IdmStore) GetPublic(w http.ResponseWriter, r *http.Request)
- func (h *IdmStore) GetUser(w http.ResponseWriter, r *http.Request, params GetUserParams)
- func (h *IdmStore) PostUser(w http.ResponseWriter, r *http.Request)
- func (h *IdmStore) PutUser(w http.ResponseWriter, r *http.Request)
- type InvalidParamFormatError
- type MiddlewareFunc
- type PostUser
- type PostUserJSONRequestBody
- type PutUserFormdataRequestBody
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutUser(w http.ResponseWriter, r *http.Request)
- type Service
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) DeleteUser(w http.ResponseWriter, r *http.Request, params DeleteUserParams)
- func (_ Unimplemented) GetUser(w http.ResponseWriter, r *http.Request, params GetUserParams)
- func (_ Unimplemented) PostUser(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PutUser(w http.ResponseWriter, r *http.Request)
- type UnmarshalingParamError
- type User
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 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 DeleteUserParams ¶
type DeleteUserParams struct { // Username Username of the user to be deleted Username string `form:"username" json:"username"` }
DeleteUserParams defines parameters for DeleteUser.
type GetUserParams ¶
type GetUserParams struct { // Username Username to fetch the user information Username string `form:"username" json:"username"` }
GetUserParams defines parameters for GetUser.
type IdmStore ¶
func (*IdmStore) DeleteUser ¶
func (h *IdmStore) DeleteUser(w http.ResponseWriter, r *http.Request, params DeleteUserParams)
func (*IdmStore) GetUser ¶
func (h *IdmStore) GetUser(w http.ResponseWriter, r *http.Request, params GetUserParams)
curl --location -X GET 'localhost:4000/api/get?username=torpago_usr2' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0b3JwYWdvX3VzcjIifQ.TEfIz4cfqhvq5evhsvvw9bSuoAWvCnlgzaXV1Lrf5Vc'
func (*IdmStore) PostUser ¶
func (h *IdmStore) PostUser(w http.ResponseWriter, r *http.Request)
curl --location -X POST 'localhost:4000/api/post' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0b3JwYWdvX3VzcjIifQ.TEfIz4cfqhvq5evhsvvw9bSuoAWvCnlgzaXV1Lrf5Vc' \ --data-raw '{ "username": "elliot123", "password": "pwd", "firstname": "Jessie", "lastname": "Lee" }'
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type PostUser ¶
type PostUser struct { Firstname string `json:"firstname"` Lastname *string `json:"lastname,omitempty"` Password string `json:"password"` Username string `json:"username"` }
PostUser defines model for PostUser.
type PostUserJSONRequestBody ¶
type PostUserJSONRequestBody = PostUser
PostUserJSONRequestBody defines body for PostUser for application/json ContentType.
type PutUserFormdataRequestBody ¶
type PutUserFormdataRequestBody = User
PutUserFormdataRequestBody defines body for PutUser for application/x-www-form-urlencoded ContentType.
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 { // (DELETE /delete) DeleteUser(w http.ResponseWriter, r *http.Request, params DeleteUserParams) // (GET /get) GetUser(w http.ResponseWriter, r *http.Request, params GetUserParams) // (POST /post) PostUser(w http.ResponseWriter, r *http.Request) // (PUT /put) PutUser(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) DeleteUser ¶
func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser operation middleware
func (*ServerInterfaceWrapper) GetUser ¶
func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Request)
GetUser operation middleware
func (*ServerInterfaceWrapper) PostUser ¶
func (siw *ServerInterfaceWrapper) PostUser(w http.ResponseWriter, r *http.Request)
PostUser operation middleware
func (*ServerInterfaceWrapper) PutUser ¶
func (siw *ServerInterfaceWrapper) PutUser(w http.ResponseWriter, r *http.Request)
PutUser 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) DeleteUser ¶
func (_ Unimplemented) DeleteUser(w http.ResponseWriter, r *http.Request, params DeleteUserParams)
(DELETE /delete)
func (Unimplemented) GetUser ¶
func (_ Unimplemented) GetUser(w http.ResponseWriter, r *http.Request, params GetUserParams)
(GET /get)
func (Unimplemented) PostUser ¶
func (_ Unimplemented) PostUser(w http.ResponseWriter, r *http.Request)
(POST /post)
func (Unimplemented) PutUser ¶
func (_ Unimplemented) PutUser(w http.ResponseWriter, r *http.Request)
(PUT /put)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error