Documentation
¶
Overview ¶
Package petstoretest provides primitives to interact with the openapi HTTP API.
Code generated by github.com/willabides/oapitesthandler version (devel) DO NOT EDIT.
Package petstoretest provides primitives to interact with the openapi HTTP API.
Code generated by github.com/willabides/oapitesthandler version (devel) DO NOT EDIT.
Index ¶
- Constants
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- type AddPet201ApplicationxmlResponse
- type AddPet201JSONResponse
- type AddPet400Response
- type AddPet422Response
- type AddPetExpectation
- type AddPetFormdataRequestBody
- type AddPetJSONRequestBody
- type AddPetRequestObject
- type AddPetResponseObject
- type AddPetdefaultResponse
- type ApiResponse
- type BasePhoto
- type Category
- type CreateUser200ApplicationxmlResponse
- type CreateUser200JSONResponse
- type CreateUserExpectation
- type CreateUserFormdataRequestBody
- type CreateUserJSONRequestBody
- type CreateUserRequestObject
- type CreateUserResponseObject
- type CreateUserdefaultResponse
- type CreateUsersWithListInput200ApplicationxmlResponse
- type CreateUsersWithListInput200JSONResponse
- type CreateUsersWithListInputExpectation
- type CreateUsersWithListInputJSONBody
- type CreateUsersWithListInputJSONRequestBody
- type CreateUsersWithListInputRequestObject
- type CreateUsersWithListInputResponseObject
- type CreateUsersWithListInputdefaultResponse
- type DeleteOrder200Response
- type DeleteOrder400Response
- type DeleteOrder404Response
- type DeleteOrderExpectation
- type DeleteOrderRequestObject
- type DeleteOrderResponseObject
- type DeleteOrderdefaultResponse
- type DeletePet200JSONResponse
- type DeletePet204Response
- type DeletePet400JSONResponse
- type DeletePet404JSONResponse
- type DeletePetExpectation
- func (b *DeletePetExpectation) Handle(fn func(DeletePetRequestObject, http.ResponseWriter))
- func (b *DeletePetExpectation) Respond204()
- func (b *DeletePetExpectation) RespondJSON200(resp DeletePet200JSONResponse)
- func (b *DeletePetExpectation) RespondJSON400(resp DeletePet400JSONResponse)
- func (b *DeletePetExpectation) RespondJSON404(resp DeletePet404JSONResponse)
- type DeletePetParams
- type DeletePetRequestObject
- type DeletePetResponseObject
- type DeletePetdefaultResponse
- type DeleteUser200Response
- type DeleteUser400Response
- type DeleteUser404Response
- type DeleteUserExpectation
- type DeleteUserRequestObject
- type DeleteUserResponseObject
- type DeleteUserdefaultResponse
- type Error
- type ErrorApplicationxmlResponse
- type ErrorJSONResponse
- type ExpectOption
- type FindPetsByStatus200ApplicationxmlResponse
- type FindPetsByStatus200JSONResponse
- type FindPetsByStatus400Response
- type FindPetsByStatusExpectation
- type FindPetsByStatusParams
- type FindPetsByStatusParamsStatus
- type FindPetsByStatusRequestObject
- type FindPetsByStatusResponseObject
- type FindPetsByStatusdefaultResponse
- type FindPetsByTags200ApplicationxmlResponse
- type FindPetsByTags200JSONResponse
- type FindPetsByTags400Response
- type FindPetsByTagsExpectation
- type FindPetsByTagsParams
- type FindPetsByTagsRequestObject
- type FindPetsByTagsResponseObject
- type FindPetsByTagsdefaultResponse
- type GetOrderById200ApplicationxmlResponse
- type GetOrderById200JSONResponse
- type GetOrderById400Response
- type GetOrderById404Response
- type GetOrderByIdExpectation
- type GetOrderByIdRequestObject
- type GetOrderByIdResponseObject
- type GetOrderByIddefaultResponse
- type GetPetById200ApplicationVndPetstorePlusJSONResponse
- type GetPetById200ApplicationxmlResponse
- type GetPetById200JSONResponse
- type GetPetById400ApplicationxmlResponse
- type GetPetById400JSONResponse
- type GetPetById404ApplicationxmlResponse
- type GetPetById404JSONResponse
- type GetPetByIdExpectation
- func (b *GetPetByIdExpectation) Handle(fn func(GetPetByIdRequestObject, http.ResponseWriter))
- func (b *GetPetByIdExpectation) RespondApplicationVndPetstorePlusJSON200(resp modelspkg.Pet)
- func (b *GetPetByIdExpectation) RespondJSON200(resp modelspkg.Pet)
- func (b *GetPetByIdExpectation) RespondJSON400(resp GetPetById400JSONResponse)
- func (b *GetPetByIdExpectation) RespondJSON404(resp modelspkg.Error)
- type GetPetByIdRequestObject
- type GetPetByIdResponseObject
- type GetPetByIddefaultResponse
- type GetPetMetadata200JSONResponse
- type GetPetMetadata204Response
- type GetPetMetadata404ApplicationxmlResponse
- type GetPetMetadata404JSONResponse
- type GetPetMetadataExpectation
- func (b *GetPetMetadataExpectation) Handle(fn func(GetPetMetadataRequestObject, http.ResponseWriter))
- func (b *GetPetMetadataExpectation) Respond204()
- func (b *GetPetMetadataExpectation) RespondJSON200(resp map[string]string)
- func (b *GetPetMetadataExpectation) RespondJSON404(resp GetPetMetadata404JSONResponse)
- type GetPetMetadataParams
- type GetPetMetadataRequestObject
- type GetPetMetadataResponseObject
- type GetPetMetadatadefaultResponse
- type GetPetPhotoById200JSONResponse
- type GetPetPhotoById404ApplicationxmlResponse
- type GetPetPhotoById404JSONResponse
- type GetPetPhotoByIdExpectation
- type GetPetPhotoByIdRequestObject
- type GetPetPhotoByIdResponseObject
- type GetPetPhotoByIddefaultResponse
- type GetPetRegistration200JSONResponse
- type GetPetRegistration404JSONResponse
- type GetPetRegistrationExpectation
- type GetPetRegistrationRequestObject
- type GetPetRegistrationResponseObject
- type GetStoreInventory200JSONResponse
- type GetStoreInventoryExpectation
- type GetStoreInventoryRequestObject
- type GetStoreInventoryResponseObject
- type GetStoreInventorydefaultResponse
- type GetUserByName200ApplicationxmlResponse
- type GetUserByName200JSONResponse
- type GetUserByName400Response
- type GetUserByName404Response
- type GetUserByNameExpectation
- type GetUserByNameRequestObject
- type GetUserByNameResponseObject
- type GetUserByNamedefaultResponse
- type InvalidParamFormatError
- type LoginUser200ApplicationxmlResponse
- type LoginUser200JSONResponse
- type LoginUser200ResponseHeaders
- type LoginUser400Response
- type LoginUserExpectation
- type LoginUserParams
- type LoginUserRequestObject
- type LoginUserResponseObject
- type LoginUserdefaultResponse
- type LogoutUser200Response
- type LogoutUserExpectation
- type LogoutUserRequestObject
- type LogoutUserResponseObject
- type LogoutUserdefaultResponse
- type MiddlewareFunc
- type Order
- type OrderStatus
- type Pet
- type PetPhoto
- type PetStatus
- type PetWithCustomTypes
- type PostStoreOrder200JSONResponse
- type PostStoreOrder400Response
- type PostStoreOrder422Response
- type PostStoreOrderExpectation
- type PostStoreOrderFormdataRequestBody
- type PostStoreOrderJSONRequestBody
- type PostStoreOrderRequestObject
- type PostStoreOrderResponseObject
- type PostStoreOrderdefaultResponse
- type RequiredHeaderError
- type RequiredParamError
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) AddPet(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteOrder(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeletePet(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FindPetsByStatus(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FindPetsByTags(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetOrderById(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPetById(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPetMetadata(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPetPhotoById(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPetRegistration(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetStoreInventory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUserByName(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) LoginUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) LogoutUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostStoreOrder(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdatePet(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdatePetWithForm(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UploadFile(w http.ResponseWriter, r *http.Request)
- type StdHTTPServerOptions
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TB
- type Tag
- type TestHandler
- func (s *TestHandler) ExpectAddPet(body AddPetJSONRequestBody, opts ...ExpectOption) *AddPetExpectation
- func (s *TestHandler) ExpectAddPetWithBody(contentType string, body []byte, opts ...ExpectOption) *AddPetExpectation
- func (s *TestHandler) ExpectAddPetWithFormdataBody(body AddPetFormdataRequestBody, opts ...ExpectOption) *AddPetExpectation
- func (s *TestHandler) ExpectCreateUser(body CreateUserJSONRequestBody, opts ...ExpectOption) *CreateUserExpectation
- func (s *TestHandler) ExpectCreateUserWithBody(contentType string, body []byte, opts ...ExpectOption) *CreateUserExpectation
- func (s *TestHandler) ExpectCreateUserWithFormdataBody(body CreateUserFormdataRequestBody, opts ...ExpectOption) *CreateUserExpectation
- func (s *TestHandler) ExpectCreateUsersWithListInput(body CreateUsersWithListInputJSONRequestBody, opts ...ExpectOption) *CreateUsersWithListInputExpectation
- func (s *TestHandler) ExpectDeleteOrder(orderId int64, opts ...ExpectOption) *DeleteOrderExpectation
- func (s *TestHandler) ExpectDeletePet(petId int64, queryParams *DeletePetParams, opts ...ExpectOption) *DeletePetExpectation
- func (s *TestHandler) ExpectDeleteUser(username string, opts ...ExpectOption) *DeleteUserExpectation
- func (s *TestHandler) ExpectFindPetsByStatus(queryParams *FindPetsByStatusParams, opts ...ExpectOption) *FindPetsByStatusExpectation
- func (s *TestHandler) ExpectFindPetsByTags(queryParams *FindPetsByTagsParams, opts ...ExpectOption) *FindPetsByTagsExpectation
- func (s *TestHandler) ExpectGetOrderById(orderId int64, opts ...ExpectOption) *GetOrderByIdExpectation
- func (s *TestHandler) ExpectGetPetById(petId int64, opts ...ExpectOption) *GetPetByIdExpectation
- func (s *TestHandler) ExpectGetPetMetadata(petId int64, queryParams *GetPetMetadataParams, opts ...ExpectOption) *GetPetMetadataExpectation
- func (s *TestHandler) ExpectGetPetPhotoById(petId int64, photoId int64, opts ...ExpectOption) *GetPetPhotoByIdExpectation
- func (s *TestHandler) ExpectGetPetRegistration(petId int64, opts ...ExpectOption) *GetPetRegistrationExpectation
- func (s *TestHandler) ExpectGetStoreInventory(opts ...ExpectOption) *GetStoreInventoryExpectation
- func (s *TestHandler) ExpectGetUserByName(username string, opts ...ExpectOption) *GetUserByNameExpectation
- func (s *TestHandler) ExpectLoginUser(queryParams *LoginUserParams, opts ...ExpectOption) *LoginUserExpectation
- func (s *TestHandler) ExpectLogoutUser(opts ...ExpectOption) *LogoutUserExpectation
- func (s *TestHandler) ExpectPostStoreOrder(body PostStoreOrderJSONRequestBody, opts ...ExpectOption) *PostStoreOrderExpectation
- func (s *TestHandler) ExpectPostStoreOrderWithBody(contentType string, body []byte, opts ...ExpectOption) *PostStoreOrderExpectation
- func (s *TestHandler) ExpectPostStoreOrderWithFormdataBody(body PostStoreOrderFormdataRequestBody, opts ...ExpectOption) *PostStoreOrderExpectation
- func (s *TestHandler) ExpectUpdatePet(body UpdatePetJSONRequestBody, opts ...ExpectOption) *UpdatePetExpectation
- func (s *TestHandler) ExpectUpdatePetWithBody(contentType string, body []byte, opts ...ExpectOption) *UpdatePetExpectation
- func (s *TestHandler) ExpectUpdatePetWithForm(petId int64, queryParams *UpdatePetWithFormParams, opts ...ExpectOption) *UpdatePetWithFormExpectation
- func (s *TestHandler) ExpectUpdatePetWithFormdataBody(body UpdatePetFormdataRequestBody, opts ...ExpectOption) *UpdatePetExpectation
- func (s *TestHandler) ExpectUpdateUser(username string, body UpdateUserJSONRequestBody, opts ...ExpectOption) *UpdateUserExpectation
- func (s *TestHandler) ExpectUpdateUserWithBody(username string, contentType string, body []byte, opts ...ExpectOption) *UpdateUserExpectation
- func (s *TestHandler) ExpectUpdateUserWithFormdataBody(username string, body UpdateUserFormdataRequestBody, opts ...ExpectOption) *UpdateUserExpectation
- func (s *TestHandler) ExpectUploadFileWithBody(petId int64, contentType string, body []byte, opts ...ExpectOption) *UploadFileExpectation
- func (s *TestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type Timestamp
- type TooManyValuesForParamError
- type UUID
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type UpdatePet200ApplicationxmlResponse
- type UpdatePet200JSONResponse
- type UpdatePet400ApplicationxmlResponse
- type UpdatePet400JSONResponse
- type UpdatePet404ApplicationxmlResponse
- type UpdatePet404JSONResponse
- type UpdatePet422ApplicationxmlResponse
- type UpdatePet422JSONResponse
- type UpdatePetExpectation
- func (b *UpdatePetExpectation) Handle(fn func(UpdatePetRequestObject, http.ResponseWriter))
- func (b *UpdatePetExpectation) RespondJSON200(resp modelspkg.Pet)
- func (b *UpdatePetExpectation) RespondJSON400(resp UpdatePet400JSONResponse)
- func (b *UpdatePetExpectation) RespondJSON404(resp modelspkg.Error)
- func (b *UpdatePetExpectation) RespondJSON422(resp modelspkg.Error)
- type UpdatePetFormdataRequestBody
- type UpdatePetJSONRequestBody
- type UpdatePetRequestObject
- type UpdatePetResponseObject
- type UpdatePetWithForm200ApplicationxmlResponse
- type UpdatePetWithForm200JSONResponse
- type UpdatePetWithForm400Response
- type UpdatePetWithFormExpectation
- type UpdatePetWithFormParams
- type UpdatePetWithFormRequestObject
- type UpdatePetWithFormResponseObject
- type UpdatePetWithFormdefaultResponse
- type UpdatePetdefaultResponse
- type UpdateUser200Response
- type UpdateUser400Response
- type UpdateUser404Response
- type UpdateUserExpectation
- type UpdateUserFormdataRequestBody
- type UpdateUserJSONRequestBody
- type UpdateUserRequestObject
- type UpdateUserResponseObject
- type UpdateUserdefaultResponse
- type UploadFile200JSONResponse
- type UploadFile400Response
- type UploadFile404Response
- type UploadFileExpectation
- type UploadFileParams
- type UploadFileRequestObject
- type UploadFileResponseObject
- type UploadFiledefaultResponse
Constants ¶
const ( Api_keyScopes = modelspkg.Api_keyScopes Petstore_authScopes = modelspkg.Petstore_authScopes )
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, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type AddPet201ApplicationxmlResponse ¶
func (AddPet201ApplicationxmlResponse) VisitAddPetResponse ¶
func (response AddPet201ApplicationxmlResponse) VisitAddPetResponse(w http.ResponseWriter) error
type AddPet201JSONResponse ¶
type AddPet201JSONResponse Pet
func (AddPet201JSONResponse) VisitAddPetResponse ¶
func (response AddPet201JSONResponse) VisitAddPetResponse(w http.ResponseWriter) error
type AddPet400Response ¶
type AddPet400Response struct {
}
func (AddPet400Response) VisitAddPetResponse ¶
func (response AddPet400Response) VisitAddPetResponse(w http.ResponseWriter) error
type AddPet422Response ¶
type AddPet422Response struct {
}
func (AddPet422Response) VisitAddPetResponse ¶
func (response AddPet422Response) VisitAddPetResponse(w http.ResponseWriter) error
type AddPetExpectation ¶ added in v0.2.0
type AddPetExpectation struct {
// contains filtered or unexported fields
}
func (*AddPetExpectation) Handle ¶ added in v0.3.0
func (b *AddPetExpectation) Handle(fn func(AddPetRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*AddPetExpectation) Respond400 ¶ added in v0.2.0
func (b *AddPetExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*AddPetExpectation) Respond422 ¶ added in v0.2.0
func (b *AddPetExpectation) Respond422()
Respond422 sets the expectation to return a 422 response.
func (*AddPetExpectation) RespondJSON201 ¶ added in v0.2.0
func (b *AddPetExpectation) RespondJSON201(resp modelspkg.Pet)
RespondJSON201 sets the expectation to return a 201 response with JSON content.
type AddPetFormdataRequestBody ¶
type AddPetFormdataRequestBody = Pet
AddPetFormdataRequestBody defines body for AddPet for application/x-www-form-urlencoded ContentType.
type AddPetJSONRequestBody ¶
type AddPetJSONRequestBody = Pet
AddPetJSONRequestBody defines body for AddPet for application/json ContentType.
type AddPetRequestObject ¶
type AddPetRequestObject struct {
JSONBody *AddPetJSONRequestBody
FormdataBody *AddPetFormdataRequestBody
Body io.Reader
}
type AddPetResponseObject ¶
type AddPetResponseObject interface {
VisitAddPetResponse(w http.ResponseWriter) error
}
type AddPetdefaultResponse ¶
type AddPetdefaultResponse struct {
StatusCode int
}
func (AddPetdefaultResponse) VisitAddPetResponse ¶
func (response AddPetdefaultResponse) VisitAddPetResponse(w http.ResponseWriter) error
type ApiResponse ¶
type ApiResponse = modelspkg.ApiResponse
type CreateUser200ApplicationxmlResponse ¶
func (CreateUser200ApplicationxmlResponse) VisitCreateUserResponse ¶
func (response CreateUser200ApplicationxmlResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUser200JSONResponse ¶
type CreateUser200JSONResponse externalRef0.User
func (CreateUser200JSONResponse) VisitCreateUserResponse ¶
func (response CreateUser200JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUserExpectation ¶ added in v0.2.0
type CreateUserExpectation struct {
// contains filtered or unexported fields
}
func (*CreateUserExpectation) Handle ¶ added in v0.3.0
func (b *CreateUserExpectation) Handle(fn func(CreateUserRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*CreateUserExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *CreateUserExpectation) RespondJSON200(resp externalRef0.User)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type CreateUserFormdataRequestBody ¶
type CreateUserFormdataRequestBody = externalRef0.User
CreateUserFormdataRequestBody defines body for CreateUser for application/x-www-form-urlencoded ContentType.
type CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody = externalRef0.User
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserRequestObject ¶
type CreateUserRequestObject struct {
JSONBody *CreateUserJSONRequestBody
FormdataBody *CreateUserFormdataRequestBody
Body io.Reader
}
type CreateUserResponseObject ¶
type CreateUserResponseObject interface {
VisitCreateUserResponse(w http.ResponseWriter) error
}
type CreateUserdefaultResponse ¶
type CreateUserdefaultResponse struct {
StatusCode int
}
func (CreateUserdefaultResponse) VisitCreateUserResponse ¶
func (response CreateUserdefaultResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUsersWithListInput200ApplicationxmlResponse ¶
type CreateUsersWithListInput200ApplicationxmlResponse struct {
Body io.Reader
ContentLength int64
}
func (CreateUsersWithListInput200ApplicationxmlResponse) VisitCreateUsersWithListInputResponse ¶
func (response CreateUsersWithListInput200ApplicationxmlResponse) VisitCreateUsersWithListInputResponse(w http.ResponseWriter) error
type CreateUsersWithListInput200JSONResponse ¶
type CreateUsersWithListInput200JSONResponse externalRef0.User
func (CreateUsersWithListInput200JSONResponse) VisitCreateUsersWithListInputResponse ¶
func (response CreateUsersWithListInput200JSONResponse) VisitCreateUsersWithListInputResponse(w http.ResponseWriter) error
type CreateUsersWithListInputExpectation ¶ added in v0.2.0
type CreateUsersWithListInputExpectation struct {
// contains filtered or unexported fields
}
func (*CreateUsersWithListInputExpectation) Handle ¶ added in v0.3.0
func (b *CreateUsersWithListInputExpectation) Handle(fn func(CreateUsersWithListInputRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*CreateUsersWithListInputExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *CreateUsersWithListInputExpectation) RespondJSON200(resp externalRef0.User)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type CreateUsersWithListInputJSONBody ¶
type CreateUsersWithListInputJSONBody = modelspkg.CreateUsersWithListInputJSONBody
type CreateUsersWithListInputJSONRequestBody ¶
type CreateUsersWithListInputJSONRequestBody = CreateUsersWithListInputJSONBody
CreateUsersWithListInputJSONRequestBody defines body for CreateUsersWithListInput for application/json ContentType.
type CreateUsersWithListInputRequestObject ¶
type CreateUsersWithListInputRequestObject struct {
Body *CreateUsersWithListInputJSONRequestBody
}
type CreateUsersWithListInputResponseObject ¶
type CreateUsersWithListInputResponseObject interface {
VisitCreateUsersWithListInputResponse(w http.ResponseWriter) error
}
type CreateUsersWithListInputdefaultResponse ¶
type CreateUsersWithListInputdefaultResponse struct {
StatusCode int
}
func (CreateUsersWithListInputdefaultResponse) VisitCreateUsersWithListInputResponse ¶
func (response CreateUsersWithListInputdefaultResponse) VisitCreateUsersWithListInputResponse(w http.ResponseWriter) error
type DeleteOrder200Response ¶
type DeleteOrder200Response struct {
}
func (DeleteOrder200Response) VisitDeleteOrderResponse ¶
func (response DeleteOrder200Response) VisitDeleteOrderResponse(w http.ResponseWriter) error
type DeleteOrder400Response ¶
type DeleteOrder400Response struct {
}
func (DeleteOrder400Response) VisitDeleteOrderResponse ¶
func (response DeleteOrder400Response) VisitDeleteOrderResponse(w http.ResponseWriter) error
type DeleteOrder404Response ¶
type DeleteOrder404Response struct {
}
func (DeleteOrder404Response) VisitDeleteOrderResponse ¶
func (response DeleteOrder404Response) VisitDeleteOrderResponse(w http.ResponseWriter) error
type DeleteOrderExpectation ¶ added in v0.2.0
type DeleteOrderExpectation struct {
// contains filtered or unexported fields
}
func (*DeleteOrderExpectation) Handle ¶ added in v0.3.0
func (b *DeleteOrderExpectation) Handle(fn func(DeleteOrderRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*DeleteOrderExpectation) Respond200 ¶ added in v0.2.0
func (b *DeleteOrderExpectation) Respond200()
Respond200 sets the expectation to return a 200 response.
func (*DeleteOrderExpectation) Respond400 ¶ added in v0.2.0
func (b *DeleteOrderExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*DeleteOrderExpectation) Respond404 ¶ added in v0.2.0
func (b *DeleteOrderExpectation) Respond404()
Respond404 sets the expectation to return a 404 response.
type DeleteOrderRequestObject ¶
type DeleteOrderRequestObject struct {
OrderId int64 `json:"orderId"`
}
type DeleteOrderResponseObject ¶
type DeleteOrderResponseObject interface {
VisitDeleteOrderResponse(w http.ResponseWriter) error
}
type DeleteOrderdefaultResponse ¶
type DeleteOrderdefaultResponse struct {
StatusCode int
}
func (DeleteOrderdefaultResponse) VisitDeleteOrderResponse ¶
func (response DeleteOrderdefaultResponse) VisitDeleteOrderResponse(w http.ResponseWriter) error
type DeletePet200JSONResponse ¶
type DeletePet200JSONResponse struct {
Message *string `json:"message,omitempty"`
}
func (DeletePet200JSONResponse) VisitDeletePetResponse ¶
func (response DeletePet200JSONResponse) VisitDeletePetResponse(w http.ResponseWriter) error
type DeletePet204Response ¶
type DeletePet204Response struct {
}
func (DeletePet204Response) VisitDeletePetResponse ¶
func (response DeletePet204Response) VisitDeletePetResponse(w http.ResponseWriter) error
type DeletePet400JSONResponse ¶
type DeletePet400JSONResponse struct {
Error *string `json:"error,omitempty"`
}
func (DeletePet400JSONResponse) VisitDeletePetResponse ¶
func (response DeletePet400JSONResponse) VisitDeletePetResponse(w http.ResponseWriter) error
type DeletePet404JSONResponse ¶
type DeletePet404JSONResponse struct {
Error *string `json:"error,omitempty"`
}
func (DeletePet404JSONResponse) VisitDeletePetResponse ¶
func (response DeletePet404JSONResponse) VisitDeletePetResponse(w http.ResponseWriter) error
type DeletePetExpectation ¶ added in v0.2.0
type DeletePetExpectation struct {
// contains filtered or unexported fields
}
func (*DeletePetExpectation) Handle ¶ added in v0.3.0
func (b *DeletePetExpectation) Handle(fn func(DeletePetRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*DeletePetExpectation) Respond204 ¶ added in v0.2.0
func (b *DeletePetExpectation) Respond204()
Respond204 sets the expectation to return a 204 response.
func (*DeletePetExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *DeletePetExpectation) RespondJSON200(resp DeletePet200JSONResponse)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
func (*DeletePetExpectation) RespondJSON400 ¶ added in v0.2.0
func (b *DeletePetExpectation) RespondJSON400(resp DeletePet400JSONResponse)
RespondJSON400 sets the expectation to return a 400 response with JSON content.
func (*DeletePetExpectation) RespondJSON404 ¶ added in v0.2.0
func (b *DeletePetExpectation) RespondJSON404(resp DeletePet404JSONResponse)
RespondJSON404 sets the expectation to return a 404 response with JSON content.
type DeletePetParams ¶
type DeletePetParams = modelspkg.DeletePetParams
type DeletePetRequestObject ¶
type DeletePetRequestObject struct {
PetId int64 `json:"petId"`
Params DeletePetParams
}
type DeletePetResponseObject ¶
type DeletePetResponseObject interface {
VisitDeletePetResponse(w http.ResponseWriter) error
}
type DeletePetdefaultResponse ¶
type DeletePetdefaultResponse struct {
StatusCode int
}
func (DeletePetdefaultResponse) VisitDeletePetResponse ¶
func (response DeletePetdefaultResponse) VisitDeletePetResponse(w http.ResponseWriter) error
type DeleteUser200Response ¶
type DeleteUser200Response struct {
}
func (DeleteUser200Response) VisitDeleteUserResponse ¶
func (response DeleteUser200Response) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUser400Response ¶
type DeleteUser400Response struct {
}
func (DeleteUser400Response) VisitDeleteUserResponse ¶
func (response DeleteUser400Response) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUser404Response ¶
type DeleteUser404Response struct {
}
func (DeleteUser404Response) VisitDeleteUserResponse ¶
func (response DeleteUser404Response) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUserExpectation ¶ added in v0.2.0
type DeleteUserExpectation struct {
// contains filtered or unexported fields
}
func (*DeleteUserExpectation) Handle ¶ added in v0.3.0
func (b *DeleteUserExpectation) Handle(fn func(DeleteUserRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*DeleteUserExpectation) Respond200 ¶ added in v0.2.0
func (b *DeleteUserExpectation) Respond200()
Respond200 sets the expectation to return a 200 response.
func (*DeleteUserExpectation) Respond400 ¶ added in v0.2.0
func (b *DeleteUserExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*DeleteUserExpectation) Respond404 ¶ added in v0.2.0
func (b *DeleteUserExpectation) Respond404()
Respond404 sets the expectation to return a 404 response.
type DeleteUserRequestObject ¶
type DeleteUserRequestObject struct {
Username string `json:"username"`
}
type DeleteUserResponseObject ¶
type DeleteUserResponseObject interface {
VisitDeleteUserResponse(w http.ResponseWriter) error
}
type DeleteUserdefaultResponse ¶
type DeleteUserdefaultResponse struct {
StatusCode int
}
func (DeleteUserdefaultResponse) VisitDeleteUserResponse ¶
func (response DeleteUserdefaultResponse) VisitDeleteUserResponse(w http.ResponseWriter) error
type ErrorJSONResponse ¶
type ErrorJSONResponse Error
type ExpectOption ¶
type ExpectOption func(*expectOpts)
func MinTimes ¶ added in v0.4.0
func MinTimes(n int) ExpectOption
MinTimes sets the minimum number of times the expectation should be met. When n is 0, the expectation acts as a stub and can be called any number of times. Panics if n is negative.
func Times ¶
func Times(n int) ExpectOption
Times sets the number of times the expectation should be met. Panics if n is negative.
type FindPetsByStatus200ApplicationxmlResponse ¶
func (FindPetsByStatus200ApplicationxmlResponse) VisitFindPetsByStatusResponse ¶
func (response FindPetsByStatus200ApplicationxmlResponse) VisitFindPetsByStatusResponse(w http.ResponseWriter) error
type FindPetsByStatus200JSONResponse ¶
type FindPetsByStatus200JSONResponse []Pet
func (FindPetsByStatus200JSONResponse) VisitFindPetsByStatusResponse ¶
func (response FindPetsByStatus200JSONResponse) VisitFindPetsByStatusResponse(w http.ResponseWriter) error
type FindPetsByStatus400Response ¶
type FindPetsByStatus400Response struct {
}
func (FindPetsByStatus400Response) VisitFindPetsByStatusResponse ¶
func (response FindPetsByStatus400Response) VisitFindPetsByStatusResponse(w http.ResponseWriter) error
type FindPetsByStatusExpectation ¶ added in v0.2.0
type FindPetsByStatusExpectation struct {
// contains filtered or unexported fields
}
func (*FindPetsByStatusExpectation) Handle ¶ added in v0.3.0
func (b *FindPetsByStatusExpectation) Handle(fn func(FindPetsByStatusRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*FindPetsByStatusExpectation) Respond400 ¶ added in v0.2.0
func (b *FindPetsByStatusExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*FindPetsByStatusExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *FindPetsByStatusExpectation) RespondJSON200(resp []modelspkg.Pet)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type FindPetsByStatusParams ¶
type FindPetsByStatusParams = modelspkg.FindPetsByStatusParams
type FindPetsByStatusParamsStatus ¶
type FindPetsByStatusParamsStatus = modelspkg.FindPetsByStatusParamsStatus
type FindPetsByStatusRequestObject ¶
type FindPetsByStatusRequestObject struct {
Params FindPetsByStatusParams
}
type FindPetsByStatusResponseObject ¶
type FindPetsByStatusResponseObject interface {
VisitFindPetsByStatusResponse(w http.ResponseWriter) error
}
type FindPetsByStatusdefaultResponse ¶
type FindPetsByStatusdefaultResponse struct {
StatusCode int
}
func (FindPetsByStatusdefaultResponse) VisitFindPetsByStatusResponse ¶
func (response FindPetsByStatusdefaultResponse) VisitFindPetsByStatusResponse(w http.ResponseWriter) error
type FindPetsByTags200ApplicationxmlResponse ¶
func (FindPetsByTags200ApplicationxmlResponse) VisitFindPetsByTagsResponse ¶
func (response FindPetsByTags200ApplicationxmlResponse) VisitFindPetsByTagsResponse(w http.ResponseWriter) error
type FindPetsByTags200JSONResponse ¶
type FindPetsByTags200JSONResponse []Pet
func (FindPetsByTags200JSONResponse) VisitFindPetsByTagsResponse ¶
func (response FindPetsByTags200JSONResponse) VisitFindPetsByTagsResponse(w http.ResponseWriter) error
type FindPetsByTags400Response ¶
type FindPetsByTags400Response struct {
}
func (FindPetsByTags400Response) VisitFindPetsByTagsResponse ¶
func (response FindPetsByTags400Response) VisitFindPetsByTagsResponse(w http.ResponseWriter) error
type FindPetsByTagsExpectation ¶ added in v0.2.0
type FindPetsByTagsExpectation struct {
// contains filtered or unexported fields
}
func (*FindPetsByTagsExpectation) Handle ¶ added in v0.3.0
func (b *FindPetsByTagsExpectation) Handle(fn func(FindPetsByTagsRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*FindPetsByTagsExpectation) Respond400 ¶ added in v0.2.0
func (b *FindPetsByTagsExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*FindPetsByTagsExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *FindPetsByTagsExpectation) RespondJSON200(resp []modelspkg.Pet)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type FindPetsByTagsParams ¶
type FindPetsByTagsParams = modelspkg.FindPetsByTagsParams
type FindPetsByTagsRequestObject ¶
type FindPetsByTagsRequestObject struct {
Params FindPetsByTagsParams
}
type FindPetsByTagsResponseObject ¶
type FindPetsByTagsResponseObject interface {
VisitFindPetsByTagsResponse(w http.ResponseWriter) error
}
type FindPetsByTagsdefaultResponse ¶
type FindPetsByTagsdefaultResponse struct {
StatusCode int
}
func (FindPetsByTagsdefaultResponse) VisitFindPetsByTagsResponse ¶
func (response FindPetsByTagsdefaultResponse) VisitFindPetsByTagsResponse(w http.ResponseWriter) error
type GetOrderById200ApplicationxmlResponse ¶
func (GetOrderById200ApplicationxmlResponse) VisitGetOrderByIdResponse ¶
func (response GetOrderById200ApplicationxmlResponse) VisitGetOrderByIdResponse(w http.ResponseWriter) error
type GetOrderById200JSONResponse ¶
type GetOrderById200JSONResponse Order
func (GetOrderById200JSONResponse) VisitGetOrderByIdResponse ¶
func (response GetOrderById200JSONResponse) VisitGetOrderByIdResponse(w http.ResponseWriter) error
type GetOrderById400Response ¶
type GetOrderById400Response struct {
}
func (GetOrderById400Response) VisitGetOrderByIdResponse ¶
func (response GetOrderById400Response) VisitGetOrderByIdResponse(w http.ResponseWriter) error
type GetOrderById404Response ¶
type GetOrderById404Response struct {
}
func (GetOrderById404Response) VisitGetOrderByIdResponse ¶
func (response GetOrderById404Response) VisitGetOrderByIdResponse(w http.ResponseWriter) error
type GetOrderByIdExpectation ¶ added in v0.2.0
type GetOrderByIdExpectation struct {
// contains filtered or unexported fields
}
func (*GetOrderByIdExpectation) Handle ¶ added in v0.3.0
func (b *GetOrderByIdExpectation) Handle(fn func(GetOrderByIdRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*GetOrderByIdExpectation) Respond400 ¶ added in v0.2.0
func (b *GetOrderByIdExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*GetOrderByIdExpectation) Respond404 ¶ added in v0.2.0
func (b *GetOrderByIdExpectation) Respond404()
Respond404 sets the expectation to return a 404 response.
func (*GetOrderByIdExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *GetOrderByIdExpectation) RespondJSON200(resp modelspkg.Order)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type GetOrderByIdRequestObject ¶
type GetOrderByIdRequestObject struct {
OrderId int64 `json:"orderId"`
}
type GetOrderByIdResponseObject ¶
type GetOrderByIdResponseObject interface {
VisitGetOrderByIdResponse(w http.ResponseWriter) error
}
type GetOrderByIddefaultResponse ¶
type GetOrderByIddefaultResponse struct {
StatusCode int
}
func (GetOrderByIddefaultResponse) VisitGetOrderByIdResponse ¶
func (response GetOrderByIddefaultResponse) VisitGetOrderByIdResponse(w http.ResponseWriter) error
type GetPetById200ApplicationVndPetstorePlusJSONResponse ¶
type GetPetById200ApplicationVndPetstorePlusJSONResponse Pet
func (GetPetById200ApplicationVndPetstorePlusJSONResponse) VisitGetPetByIdResponse ¶
func (response GetPetById200ApplicationVndPetstorePlusJSONResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetById200ApplicationxmlResponse ¶
func (GetPetById200ApplicationxmlResponse) VisitGetPetByIdResponse ¶
func (response GetPetById200ApplicationxmlResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetById200JSONResponse ¶
type GetPetById200JSONResponse Pet
func (GetPetById200JSONResponse) VisitGetPetByIdResponse ¶
func (response GetPetById200JSONResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetById400ApplicationxmlResponse ¶
type GetPetById400ApplicationxmlResponse struct{ ErrorApplicationxmlResponse }
func (GetPetById400ApplicationxmlResponse) VisitGetPetByIdResponse ¶
func (response GetPetById400ApplicationxmlResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetById400JSONResponse ¶
type GetPetById400JSONResponse struct{ ErrorJSONResponse }
func (GetPetById400JSONResponse) VisitGetPetByIdResponse ¶
func (response GetPetById400JSONResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetById404ApplicationxmlResponse ¶
func (GetPetById404ApplicationxmlResponse) VisitGetPetByIdResponse ¶
func (response GetPetById404ApplicationxmlResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetById404JSONResponse ¶
type GetPetById404JSONResponse Error
func (GetPetById404JSONResponse) VisitGetPetByIdResponse ¶
func (response GetPetById404JSONResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetByIdExpectation ¶ added in v0.2.0
type GetPetByIdExpectation struct {
// contains filtered or unexported fields
}
func (*GetPetByIdExpectation) Handle ¶ added in v0.3.0
func (b *GetPetByIdExpectation) Handle(fn func(GetPetByIdRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*GetPetByIdExpectation) RespondApplicationVndPetstorePlusJSON200 ¶ added in v0.2.0
func (b *GetPetByIdExpectation) RespondApplicationVndPetstorePlusJSON200(resp modelspkg.Pet)
RespondApplicationVndPetstorePlusJSON200 sets the expectation to return a 200 response with ApplicationVndPetstorePlusJSON content.
func (*GetPetByIdExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *GetPetByIdExpectation) RespondJSON200(resp modelspkg.Pet)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
func (*GetPetByIdExpectation) RespondJSON400 ¶ added in v0.2.0
func (b *GetPetByIdExpectation) RespondJSON400(resp GetPetById400JSONResponse)
RespondJSON400 sets the expectation to return a 400 response with JSON content.
func (*GetPetByIdExpectation) RespondJSON404 ¶ added in v0.2.0
func (b *GetPetByIdExpectation) RespondJSON404(resp modelspkg.Error)
RespondJSON404 sets the expectation to return a 404 response with JSON content.
type GetPetByIdRequestObject ¶
type GetPetByIdRequestObject struct {
PetId int64 `json:"petId"`
}
type GetPetByIdResponseObject ¶
type GetPetByIdResponseObject interface {
VisitGetPetByIdResponse(w http.ResponseWriter) error
}
type GetPetByIddefaultResponse ¶
type GetPetByIddefaultResponse struct {
StatusCode int
}
func (GetPetByIddefaultResponse) VisitGetPetByIdResponse ¶
func (response GetPetByIddefaultResponse) VisitGetPetByIdResponse(w http.ResponseWriter) error
type GetPetMetadata200JSONResponse ¶
func (GetPetMetadata200JSONResponse) VisitGetPetMetadataResponse ¶
func (response GetPetMetadata200JSONResponse) VisitGetPetMetadataResponse(w http.ResponseWriter) error
type GetPetMetadata204Response ¶
type GetPetMetadata204Response struct {
}
func (GetPetMetadata204Response) VisitGetPetMetadataResponse ¶
func (response GetPetMetadata204Response) VisitGetPetMetadataResponse(w http.ResponseWriter) error
type GetPetMetadata404ApplicationxmlResponse ¶
type GetPetMetadata404ApplicationxmlResponse struct{ ErrorApplicationxmlResponse }
func (GetPetMetadata404ApplicationxmlResponse) VisitGetPetMetadataResponse ¶
func (response GetPetMetadata404ApplicationxmlResponse) VisitGetPetMetadataResponse(w http.ResponseWriter) error
type GetPetMetadata404JSONResponse ¶
type GetPetMetadata404JSONResponse struct{ ErrorJSONResponse }
func (GetPetMetadata404JSONResponse) VisitGetPetMetadataResponse ¶
func (response GetPetMetadata404JSONResponse) VisitGetPetMetadataResponse(w http.ResponseWriter) error
type GetPetMetadataExpectation ¶ added in v0.2.0
type GetPetMetadataExpectation struct {
// contains filtered or unexported fields
}
func (*GetPetMetadataExpectation) Handle ¶ added in v0.3.0
func (b *GetPetMetadataExpectation) Handle(fn func(GetPetMetadataRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*GetPetMetadataExpectation) Respond204 ¶ added in v0.2.0
func (b *GetPetMetadataExpectation) Respond204()
Respond204 sets the expectation to return a 204 response.
func (*GetPetMetadataExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *GetPetMetadataExpectation) RespondJSON200(resp map[string]string)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
func (*GetPetMetadataExpectation) RespondJSON404 ¶ added in v0.2.0
func (b *GetPetMetadataExpectation) RespondJSON404(resp GetPetMetadata404JSONResponse)
RespondJSON404 sets the expectation to return a 404 response with JSON content.
type GetPetMetadataParams ¶
type GetPetMetadataParams = modelspkg.GetPetMetadataParams
type GetPetMetadataRequestObject ¶
type GetPetMetadataRequestObject struct {
PetId int64 `json:"petId"`
Params GetPetMetadataParams
}
type GetPetMetadataResponseObject ¶
type GetPetMetadataResponseObject interface {
VisitGetPetMetadataResponse(w http.ResponseWriter) error
}
type GetPetMetadatadefaultResponse ¶
type GetPetMetadatadefaultResponse struct {
StatusCode int
}
func (GetPetMetadatadefaultResponse) VisitGetPetMetadataResponse ¶
func (response GetPetMetadatadefaultResponse) VisitGetPetMetadataResponse(w http.ResponseWriter) error
type GetPetPhotoById200JSONResponse ¶
type GetPetPhotoById200JSONResponse PetPhoto
func (GetPetPhotoById200JSONResponse) VisitGetPetPhotoByIdResponse ¶
func (response GetPetPhotoById200JSONResponse) VisitGetPetPhotoByIdResponse(w http.ResponseWriter) error
type GetPetPhotoById404ApplicationxmlResponse ¶
type GetPetPhotoById404ApplicationxmlResponse struct{ ErrorApplicationxmlResponse }
func (GetPetPhotoById404ApplicationxmlResponse) VisitGetPetPhotoByIdResponse ¶
func (response GetPetPhotoById404ApplicationxmlResponse) VisitGetPetPhotoByIdResponse(w http.ResponseWriter) error
type GetPetPhotoById404JSONResponse ¶
type GetPetPhotoById404JSONResponse struct{ ErrorJSONResponse }
func (GetPetPhotoById404JSONResponse) VisitGetPetPhotoByIdResponse ¶
func (response GetPetPhotoById404JSONResponse) VisitGetPetPhotoByIdResponse(w http.ResponseWriter) error
type GetPetPhotoByIdExpectation ¶ added in v0.2.0
type GetPetPhotoByIdExpectation struct {
// contains filtered or unexported fields
}
func (*GetPetPhotoByIdExpectation) Handle ¶ added in v0.3.0
func (b *GetPetPhotoByIdExpectation) Handle(fn func(GetPetPhotoByIdRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*GetPetPhotoByIdExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *GetPetPhotoByIdExpectation) RespondJSON200(resp modelspkg.PetPhoto)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
func (*GetPetPhotoByIdExpectation) RespondJSON404 ¶ added in v0.2.0
func (b *GetPetPhotoByIdExpectation) RespondJSON404(resp GetPetPhotoById404JSONResponse)
RespondJSON404 sets the expectation to return a 404 response with JSON content.
type GetPetPhotoByIdResponseObject ¶
type GetPetPhotoByIdResponseObject interface {
VisitGetPetPhotoByIdResponse(w http.ResponseWriter) error
}
type GetPetPhotoByIddefaultResponse ¶
type GetPetPhotoByIddefaultResponse struct {
StatusCode int
}
func (GetPetPhotoByIddefaultResponse) VisitGetPetPhotoByIdResponse ¶
func (response GetPetPhotoByIddefaultResponse) VisitGetPetPhotoByIdResponse(w http.ResponseWriter) error
type GetPetRegistration200JSONResponse ¶
type GetPetRegistration200JSONResponse PetWithCustomTypes
func (GetPetRegistration200JSONResponse) VisitGetPetRegistrationResponse ¶
func (response GetPetRegistration200JSONResponse) VisitGetPetRegistrationResponse(w http.ResponseWriter) error
type GetPetRegistration404JSONResponse ¶
type GetPetRegistration404JSONResponse Error
func (GetPetRegistration404JSONResponse) VisitGetPetRegistrationResponse ¶
func (response GetPetRegistration404JSONResponse) VisitGetPetRegistrationResponse(w http.ResponseWriter) error
type GetPetRegistrationExpectation ¶ added in v0.2.0
type GetPetRegistrationExpectation struct {
// contains filtered or unexported fields
}
func (*GetPetRegistrationExpectation) Handle ¶ added in v0.3.0
func (b *GetPetRegistrationExpectation) Handle(fn func(GetPetRegistrationRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*GetPetRegistrationExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *GetPetRegistrationExpectation) RespondJSON200(resp modelspkg.PetWithCustomTypes)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
func (*GetPetRegistrationExpectation) RespondJSON404 ¶ added in v0.2.0
func (b *GetPetRegistrationExpectation) RespondJSON404(resp modelspkg.Error)
RespondJSON404 sets the expectation to return a 404 response with JSON content.
type GetPetRegistrationRequestObject ¶
type GetPetRegistrationRequestObject struct {
PetId int64 `json:"petId"`
}
type GetPetRegistrationResponseObject ¶
type GetPetRegistrationResponseObject interface {
VisitGetPetRegistrationResponse(w http.ResponseWriter) error
}
type GetStoreInventory200JSONResponse ¶
func (GetStoreInventory200JSONResponse) VisitGetStoreInventoryResponse ¶
func (response GetStoreInventory200JSONResponse) VisitGetStoreInventoryResponse(w http.ResponseWriter) error
type GetStoreInventoryExpectation ¶ added in v0.2.0
type GetStoreInventoryExpectation struct {
// contains filtered or unexported fields
}
func (*GetStoreInventoryExpectation) Handle ¶ added in v0.3.0
func (b *GetStoreInventoryExpectation) Handle(fn func(GetStoreInventoryRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*GetStoreInventoryExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *GetStoreInventoryExpectation) RespondJSON200(resp map[string]int32)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type GetStoreInventoryRequestObject ¶
type GetStoreInventoryRequestObject struct {
}
type GetStoreInventoryResponseObject ¶
type GetStoreInventoryResponseObject interface {
VisitGetStoreInventoryResponse(w http.ResponseWriter) error
}
type GetStoreInventorydefaultResponse ¶
type GetStoreInventorydefaultResponse struct {
StatusCode int
}
func (GetStoreInventorydefaultResponse) VisitGetStoreInventoryResponse ¶
func (response GetStoreInventorydefaultResponse) VisitGetStoreInventoryResponse(w http.ResponseWriter) error
type GetUserByName200ApplicationxmlResponse ¶
func (GetUserByName200ApplicationxmlResponse) VisitGetUserByNameResponse ¶
func (response GetUserByName200ApplicationxmlResponse) VisitGetUserByNameResponse(w http.ResponseWriter) error
type GetUserByName200JSONResponse ¶
type GetUserByName200JSONResponse externalRef0.User
func (GetUserByName200JSONResponse) VisitGetUserByNameResponse ¶
func (response GetUserByName200JSONResponse) VisitGetUserByNameResponse(w http.ResponseWriter) error
type GetUserByName400Response ¶
type GetUserByName400Response struct {
}
func (GetUserByName400Response) VisitGetUserByNameResponse ¶
func (response GetUserByName400Response) VisitGetUserByNameResponse(w http.ResponseWriter) error
type GetUserByName404Response ¶
type GetUserByName404Response struct {
}
func (GetUserByName404Response) VisitGetUserByNameResponse ¶
func (response GetUserByName404Response) VisitGetUserByNameResponse(w http.ResponseWriter) error
type GetUserByNameExpectation ¶ added in v0.2.0
type GetUserByNameExpectation struct {
// contains filtered or unexported fields
}
func (*GetUserByNameExpectation) Handle ¶ added in v0.3.0
func (b *GetUserByNameExpectation) Handle(fn func(GetUserByNameRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*GetUserByNameExpectation) Respond400 ¶ added in v0.2.0
func (b *GetUserByNameExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*GetUserByNameExpectation) Respond404 ¶ added in v0.2.0
func (b *GetUserByNameExpectation) Respond404()
Respond404 sets the expectation to return a 404 response.
func (*GetUserByNameExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *GetUserByNameExpectation) RespondJSON200(resp externalRef0.User)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type GetUserByNameRequestObject ¶
type GetUserByNameRequestObject struct {
Username string `json:"username"`
}
type GetUserByNameResponseObject ¶
type GetUserByNameResponseObject interface {
VisitGetUserByNameResponse(w http.ResponseWriter) error
}
type GetUserByNamedefaultResponse ¶
type GetUserByNamedefaultResponse struct {
StatusCode int
}
func (GetUserByNamedefaultResponse) VisitGetUserByNameResponse ¶
func (response GetUserByNamedefaultResponse) VisitGetUserByNameResponse(w http.ResponseWriter) error
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type LoginUser200ApplicationxmlResponse ¶
type LoginUser200ApplicationxmlResponse struct {
Body io.Reader
Headers LoginUser200ResponseHeaders
ContentLength int64
}
func (LoginUser200ApplicationxmlResponse) VisitLoginUserResponse ¶
func (response LoginUser200ApplicationxmlResponse) VisitLoginUserResponse(w http.ResponseWriter) error
type LoginUser200JSONResponse ¶
type LoginUser200JSONResponse struct {
Body string
Headers LoginUser200ResponseHeaders
}
func (LoginUser200JSONResponse) VisitLoginUserResponse ¶
func (response LoginUser200JSONResponse) VisitLoginUserResponse(w http.ResponseWriter) error
type LoginUser400Response ¶
type LoginUser400Response struct {
}
func (LoginUser400Response) VisitLoginUserResponse ¶
func (response LoginUser400Response) VisitLoginUserResponse(w http.ResponseWriter) error
type LoginUserExpectation ¶ added in v0.2.0
type LoginUserExpectation struct {
// contains filtered or unexported fields
}
func (*LoginUserExpectation) Handle ¶ added in v0.3.0
func (b *LoginUserExpectation) Handle(fn func(LoginUserRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*LoginUserExpectation) Respond400 ¶ added in v0.2.0
func (b *LoginUserExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*LoginUserExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *LoginUserExpectation) RespondJSON200(resp LoginUser200JSONResponse)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type LoginUserParams ¶
type LoginUserParams = modelspkg.LoginUserParams
type LoginUserRequestObject ¶
type LoginUserRequestObject struct {
Params LoginUserParams
}
type LoginUserResponseObject ¶
type LoginUserResponseObject interface {
VisitLoginUserResponse(w http.ResponseWriter) error
}
type LoginUserdefaultResponse ¶
type LoginUserdefaultResponse struct {
StatusCode int
}
func (LoginUserdefaultResponse) VisitLoginUserResponse ¶
func (response LoginUserdefaultResponse) VisitLoginUserResponse(w http.ResponseWriter) error
type LogoutUser200Response ¶
type LogoutUser200Response struct {
}
func (LogoutUser200Response) VisitLogoutUserResponse ¶
func (response LogoutUser200Response) VisitLogoutUserResponse(w http.ResponseWriter) error
type LogoutUserExpectation ¶ added in v0.2.0
type LogoutUserExpectation struct {
// contains filtered or unexported fields
}
func (*LogoutUserExpectation) Handle ¶ added in v0.3.0
func (b *LogoutUserExpectation) Handle(fn func(LogoutUserRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*LogoutUserExpectation) Respond200 ¶ added in v0.2.0
func (b *LogoutUserExpectation) Respond200()
Respond200 sets the expectation to return a 200 response.
type LogoutUserRequestObject ¶
type LogoutUserRequestObject struct {
}
type LogoutUserResponseObject ¶
type LogoutUserResponseObject interface {
VisitLogoutUserResponse(w http.ResponseWriter) error
}
type LogoutUserdefaultResponse ¶
type LogoutUserdefaultResponse struct {
StatusCode int
}
func (LogoutUserdefaultResponse) VisitLogoutUserResponse ¶
func (response LogoutUserdefaultResponse) VisitLogoutUserResponse(w http.ResponseWriter) error
type OrderStatus ¶
type OrderStatus = modelspkg.OrderStatus
type PetWithCustomTypes ¶
type PetWithCustomTypes = modelspkg.PetWithCustomTypes
type PostStoreOrder200JSONResponse ¶
type PostStoreOrder200JSONResponse Order
func (PostStoreOrder200JSONResponse) VisitPostStoreOrderResponse ¶
func (response PostStoreOrder200JSONResponse) VisitPostStoreOrderResponse(w http.ResponseWriter) error
type PostStoreOrder400Response ¶
type PostStoreOrder400Response struct {
}
func (PostStoreOrder400Response) VisitPostStoreOrderResponse ¶
func (response PostStoreOrder400Response) VisitPostStoreOrderResponse(w http.ResponseWriter) error
type PostStoreOrder422Response ¶
type PostStoreOrder422Response struct {
}
func (PostStoreOrder422Response) VisitPostStoreOrderResponse ¶
func (response PostStoreOrder422Response) VisitPostStoreOrderResponse(w http.ResponseWriter) error
type PostStoreOrderExpectation ¶ added in v0.2.0
type PostStoreOrderExpectation struct {
// contains filtered or unexported fields
}
func (*PostStoreOrderExpectation) Handle ¶ added in v0.3.0
func (b *PostStoreOrderExpectation) Handle(fn func(PostStoreOrderRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*PostStoreOrderExpectation) Respond400 ¶ added in v0.2.0
func (b *PostStoreOrderExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*PostStoreOrderExpectation) Respond422 ¶ added in v0.2.0
func (b *PostStoreOrderExpectation) Respond422()
Respond422 sets the expectation to return a 422 response.
func (*PostStoreOrderExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *PostStoreOrderExpectation) RespondJSON200(resp modelspkg.Order)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type PostStoreOrderFormdataRequestBody ¶
type PostStoreOrderFormdataRequestBody = Order
PostStoreOrderFormdataRequestBody defines body for PostStoreOrder for application/x-www-form-urlencoded ContentType.
type PostStoreOrderJSONRequestBody ¶
type PostStoreOrderJSONRequestBody = Order
PostStoreOrderJSONRequestBody defines body for PostStoreOrder for application/json ContentType.
type PostStoreOrderRequestObject ¶
type PostStoreOrderRequestObject struct {
JSONBody *PostStoreOrderJSONRequestBody
FormdataBody *PostStoreOrderFormdataRequestBody
Body io.Reader
}
type PostStoreOrderResponseObject ¶
type PostStoreOrderResponseObject interface {
VisitPostStoreOrderResponse(w http.ResponseWriter) error
}
type PostStoreOrderdefaultResponse ¶
type PostStoreOrderdefaultResponse struct {
StatusCode int
}
func (PostStoreOrderdefaultResponse) VisitPostStoreOrderResponse ¶
func (response PostStoreOrderdefaultResponse) VisitPostStoreOrderResponse(w http.ResponseWriter) 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 ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// Add a new pet to the store.
// (POST /pet)
AddPet(w http.ResponseWriter, r *http.Request)
// Update an existing pet.
// (PUT /pet)
UpdatePet(w http.ResponseWriter, r *http.Request)
// Finds Pets by status.
// (GET /pet/findByStatus)
FindPetsByStatus(w http.ResponseWriter, r *http.Request, params FindPetsByStatusParams)
// Finds Pets by tags.
// (GET /pet/findByTags)
FindPetsByTags(w http.ResponseWriter, r *http.Request, params FindPetsByTagsParams)
// Deletes a pet.
// (DELETE /pet/{petId})
DeletePet(w http.ResponseWriter, r *http.Request, petId int64, params DeletePetParams)
// Find pet by ID.
// (GET /pet/{petId})
GetPetById(w http.ResponseWriter, r *http.Request, petId int64)
// Updates a pet in the store with form data.
// (POST /pet/{petId})
UpdatePetWithForm(w http.ResponseWriter, r *http.Request, petId int64, params UpdatePetWithFormParams)
// Get pet metadata.
// (GET /pet/{petId}/metadata)
GetPetMetadata(w http.ResponseWriter, r *http.Request, petId int64, params GetPetMetadataParams)
// Get pet photo by ID.
// (GET /pet/{petId}/photos/{photoId})
GetPetPhotoById(w http.ResponseWriter, r *http.Request, petId int64, photoId int64)
// Get pet registration details with custom types
// (GET /pet/{petId}/registration)
GetPetRegistration(w http.ResponseWriter, r *http.Request, petId int64)
// Uploads an image.
// (POST /pet/{petId}/uploadImage)
UploadFile(w http.ResponseWriter, r *http.Request, petId int64, params UploadFileParams)
// Returns pet inventories by status.
// (GET /store/inventory)
GetStoreInventory(w http.ResponseWriter, r *http.Request)
// Place an order for a pet.
// (POST /store/order)
PostStoreOrder(w http.ResponseWriter, r *http.Request)
// Delete purchase order by identifier.
// (DELETE /store/order/{orderId})
DeleteOrder(w http.ResponseWriter, r *http.Request, orderId int64)
// Find purchase order by ID.
// (GET /store/order/{orderId})
GetOrderById(w http.ResponseWriter, r *http.Request, orderId int64)
// Create user.
// (POST /user)
CreateUser(w http.ResponseWriter, r *http.Request)
// Creates list of users with given input array.
// (POST /user/createWithList)
CreateUsersWithListInput(w http.ResponseWriter, r *http.Request)
// Logs user into the system.
// (GET /user/login)
LoginUser(w http.ResponseWriter, r *http.Request, params LoginUserParams)
// Logs out current logged in user session.
// (GET /user/logout)
LogoutUser(w http.ResponseWriter, r *http.Request)
// Delete user resource.
// (DELETE /user/{username})
DeleteUser(w http.ResponseWriter, r *http.Request, username string)
// Get user by user name.
// (GET /user/{username})
GetUserByName(w http.ResponseWriter, r *http.Request, username string)
// Update user resource.
// (PUT /user/{username})
UpdateUser(w http.ResponseWriter, r *http.Request, username string)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
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) AddPet ¶
func (siw *ServerInterfaceWrapper) AddPet(w http.ResponseWriter, r *http.Request)
AddPet operation middleware
func (*ServerInterfaceWrapper) CreateUser ¶
func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser operation middleware
func (*ServerInterfaceWrapper) CreateUsersWithListInput ¶
func (siw *ServerInterfaceWrapper) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request)
CreateUsersWithListInput operation middleware
func (*ServerInterfaceWrapper) DeleteOrder ¶
func (siw *ServerInterfaceWrapper) DeleteOrder(w http.ResponseWriter, r *http.Request)
DeleteOrder operation middleware
func (*ServerInterfaceWrapper) DeletePet ¶
func (siw *ServerInterfaceWrapper) DeletePet(w http.ResponseWriter, r *http.Request)
DeletePet operation middleware
func (*ServerInterfaceWrapper) DeleteUser ¶
func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser operation middleware
func (*ServerInterfaceWrapper) FindPetsByStatus ¶
func (siw *ServerInterfaceWrapper) FindPetsByStatus(w http.ResponseWriter, r *http.Request)
FindPetsByStatus operation middleware
func (*ServerInterfaceWrapper) FindPetsByTags ¶
func (siw *ServerInterfaceWrapper) FindPetsByTags(w http.ResponseWriter, r *http.Request)
FindPetsByTags operation middleware
func (*ServerInterfaceWrapper) GetOrderById ¶
func (siw *ServerInterfaceWrapper) GetOrderById(w http.ResponseWriter, r *http.Request)
GetOrderById operation middleware
func (*ServerInterfaceWrapper) GetPetById ¶
func (siw *ServerInterfaceWrapper) GetPetById(w http.ResponseWriter, r *http.Request)
GetPetById operation middleware
func (*ServerInterfaceWrapper) GetPetMetadata ¶
func (siw *ServerInterfaceWrapper) GetPetMetadata(w http.ResponseWriter, r *http.Request)
GetPetMetadata operation middleware
func (*ServerInterfaceWrapper) GetPetPhotoById ¶
func (siw *ServerInterfaceWrapper) GetPetPhotoById(w http.ResponseWriter, r *http.Request)
GetPetPhotoById operation middleware
func (*ServerInterfaceWrapper) GetPetRegistration ¶
func (siw *ServerInterfaceWrapper) GetPetRegistration(w http.ResponseWriter, r *http.Request)
GetPetRegistration operation middleware
func (*ServerInterfaceWrapper) GetStoreInventory ¶
func (siw *ServerInterfaceWrapper) GetStoreInventory(w http.ResponseWriter, r *http.Request)
GetStoreInventory operation middleware
func (*ServerInterfaceWrapper) GetUserByName ¶
func (siw *ServerInterfaceWrapper) GetUserByName(w http.ResponseWriter, r *http.Request)
GetUserByName operation middleware
func (*ServerInterfaceWrapper) LoginUser ¶
func (siw *ServerInterfaceWrapper) LoginUser(w http.ResponseWriter, r *http.Request)
LoginUser operation middleware
func (*ServerInterfaceWrapper) LogoutUser ¶
func (siw *ServerInterfaceWrapper) LogoutUser(w http.ResponseWriter, r *http.Request)
LogoutUser operation middleware
func (*ServerInterfaceWrapper) PostStoreOrder ¶
func (siw *ServerInterfaceWrapper) PostStoreOrder(w http.ResponseWriter, r *http.Request)
PostStoreOrder operation middleware
func (*ServerInterfaceWrapper) UpdatePet ¶
func (siw *ServerInterfaceWrapper) UpdatePet(w http.ResponseWriter, r *http.Request)
UpdatePet operation middleware
func (*ServerInterfaceWrapper) UpdatePetWithForm ¶
func (siw *ServerInterfaceWrapper) UpdatePetWithForm(w http.ResponseWriter, r *http.Request)
UpdatePetWithForm operation middleware
func (*ServerInterfaceWrapper) UpdateUser ¶
func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser operation middleware
func (*ServerInterfaceWrapper) UploadFile ¶
func (siw *ServerInterfaceWrapper) UploadFile(w http.ResponseWriter, r *http.Request)
UploadFile operation middleware
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Add a new pet to the store.
// (POST /pet)
AddPet(ctx context.Context, request AddPetRequestObject) (AddPetResponseObject, error)
// Update an existing pet.
// (PUT /pet)
UpdatePet(ctx context.Context, request UpdatePetRequestObject) (UpdatePetResponseObject, error)
// Finds Pets by status.
// (GET /pet/findByStatus)
FindPetsByStatus(ctx context.Context, request FindPetsByStatusRequestObject) (FindPetsByStatusResponseObject, error)
// Finds Pets by tags.
// (GET /pet/findByTags)
FindPetsByTags(ctx context.Context, request FindPetsByTagsRequestObject) (FindPetsByTagsResponseObject, error)
// Deletes a pet.
// (DELETE /pet/{petId})
DeletePet(ctx context.Context, request DeletePetRequestObject) (DeletePetResponseObject, error)
// Find pet by ID.
// (GET /pet/{petId})
GetPetById(ctx context.Context, request GetPetByIdRequestObject) (GetPetByIdResponseObject, error)
// Updates a pet in the store with form data.
// (POST /pet/{petId})
UpdatePetWithForm(ctx context.Context, request UpdatePetWithFormRequestObject) (UpdatePetWithFormResponseObject, error)
// Get pet metadata.
// (GET /pet/{petId}/metadata)
GetPetMetadata(ctx context.Context, request GetPetMetadataRequestObject) (GetPetMetadataResponseObject, error)
// Get pet photo by ID.
// (GET /pet/{petId}/photos/{photoId})
GetPetPhotoById(ctx context.Context, request GetPetPhotoByIdRequestObject) (GetPetPhotoByIdResponseObject, error)
// Get pet registration details with custom types
// (GET /pet/{petId}/registration)
GetPetRegistration(ctx context.Context, request GetPetRegistrationRequestObject) (GetPetRegistrationResponseObject, error)
// Uploads an image.
// (POST /pet/{petId}/uploadImage)
UploadFile(ctx context.Context, request UploadFileRequestObject) (UploadFileResponseObject, error)
// Returns pet inventories by status.
// (GET /store/inventory)
GetStoreInventory(ctx context.Context, request GetStoreInventoryRequestObject) (GetStoreInventoryResponseObject, error)
// Place an order for a pet.
// (POST /store/order)
PostStoreOrder(ctx context.Context, request PostStoreOrderRequestObject) (PostStoreOrderResponseObject, error)
// Delete purchase order by identifier.
// (DELETE /store/order/{orderId})
DeleteOrder(ctx context.Context, request DeleteOrderRequestObject) (DeleteOrderResponseObject, error)
// Find purchase order by ID.
// (GET /store/order/{orderId})
GetOrderById(ctx context.Context, request GetOrderByIdRequestObject) (GetOrderByIdResponseObject, error)
// Create user.
// (POST /user)
CreateUser(ctx context.Context, request CreateUserRequestObject) (CreateUserResponseObject, error)
// Creates list of users with given input array.
// (POST /user/createWithList)
CreateUsersWithListInput(ctx context.Context, request CreateUsersWithListInputRequestObject) (CreateUsersWithListInputResponseObject, error)
// Logs user into the system.
// (GET /user/login)
LoginUser(ctx context.Context, request LoginUserRequestObject) (LoginUserResponseObject, error)
// Logs out current logged in user session.
// (GET /user/logout)
LogoutUser(ctx context.Context, request LogoutUserRequestObject) (LogoutUserResponseObject, error)
// Delete user resource.
// (DELETE /user/{username})
DeleteUser(ctx context.Context, request DeleteUserRequestObject) (DeleteUserResponseObject, error)
// Get user by user name.
// (GET /user/{username})
GetUserByName(ctx context.Context, request GetUserByNameRequestObject) (GetUserByNameResponseObject, error)
// Update user resource.
// (PUT /user/{username})
UpdateUser(ctx context.Context, request UpdateUserRequestObject) (UpdateUserResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TestHandler ¶
type TestHandler struct {
// contains filtered or unexported fields
}
func NewTestHandler ¶
func NewTestHandler(tb TB) *TestHandler
func (*TestHandler) ExpectAddPet ¶
func (s *TestHandler) ExpectAddPet( body AddPetJSONRequestBody, opts ...ExpectOption, ) *AddPetExpectation
func (*TestHandler) ExpectAddPetWithBody ¶ added in v0.2.0
func (s *TestHandler) ExpectAddPetWithBody( contentType string, body []byte, opts ...ExpectOption, ) *AddPetExpectation
func (*TestHandler) ExpectAddPetWithFormdataBody ¶ added in v0.2.0
func (s *TestHandler) ExpectAddPetWithFormdataBody( body AddPetFormdataRequestBody, opts ...ExpectOption, ) *AddPetExpectation
func (*TestHandler) ExpectCreateUser ¶
func (s *TestHandler) ExpectCreateUser( body CreateUserJSONRequestBody, opts ...ExpectOption, ) *CreateUserExpectation
func (*TestHandler) ExpectCreateUserWithBody ¶ added in v0.2.0
func (s *TestHandler) ExpectCreateUserWithBody( contentType string, body []byte, opts ...ExpectOption, ) *CreateUserExpectation
func (*TestHandler) ExpectCreateUserWithFormdataBody ¶ added in v0.2.0
func (s *TestHandler) ExpectCreateUserWithFormdataBody( body CreateUserFormdataRequestBody, opts ...ExpectOption, ) *CreateUserExpectation
func (*TestHandler) ExpectCreateUsersWithListInput ¶
func (s *TestHandler) ExpectCreateUsersWithListInput( body CreateUsersWithListInputJSONRequestBody, opts ...ExpectOption, ) *CreateUsersWithListInputExpectation
func (*TestHandler) ExpectDeleteOrder ¶
func (s *TestHandler) ExpectDeleteOrder( orderId int64, opts ...ExpectOption, ) *DeleteOrderExpectation
func (*TestHandler) ExpectDeletePet ¶
func (s *TestHandler) ExpectDeletePet( petId int64, queryParams *DeletePetParams, opts ...ExpectOption, ) *DeletePetExpectation
func (*TestHandler) ExpectDeleteUser ¶
func (s *TestHandler) ExpectDeleteUser( username string, opts ...ExpectOption, ) *DeleteUserExpectation
func (*TestHandler) ExpectFindPetsByStatus ¶
func (s *TestHandler) ExpectFindPetsByStatus( queryParams *FindPetsByStatusParams, opts ...ExpectOption, ) *FindPetsByStatusExpectation
func (*TestHandler) ExpectFindPetsByTags ¶
func (s *TestHandler) ExpectFindPetsByTags( queryParams *FindPetsByTagsParams, opts ...ExpectOption, ) *FindPetsByTagsExpectation
func (*TestHandler) ExpectGetOrderById ¶
func (s *TestHandler) ExpectGetOrderById( orderId int64, opts ...ExpectOption, ) *GetOrderByIdExpectation
func (*TestHandler) ExpectGetPetById ¶
func (s *TestHandler) ExpectGetPetById( petId int64, opts ...ExpectOption, ) *GetPetByIdExpectation
func (*TestHandler) ExpectGetPetMetadata ¶
func (s *TestHandler) ExpectGetPetMetadata( petId int64, queryParams *GetPetMetadataParams, opts ...ExpectOption, ) *GetPetMetadataExpectation
func (*TestHandler) ExpectGetPetPhotoById ¶
func (s *TestHandler) ExpectGetPetPhotoById( petId int64, photoId int64, opts ...ExpectOption, ) *GetPetPhotoByIdExpectation
func (*TestHandler) ExpectGetPetRegistration ¶
func (s *TestHandler) ExpectGetPetRegistration( petId int64, opts ...ExpectOption, ) *GetPetRegistrationExpectation
func (*TestHandler) ExpectGetStoreInventory ¶
func (s *TestHandler) ExpectGetStoreInventory( opts ...ExpectOption, ) *GetStoreInventoryExpectation
func (*TestHandler) ExpectGetUserByName ¶
func (s *TestHandler) ExpectGetUserByName( username string, opts ...ExpectOption, ) *GetUserByNameExpectation
func (*TestHandler) ExpectLoginUser ¶
func (s *TestHandler) ExpectLoginUser( queryParams *LoginUserParams, opts ...ExpectOption, ) *LoginUserExpectation
func (*TestHandler) ExpectLogoutUser ¶
func (s *TestHandler) ExpectLogoutUser( opts ...ExpectOption, ) *LogoutUserExpectation
func (*TestHandler) ExpectPostStoreOrder ¶
func (s *TestHandler) ExpectPostStoreOrder( body PostStoreOrderJSONRequestBody, opts ...ExpectOption, ) *PostStoreOrderExpectation
func (*TestHandler) ExpectPostStoreOrderWithBody ¶ added in v0.2.0
func (s *TestHandler) ExpectPostStoreOrderWithBody( contentType string, body []byte, opts ...ExpectOption, ) *PostStoreOrderExpectation
func (*TestHandler) ExpectPostStoreOrderWithFormdataBody ¶ added in v0.2.0
func (s *TestHandler) ExpectPostStoreOrderWithFormdataBody( body PostStoreOrderFormdataRequestBody, opts ...ExpectOption, ) *PostStoreOrderExpectation
func (*TestHandler) ExpectUpdatePet ¶
func (s *TestHandler) ExpectUpdatePet( body UpdatePetJSONRequestBody, opts ...ExpectOption, ) *UpdatePetExpectation
func (*TestHandler) ExpectUpdatePetWithBody ¶ added in v0.2.0
func (s *TestHandler) ExpectUpdatePetWithBody( contentType string, body []byte, opts ...ExpectOption, ) *UpdatePetExpectation
func (*TestHandler) ExpectUpdatePetWithForm ¶
func (s *TestHandler) ExpectUpdatePetWithForm( petId int64, queryParams *UpdatePetWithFormParams, opts ...ExpectOption, ) *UpdatePetWithFormExpectation
func (*TestHandler) ExpectUpdatePetWithFormdataBody ¶ added in v0.2.0
func (s *TestHandler) ExpectUpdatePetWithFormdataBody( body UpdatePetFormdataRequestBody, opts ...ExpectOption, ) *UpdatePetExpectation
func (*TestHandler) ExpectUpdateUser ¶
func (s *TestHandler) ExpectUpdateUser( username string, body UpdateUserJSONRequestBody, opts ...ExpectOption, ) *UpdateUserExpectation
func (*TestHandler) ExpectUpdateUserWithBody ¶ added in v0.2.0
func (s *TestHandler) ExpectUpdateUserWithBody( username string, contentType string, body []byte, opts ...ExpectOption, ) *UpdateUserExpectation
func (*TestHandler) ExpectUpdateUserWithFormdataBody ¶ added in v0.2.0
func (s *TestHandler) ExpectUpdateUserWithFormdataBody( username string, body UpdateUserFormdataRequestBody, opts ...ExpectOption, ) *UpdateUserExpectation
func (*TestHandler) ExpectUploadFileWithBody ¶ added in v0.2.0
func (s *TestHandler) ExpectUploadFileWithBody( petId int64, contentType string, body []byte, opts ...ExpectOption, ) *UploadFileExpectation
func (*TestHandler) ServeHTTP ¶
func (s *TestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
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
type UpdatePet200ApplicationxmlResponse ¶
func (UpdatePet200ApplicationxmlResponse) VisitUpdatePetResponse ¶
func (response UpdatePet200ApplicationxmlResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePet200JSONResponse ¶
type UpdatePet200JSONResponse Pet
func (UpdatePet200JSONResponse) VisitUpdatePetResponse ¶
func (response UpdatePet200JSONResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePet400ApplicationxmlResponse ¶
type UpdatePet400ApplicationxmlResponse struct{ ErrorApplicationxmlResponse }
func (UpdatePet400ApplicationxmlResponse) VisitUpdatePetResponse ¶
func (response UpdatePet400ApplicationxmlResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePet400JSONResponse ¶
type UpdatePet400JSONResponse struct{ ErrorJSONResponse }
func (UpdatePet400JSONResponse) VisitUpdatePetResponse ¶
func (response UpdatePet400JSONResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePet404ApplicationxmlResponse ¶
func (UpdatePet404ApplicationxmlResponse) VisitUpdatePetResponse ¶
func (response UpdatePet404ApplicationxmlResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePet404JSONResponse ¶
type UpdatePet404JSONResponse Error
func (UpdatePet404JSONResponse) VisitUpdatePetResponse ¶
func (response UpdatePet404JSONResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePet422ApplicationxmlResponse ¶
func (UpdatePet422ApplicationxmlResponse) VisitUpdatePetResponse ¶
func (response UpdatePet422ApplicationxmlResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePet422JSONResponse ¶
type UpdatePet422JSONResponse Error
func (UpdatePet422JSONResponse) VisitUpdatePetResponse ¶
func (response UpdatePet422JSONResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdatePetExpectation ¶ added in v0.2.0
type UpdatePetExpectation struct {
// contains filtered or unexported fields
}
func (*UpdatePetExpectation) Handle ¶ added in v0.3.0
func (b *UpdatePetExpectation) Handle(fn func(UpdatePetRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*UpdatePetExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *UpdatePetExpectation) RespondJSON200(resp modelspkg.Pet)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
func (*UpdatePetExpectation) RespondJSON400 ¶ added in v0.2.0
func (b *UpdatePetExpectation) RespondJSON400(resp UpdatePet400JSONResponse)
RespondJSON400 sets the expectation to return a 400 response with JSON content.
func (*UpdatePetExpectation) RespondJSON404 ¶ added in v0.2.0
func (b *UpdatePetExpectation) RespondJSON404(resp modelspkg.Error)
RespondJSON404 sets the expectation to return a 404 response with JSON content.
func (*UpdatePetExpectation) RespondJSON422 ¶ added in v0.2.0
func (b *UpdatePetExpectation) RespondJSON422(resp modelspkg.Error)
RespondJSON422 sets the expectation to return a 422 response with JSON content.
type UpdatePetFormdataRequestBody ¶
type UpdatePetFormdataRequestBody = Pet
UpdatePetFormdataRequestBody defines body for UpdatePet for application/x-www-form-urlencoded ContentType.
type UpdatePetJSONRequestBody ¶
type UpdatePetJSONRequestBody = Pet
UpdatePetJSONRequestBody defines body for UpdatePet for application/json ContentType.
type UpdatePetRequestObject ¶
type UpdatePetRequestObject struct {
JSONBody *UpdatePetJSONRequestBody
FormdataBody *UpdatePetFormdataRequestBody
Body io.Reader
}
type UpdatePetResponseObject ¶
type UpdatePetResponseObject interface {
VisitUpdatePetResponse(w http.ResponseWriter) error
}
type UpdatePetWithForm200ApplicationxmlResponse ¶
func (UpdatePetWithForm200ApplicationxmlResponse) VisitUpdatePetWithFormResponse ¶
func (response UpdatePetWithForm200ApplicationxmlResponse) VisitUpdatePetWithFormResponse(w http.ResponseWriter) error
type UpdatePetWithForm200JSONResponse ¶
type UpdatePetWithForm200JSONResponse Pet
func (UpdatePetWithForm200JSONResponse) VisitUpdatePetWithFormResponse ¶
func (response UpdatePetWithForm200JSONResponse) VisitUpdatePetWithFormResponse(w http.ResponseWriter) error
type UpdatePetWithForm400Response ¶
type UpdatePetWithForm400Response struct {
}
func (UpdatePetWithForm400Response) VisitUpdatePetWithFormResponse ¶
func (response UpdatePetWithForm400Response) VisitUpdatePetWithFormResponse(w http.ResponseWriter) error
type UpdatePetWithFormExpectation ¶ added in v0.2.0
type UpdatePetWithFormExpectation struct {
// contains filtered or unexported fields
}
func (*UpdatePetWithFormExpectation) Handle ¶ added in v0.3.0
func (b *UpdatePetWithFormExpectation) Handle(fn func(UpdatePetWithFormRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*UpdatePetWithFormExpectation) Respond400 ¶ added in v0.2.0
func (b *UpdatePetWithFormExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*UpdatePetWithFormExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *UpdatePetWithFormExpectation) RespondJSON200(resp modelspkg.Pet)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type UpdatePetWithFormParams ¶
type UpdatePetWithFormParams = modelspkg.UpdatePetWithFormParams
type UpdatePetWithFormRequestObject ¶
type UpdatePetWithFormRequestObject struct {
PetId int64 `json:"petId"`
Params UpdatePetWithFormParams
}
type UpdatePetWithFormResponseObject ¶
type UpdatePetWithFormResponseObject interface {
VisitUpdatePetWithFormResponse(w http.ResponseWriter) error
}
type UpdatePetWithFormdefaultResponse ¶
type UpdatePetWithFormdefaultResponse struct {
StatusCode int
}
func (UpdatePetWithFormdefaultResponse) VisitUpdatePetWithFormResponse ¶
func (response UpdatePetWithFormdefaultResponse) VisitUpdatePetWithFormResponse(w http.ResponseWriter) error
type UpdatePetdefaultResponse ¶
type UpdatePetdefaultResponse struct {
StatusCode int
}
func (UpdatePetdefaultResponse) VisitUpdatePetResponse ¶
func (response UpdatePetdefaultResponse) VisitUpdatePetResponse(w http.ResponseWriter) error
type UpdateUser200Response ¶
type UpdateUser200Response struct {
}
func (UpdateUser200Response) VisitUpdateUserResponse ¶
func (response UpdateUser200Response) VisitUpdateUserResponse(w http.ResponseWriter) error
type UpdateUser400Response ¶
type UpdateUser400Response struct {
}
func (UpdateUser400Response) VisitUpdateUserResponse ¶
func (response UpdateUser400Response) VisitUpdateUserResponse(w http.ResponseWriter) error
type UpdateUser404Response ¶
type UpdateUser404Response struct {
}
func (UpdateUser404Response) VisitUpdateUserResponse ¶
func (response UpdateUser404Response) VisitUpdateUserResponse(w http.ResponseWriter) error
type UpdateUserExpectation ¶ added in v0.2.0
type UpdateUserExpectation struct {
// contains filtered or unexported fields
}
func (*UpdateUserExpectation) Handle ¶ added in v0.3.0
func (b *UpdateUserExpectation) Handle(fn func(UpdateUserRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*UpdateUserExpectation) Respond200 ¶ added in v0.2.0
func (b *UpdateUserExpectation) Respond200()
Respond200 sets the expectation to return a 200 response.
func (*UpdateUserExpectation) Respond400 ¶ added in v0.2.0
func (b *UpdateUserExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*UpdateUserExpectation) Respond404 ¶ added in v0.2.0
func (b *UpdateUserExpectation) Respond404()
Respond404 sets the expectation to return a 404 response.
type UpdateUserFormdataRequestBody ¶
type UpdateUserFormdataRequestBody = externalRef0.User
UpdateUserFormdataRequestBody defines body for UpdateUser for application/x-www-form-urlencoded ContentType.
type UpdateUserJSONRequestBody ¶
type UpdateUserJSONRequestBody = externalRef0.User
UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
type UpdateUserRequestObject ¶
type UpdateUserRequestObject struct {
Username string `json:"username"`
JSONBody *UpdateUserJSONRequestBody
FormdataBody *UpdateUserFormdataRequestBody
Body io.Reader
}
type UpdateUserResponseObject ¶
type UpdateUserResponseObject interface {
VisitUpdateUserResponse(w http.ResponseWriter) error
}
type UpdateUserdefaultResponse ¶
type UpdateUserdefaultResponse struct {
StatusCode int
}
func (UpdateUserdefaultResponse) VisitUpdateUserResponse ¶
func (response UpdateUserdefaultResponse) VisitUpdateUserResponse(w http.ResponseWriter) error
type UploadFile200JSONResponse ¶
type UploadFile200JSONResponse ApiResponse
func (UploadFile200JSONResponse) VisitUploadFileResponse ¶
func (response UploadFile200JSONResponse) VisitUploadFileResponse(w http.ResponseWriter) error
type UploadFile400Response ¶
type UploadFile400Response struct {
}
func (UploadFile400Response) VisitUploadFileResponse ¶
func (response UploadFile400Response) VisitUploadFileResponse(w http.ResponseWriter) error
type UploadFile404Response ¶
type UploadFile404Response struct {
}
func (UploadFile404Response) VisitUploadFileResponse ¶
func (response UploadFile404Response) VisitUploadFileResponse(w http.ResponseWriter) error
type UploadFileExpectation ¶ added in v0.2.0
type UploadFileExpectation struct {
// contains filtered or unexported fields
}
func (*UploadFileExpectation) Handle ¶ added in v0.3.0
func (b *UploadFileExpectation) Handle(fn func(UploadFileRequestObject, http.ResponseWriter))
Handle sets the expectation to invoke a custom handler function with full control over the HTTP response.
func (*UploadFileExpectation) Respond400 ¶ added in v0.2.0
func (b *UploadFileExpectation) Respond400()
Respond400 sets the expectation to return a 400 response.
func (*UploadFileExpectation) Respond404 ¶ added in v0.2.0
func (b *UploadFileExpectation) Respond404()
Respond404 sets the expectation to return a 404 response.
func (*UploadFileExpectation) RespondJSON200 ¶ added in v0.2.0
func (b *UploadFileExpectation) RespondJSON200(resp modelspkg.ApiResponse)
RespondJSON200 sets the expectation to return a 200 response with JSON content.
type UploadFileParams ¶
type UploadFileParams = modelspkg.UploadFileParams
type UploadFileRequestObject ¶
type UploadFileRequestObject struct {
PetId int64 `json:"petId"`
Params UploadFileParams
Body io.Reader
}
type UploadFileResponseObject ¶
type UploadFileResponseObject interface {
VisitUploadFileResponse(w http.ResponseWriter) error
}
type UploadFiledefaultResponse ¶
type UploadFiledefaultResponse struct {
StatusCode int
}
func (UploadFiledefaultResponse) VisitUploadFileResponse ¶
func (response UploadFiledefaultResponse) VisitUploadFileResponse(w http.ResponseWriter) error