Documentation
¶
Overview ¶
Package oapiserver 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 GetSwagger() (swagger *openapi3.T, err error)
- 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
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type ChiServerOptions
- type CreateItemJSONBody
- type CreateItemJSONRequestBody
- type CreateListJSONBody
- type CreateListJSONRequestBody
- type GetItemsParams
- type GetListsParams
- type InvalidParamFormatError
- type MiddlewareFunc
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateList(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteList(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetItem(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetItems(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetList(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetLists(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReflowList(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateItemFromListChecked(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateItemFromListContent(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateItemFromListSort(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateList(w http.ResponseWriter, r *http.Request)
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CreateItem(w http.ResponseWriter, r *http.Request, listID int64)
- func (_ Unimplemented) CreateList(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DeleteItem(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
- func (_ Unimplemented) DeleteList(w http.ResponseWriter, r *http.Request, listID int64)
- func (_ Unimplemented) GetItem(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
- func (_ Unimplemented) GetItems(w http.ResponseWriter, r *http.Request, listID int64, params GetItemsParams)
- func (_ Unimplemented) GetList(w http.ResponseWriter, r *http.Request, listID int64)
- func (_ Unimplemented) GetLists(w http.ResponseWriter, r *http.Request, params GetListsParams)
- func (_ Unimplemented) ReflowList(w http.ResponseWriter, r *http.Request, listID int64)
- func (_ Unimplemented) UpdateItemFromListChecked(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
- func (_ Unimplemented) UpdateItemFromListContent(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
- func (_ Unimplemented) UpdateItemFromListSort(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
- func (_ Unimplemented) UpdateList(w http.ResponseWriter, r *http.Request, listID int64)
- type UnmarshalingParamError
- type UpdateItemFromListCheckedJSONBody
- type UpdateItemFromListCheckedJSONRequestBody
- type UpdateItemFromListContentJSONBody
- type UpdateItemFromListContentJSONRequestBody
- type UpdateItemFromListSortJSONBody
- type UpdateItemFromListSortJSONRequestBody
- type UpdateListJSONBody
- type UpdateListJSONRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
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 CreateItemJSONBody ¶
CreateItemJSONBody defines parameters for CreateItem.
type CreateItemJSONRequestBody ¶
type CreateItemJSONRequestBody CreateItemJSONBody
CreateItemJSONRequestBody defines body for CreateItem for application/json ContentType.
type CreateListJSONBody ¶
type CreateListJSONBody struct {
Name string `json:"name"`
}
CreateListJSONBody defines parameters for CreateList.
type CreateListJSONRequestBody ¶
type CreateListJSONRequestBody CreateListJSONBody
CreateListJSONRequestBody defines body for CreateList for application/json ContentType.
type GetItemsParams ¶
type GetItemsParams struct {
Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"`
}
GetItemsParams defines parameters for GetItems.
type GetListsParams ¶
type GetListsParams struct {
Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"`
}
GetListsParams defines parameters for GetLists.
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 ServerInterface ¶
type ServerInterface interface {
// Get a list of lists
// (GET /lists)
GetLists(w http.ResponseWriter, r *http.Request, params GetListsParams)
// Create a new list
// (POST /lists)
CreateList(w http.ResponseWriter, r *http.Request)
// Delete list by ID
// (DELETE /lists/{listID})
DeleteList(w http.ResponseWriter, r *http.Request, listID int64)
// Get list by ID
// (GET /lists/{listID})
GetList(w http.ResponseWriter, r *http.Request, listID int64)
// Update list by ID
// (PUT /lists/{listID})
UpdateList(w http.ResponseWriter, r *http.Request, listID int64)
// Get a list of items from listID
// (GET /lists/{listID}/items)
GetItems(w http.ResponseWriter, r *http.Request, listID int64, params GetItemsParams)
// Create a new item on the listID
// (POST /lists/{listID}/items)
CreateItem(w http.ResponseWriter, r *http.Request, listID int64)
// Delete item by listID and itemID
// (DELETE /lists/{listID}/items/{itemID})
DeleteItem(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
// Get item by listID and itemID
// (GET /lists/{listID}/items/{itemID})
GetItem(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
// Update item checked by listID and itemID
// (PUT /lists/{listID}/items/{itemID}/checked)
UpdateItemFromListChecked(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
// Update item content by listID and itemID
// (PUT /lists/{listID}/items/{itemID}/content)
UpdateItemFromListContent(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
// Update item sort by listID and itemID
// (PUT /lists/{listID}/items/{itemID}/sort)
UpdateItemFromListSort(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
// Reflow list by ID
// (PUT /lists/{listID}/reflow)
ReflowList(w http.ResponseWriter, r *http.Request, listID int64)
}
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) CreateItem ¶
func (siw *ServerInterfaceWrapper) CreateItem(w http.ResponseWriter, r *http.Request)
CreateItem operation middleware
func (*ServerInterfaceWrapper) CreateList ¶
func (siw *ServerInterfaceWrapper) CreateList(w http.ResponseWriter, r *http.Request)
CreateList operation middleware
func (*ServerInterfaceWrapper) DeleteItem ¶
func (siw *ServerInterfaceWrapper) DeleteItem(w http.ResponseWriter, r *http.Request)
DeleteItem operation middleware
func (*ServerInterfaceWrapper) DeleteList ¶
func (siw *ServerInterfaceWrapper) DeleteList(w http.ResponseWriter, r *http.Request)
DeleteList operation middleware
func (*ServerInterfaceWrapper) GetItem ¶
func (siw *ServerInterfaceWrapper) GetItem(w http.ResponseWriter, r *http.Request)
GetItem operation middleware
func (*ServerInterfaceWrapper) GetItems ¶
func (siw *ServerInterfaceWrapper) GetItems(w http.ResponseWriter, r *http.Request)
GetItems operation middleware
func (*ServerInterfaceWrapper) GetList ¶
func (siw *ServerInterfaceWrapper) GetList(w http.ResponseWriter, r *http.Request)
GetList operation middleware
func (*ServerInterfaceWrapper) GetLists ¶
func (siw *ServerInterfaceWrapper) GetLists(w http.ResponseWriter, r *http.Request)
GetLists operation middleware
func (*ServerInterfaceWrapper) ReflowList ¶
func (siw *ServerInterfaceWrapper) ReflowList(w http.ResponseWriter, r *http.Request)
ReflowList operation middleware
func (*ServerInterfaceWrapper) UpdateItemFromListChecked ¶
func (siw *ServerInterfaceWrapper) UpdateItemFromListChecked(w http.ResponseWriter, r *http.Request)
UpdateItemFromListChecked operation middleware
func (*ServerInterfaceWrapper) UpdateItemFromListContent ¶
func (siw *ServerInterfaceWrapper) UpdateItemFromListContent(w http.ResponseWriter, r *http.Request)
UpdateItemFromListContent operation middleware
func (*ServerInterfaceWrapper) UpdateItemFromListSort ¶
func (siw *ServerInterfaceWrapper) UpdateItemFromListSort(w http.ResponseWriter, r *http.Request)
UpdateItemFromListSort operation middleware
func (*ServerInterfaceWrapper) UpdateList ¶
func (siw *ServerInterfaceWrapper) UpdateList(w http.ResponseWriter, r *http.Request)
UpdateList 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) CreateItem ¶
func (_ Unimplemented) CreateItem(w http.ResponseWriter, r *http.Request, listID int64)
Create a new item on the listID (POST /lists/{listID}/items)
func (Unimplemented) CreateList ¶
func (_ Unimplemented) CreateList(w http.ResponseWriter, r *http.Request)
Create a new list (POST /lists)
func (Unimplemented) DeleteItem ¶
func (_ Unimplemented) DeleteItem(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
Delete item by listID and itemID (DELETE /lists/{listID}/items/{itemID})
func (Unimplemented) DeleteList ¶
func (_ Unimplemented) DeleteList(w http.ResponseWriter, r *http.Request, listID int64)
Delete list by ID (DELETE /lists/{listID})
func (Unimplemented) GetItem ¶
func (_ Unimplemented) GetItem(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
Get item by listID and itemID (GET /lists/{listID}/items/{itemID})
func (Unimplemented) GetItems ¶
func (_ Unimplemented) GetItems(w http.ResponseWriter, r *http.Request, listID int64, params GetItemsParams)
Get a list of items from listID (GET /lists/{listID}/items)
func (Unimplemented) GetList ¶
func (_ Unimplemented) GetList(w http.ResponseWriter, r *http.Request, listID int64)
Get list by ID (GET /lists/{listID})
func (Unimplemented) GetLists ¶
func (_ Unimplemented) GetLists(w http.ResponseWriter, r *http.Request, params GetListsParams)
Get a list of lists (GET /lists)
func (Unimplemented) ReflowList ¶
func (_ Unimplemented) ReflowList(w http.ResponseWriter, r *http.Request, listID int64)
Reflow list by ID (PUT /lists/{listID}/reflow)
func (Unimplemented) UpdateItemFromListChecked ¶
func (_ Unimplemented) UpdateItemFromListChecked(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
Update item checked by listID and itemID (PUT /lists/{listID}/items/{itemID}/checked)
func (Unimplemented) UpdateItemFromListContent ¶
func (_ Unimplemented) UpdateItemFromListContent(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
Update item content by listID and itemID (PUT /lists/{listID}/items/{itemID}/content)
func (Unimplemented) UpdateItemFromListSort ¶
func (_ Unimplemented) UpdateItemFromListSort(w http.ResponseWriter, r *http.Request, listID int64, itemID int64)
Update item sort by listID and itemID (PUT /lists/{listID}/items/{itemID}/sort)
func (Unimplemented) UpdateList ¶
func (_ Unimplemented) UpdateList(w http.ResponseWriter, r *http.Request, listID int64)
Update list by ID (PUT /lists/{listID})
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateItemFromListCheckedJSONBody ¶
type UpdateItemFromListCheckedJSONBody struct {
Checked bool `json:"checked"`
}
UpdateItemFromListCheckedJSONBody defines parameters for UpdateItemFromListChecked.
type UpdateItemFromListCheckedJSONRequestBody ¶
type UpdateItemFromListCheckedJSONRequestBody UpdateItemFromListCheckedJSONBody
UpdateItemFromListCheckedJSONRequestBody defines body for UpdateItemFromListChecked for application/json ContentType.
type UpdateItemFromListContentJSONBody ¶
type UpdateItemFromListContentJSONBody struct {
Content string `json:"content"`
}
UpdateItemFromListContentJSONBody defines parameters for UpdateItemFromListContent.
type UpdateItemFromListContentJSONRequestBody ¶
type UpdateItemFromListContentJSONRequestBody UpdateItemFromListContentJSONBody
UpdateItemFromListContentJSONRequestBody defines body for UpdateItemFromListContent for application/json ContentType.
type UpdateItemFromListSortJSONBody ¶
type UpdateItemFromListSortJSONBody struct {
Sort int64 `json:"sort"`
}
UpdateItemFromListSortJSONBody defines parameters for UpdateItemFromListSort.
type UpdateItemFromListSortJSONRequestBody ¶
type UpdateItemFromListSortJSONRequestBody UpdateItemFromListSortJSONBody
UpdateItemFromListSortJSONRequestBody defines body for UpdateItemFromListSort for application/json ContentType.
type UpdateListJSONBody ¶
type UpdateListJSONBody struct {
Name string `json:"name"`
}
UpdateListJSONBody defines parameters for UpdateList.
type UpdateListJSONRequestBody ¶
type UpdateListJSONRequestBody UpdateListJSONBody
UpdateListJSONRequestBody defines body for UpdateList for application/json ContentType.