Documentation ¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type AddNote201Response
- type AddNote4XXJSONResponse
- type AddNoteJSONRequestBody
- type AddNoteRequestObject
- type AddNoteResponseObject
- type DeleteNote204Response
- type DeleteNote4XXJSONResponse
- type DeleteNoteRequestObject
- type DeleteNoteResponseObject
- type EchoRouter
- type ErrorMessage
- type GetNote200JSONResponse
- type GetNote4XXJSONResponse
- type GetNoteRequestObject
- type GetNoteResponseObject
- type GetNotes200JSONResponse
- type GetNotesParams
- type GetNotesParamsOrder
- type GetNotesParamsSort
- type GetNotesRequestObject
- type GetNotesResponseObject
- type Note
- type NoteBase
- type NoteCreation
- type NoteList
- type NoteListItem
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) AddNote(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteNote(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetNote(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetNotes(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateNote(ctx echo.Context) error
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type UpdateNote204Response
- type UpdateNote4XXJSONResponse
- type UpdateNoteJSONRequestBody
- type UpdateNoteRequestObject
- type UpdateNoteResponseObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type AddNote201Response ¶
type AddNote201Response struct { }
func (AddNote201Response) VisitAddNoteResponse ¶
func (response AddNote201Response) VisitAddNoteResponse(w http.ResponseWriter) error
type AddNote4XXJSONResponse ¶
type AddNote4XXJSONResponse struct { Body ErrorMessage StatusCode int }
func (AddNote4XXJSONResponse) VisitAddNoteResponse ¶
func (response AddNote4XXJSONResponse) VisitAddNoteResponse(w http.ResponseWriter) error
type AddNoteJSONRequestBody ¶
type AddNoteJSONRequestBody = NoteCreation
AddNoteJSONRequestBody defines body for AddNote for application/json ContentType.
type AddNoteRequestObject ¶
type AddNoteRequestObject struct {
Body *AddNoteJSONRequestBody
}
type AddNoteResponseObject ¶
type AddNoteResponseObject interface {
VisitAddNoteResponse(w http.ResponseWriter) error
}
type DeleteNote204Response ¶
type DeleteNote204Response struct { }
func (DeleteNote204Response) VisitDeleteNoteResponse ¶
func (response DeleteNote204Response) VisitDeleteNoteResponse(w http.ResponseWriter) error
type DeleteNote4XXJSONResponse ¶
type DeleteNote4XXJSONResponse struct { Body ErrorMessage StatusCode int }
func (DeleteNote4XXJSONResponse) VisitDeleteNoteResponse ¶
func (response DeleteNote4XXJSONResponse) VisitDeleteNoteResponse(w http.ResponseWriter) error
type DeleteNoteRequestObject ¶
type DeleteNoteRequestObject struct {
Id string `json:"id"`
}
type DeleteNoteResponseObject ¶
type DeleteNoteResponseObject interface {
VisitDeleteNoteResponse(w http.ResponseWriter) error
}
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type ErrorMessage ¶
type ErrorMessage struct {
Message string `json:"message"`
}
ErrorMessage defines model for ErrorMessage.
type GetNote200JSONResponse ¶
type GetNote200JSONResponse Note
func (GetNote200JSONResponse) VisitGetNoteResponse ¶
func (response GetNote200JSONResponse) VisitGetNoteResponse(w http.ResponseWriter) error
type GetNote4XXJSONResponse ¶
type GetNote4XXJSONResponse struct { Body ErrorMessage StatusCode int }
func (GetNote4XXJSONResponse) VisitGetNoteResponse ¶
func (response GetNote4XXJSONResponse) VisitGetNoteResponse(w http.ResponseWriter) error
type GetNoteRequestObject ¶
type GetNoteRequestObject struct {
Id string `json:"id"`
}
type GetNoteResponseObject ¶
type GetNoteResponseObject interface {
VisitGetNoteResponse(w http.ResponseWriter) error
}
type GetNotes200JSONResponse ¶
type GetNotes200JSONResponse NoteList
func (GetNotes200JSONResponse) VisitGetNotesResponse ¶
func (response GetNotes200JSONResponse) VisitGetNotesResponse(w http.ResponseWriter) error
type GetNotesParams ¶
type GetNotesParams struct { Sort GetNotesParamsSort `form:"sort" json:"sort"` Order GetNotesParamsOrder `form:"order" json:"order"` // Search Filter notes with some search text in title or body Search *string `form:"search,omitempty" json:"search,omitempty"` }
GetNotesParams defines parameters for GetNotes.
type GetNotesParamsOrder ¶
type GetNotesParamsOrder string
GetNotesParamsOrder defines parameters for GetNotes.
const ( Asc GetNotesParamsOrder = "asc" Desc GetNotesParamsOrder = "desc" )
Defines values for GetNotesParamsOrder.
type GetNotesParamsSort ¶
type GetNotesParamsSort string
GetNotesParamsSort defines parameters for GetNotes.
const ( Date GetNotesParamsSort = "date" Title GetNotesParamsSort = "title" )
Defines values for GetNotesParamsSort.
type GetNotesRequestObject ¶
type GetNotesRequestObject struct {
Params GetNotesParams
}
type GetNotesResponseObject ¶
type GetNotesResponseObject interface {
VisitGetNotesResponse(w http.ResponseWriter) error
}
type Note ¶
type Note struct { Body string `json:"body"` CreatedAt int64 `json:"created_at"` Id string `json:"id"` Title string `json:"title"` }
Note defines model for Note.
type NoteCreation ¶
type NoteCreation struct { Body string `json:"body"` CreatedAt int64 `json:"created_at"` Title string `json:"title"` }
NoteCreation defines model for NoteCreation.
type NoteListItem ¶
type NoteListItem struct { CreatedAt int64 `json:"created_at"` Id string `json:"id"` Title string `json:"title"` }
NoteListItem defines model for NoteListItem.
type ServerInterface ¶
type ServerInterface interface { // (POST /note) AddNote(ctx echo.Context) error // (PUT /note) UpdateNote(ctx echo.Context) error // (DELETE /note/{id}) DeleteNote(ctx echo.Context, id string) error // (GET /note/{id}) GetNote(ctx echo.Context, id string) error // (GET /notes) GetNotes(ctx echo.Context, params GetNotesParams) error }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) AddNote ¶
func (w *ServerInterfaceWrapper) AddNote(ctx echo.Context) error
AddNote converts echo context to params.
func (*ServerInterfaceWrapper) DeleteNote ¶
func (w *ServerInterfaceWrapper) DeleteNote(ctx echo.Context) error
DeleteNote converts echo context to params.
func (*ServerInterfaceWrapper) GetNote ¶
func (w *ServerInterfaceWrapper) GetNote(ctx echo.Context) error
GetNote converts echo context to params.
func (*ServerInterfaceWrapper) GetNotes ¶
func (w *ServerInterfaceWrapper) GetNotes(ctx echo.Context) error
GetNotes converts echo context to params.
func (*ServerInterfaceWrapper) UpdateNote ¶
func (w *ServerInterfaceWrapper) UpdateNote(ctx echo.Context) error
UpdateNote converts echo context to params.
type StrictHandlerFunc ¶
type StrictHandlerFunc func(ctx echo.Context, args interface{}) (interface{}, error)
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // (POST /note) AddNote(ctx context.Context, request AddNoteRequestObject) (AddNoteResponseObject, error) // (PUT /note) UpdateNote(ctx context.Context, request UpdateNoteRequestObject) (UpdateNoteResponseObject, error) // (DELETE /note/{id}) DeleteNote(ctx context.Context, request DeleteNoteRequestObject) (DeleteNoteResponseObject, error) // (GET /note/{id}) GetNote(ctx context.Context, request GetNoteRequestObject) (GetNoteResponseObject, error) // (GET /notes) GetNotes(ctx context.Context, request GetNotesRequestObject) (GetNotesResponseObject, error) }
StrictServerInterface represents all server handlers.
type UpdateNote204Response ¶
type UpdateNote204Response struct { }
func (UpdateNote204Response) VisitUpdateNoteResponse ¶
func (response UpdateNote204Response) VisitUpdateNoteResponse(w http.ResponseWriter) error
type UpdateNote4XXJSONResponse ¶
type UpdateNote4XXJSONResponse struct { Body ErrorMessage StatusCode int }
func (UpdateNote4XXJSONResponse) VisitUpdateNoteResponse ¶
func (response UpdateNote4XXJSONResponse) VisitUpdateNoteResponse(w http.ResponseWriter) error
type UpdateNoteJSONRequestBody ¶
type UpdateNoteJSONRequestBody = Note
UpdateNoteJSONRequestBody defines body for UpdateNote for application/json ContentType.
type UpdateNoteRequestObject ¶
type UpdateNoteRequestObject struct {
Body *UpdateNoteJSONRequestBody
}
type UpdateNoteResponseObject ¶
type UpdateNoteResponseObject interface {
VisitUpdateNoteResponse(w http.ResponseWriter) error
}