Documentation
¶
Overview ¶
Code generated by mockery v1.0.0
Index ¶
- type API
- type Client
- func (a *Client) PetCreate(ctx context.Context, params *PetCreateParams) (*PetCreateCreated, error)
- func (a *Client) PetDelete(ctx context.Context, params *PetDeleteParams) (*PetDeleteNoContent, error)
- func (a *Client) PetGet(ctx context.Context, params *PetGetParams) (*PetGetOK, error)
- func (a *Client) PetList(ctx context.Context, params *PetListParams) (*PetListOK, error)
- func (a *Client) PetUpdate(ctx context.Context, params *PetUpdateParams) (*PetUpdateCreated, error)
- type MockAPI
- func (_m *MockAPI) PetCreate(ctx context.Context, params *PetCreateParams) (*PetCreateCreated, error)
- func (_m *MockAPI) PetDelete(ctx context.Context, params *PetDeleteParams) (*PetDeleteNoContent, error)
- func (_m *MockAPI) PetGet(ctx context.Context, params *PetGetParams) (*PetGetOK, error)
- func (_m *MockAPI) PetList(ctx context.Context, params *PetListParams) (*PetListOK, error)
- func (_m *MockAPI) PetUpdate(ctx context.Context, params *PetUpdateParams) (*PetUpdateCreated, error)
- type PetCreateCreated
- type PetCreateMethodNotAllowed
- type PetCreateParams
- type PetCreateReader
- type PetDeleteBadRequest
- type PetDeleteNoContent
- type PetDeleteNotFound
- type PetDeleteParams
- type PetDeleteReader
- type PetGetBadRequest
- type PetGetNotFound
- type PetGetOK
- type PetGetParams
- type PetGetReader
- type PetListBadRequest
- type PetListOK
- type PetListParams
- type PetListReader
- type PetUpdateBadRequest
- type PetUpdateCreated
- type PetUpdateMethodNotAllowed
- type PetUpdateNotFound
- type PetUpdateParams
- type PetUpdateReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // PetCreate adds a new pet to the store PetCreate(ctx context.Context, params *PetCreateParams) (*PetCreateCreated, error) // PetDelete deletes a pet PetDelete(ctx context.Context, params *PetDeleteParams) (*PetDeleteNoContent, error) // PetGet gets pet by it s ID PetGet(ctx context.Context, params *PetGetParams) (*PetGetOK, error) // PetList lists pets PetList(ctx context.Context, params *PetListParams) (*PetListOK, error) // PetUpdate updates an existing pet PetUpdate(ctx context.Context, params *PetUpdateParams) (*PetUpdateCreated, error) }
API is the interface of the pet client
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for pet API
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client
New creates a new pet API client.
func (*Client) PetCreate ¶
func (a *Client) PetCreate(ctx context.Context, params *PetCreateParams) (*PetCreateCreated, error)
PetCreate adds a new pet to the store
func (*Client) PetDelete ¶
func (a *Client) PetDelete(ctx context.Context, params *PetDeleteParams) (*PetDeleteNoContent, error)
PetDelete deletes a pet
func (*Client) PetUpdate ¶
func (a *Client) PetUpdate(ctx context.Context, params *PetUpdateParams) (*PetUpdateCreated, error)
PetUpdate updates an existing pet
type MockAPI ¶
MockAPI is an autogenerated mock type for the API type
func (*MockAPI) PetCreate ¶
func (_m *MockAPI) PetCreate(ctx context.Context, params *PetCreateParams) (*PetCreateCreated, error)
PetCreate provides a mock function with given fields: ctx, params
func (*MockAPI) PetDelete ¶
func (_m *MockAPI) PetDelete(ctx context.Context, params *PetDeleteParams) (*PetDeleteNoContent, error)
PetDelete provides a mock function with given fields: ctx, params
func (*MockAPI) PetUpdate ¶
func (_m *MockAPI) PetUpdate(ctx context.Context, params *PetUpdateParams) (*PetUpdateCreated, error)
PetUpdate provides a mock function with given fields: ctx, params
type PetCreateCreated ¶
PetCreateCreated handles this case with default header values.
Created
func NewPetCreateCreated ¶
func NewPetCreateCreated() *PetCreateCreated
NewPetCreateCreated creates a PetCreateCreated with default headers values
func (*PetCreateCreated) Error ¶
func (o *PetCreateCreated) Error() string
type PetCreateMethodNotAllowed ¶
type PetCreateMethodNotAllowed struct { }
PetCreateMethodNotAllowed handles this case with default header values.
Invalid input
func NewPetCreateMethodNotAllowed ¶
func NewPetCreateMethodNotAllowed() *PetCreateMethodNotAllowed
NewPetCreateMethodNotAllowed creates a PetCreateMethodNotAllowed with default headers values
func (*PetCreateMethodNotAllowed) Error ¶
func (o *PetCreateMethodNotAllowed) Error() string
type PetCreateParams ¶
type PetCreateParams struct { /*Body Pet object that needs to be added to the store */ Body *models.Pet Timeout time.Duration }
PetCreateParams contains all the parameters to send to the API endpoint for the pet create operation typically these are written to a http.Request
func (*PetCreateParams) WriteToRequest ¶
func (o *PetCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type PetCreateReader ¶
type PetCreateReader struct {
// contains filtered or unexported fields
}
PetCreateReader is a Reader for the PetCreate structure.
func (*PetCreateReader) ReadResponse ¶
func (o *PetCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type PetDeleteBadRequest ¶
type PetDeleteBadRequest struct { }
PetDeleteBadRequest handles this case with default header values.
Invalid ID supplied
func NewPetDeleteBadRequest ¶
func NewPetDeleteBadRequest() *PetDeleteBadRequest
NewPetDeleteBadRequest creates a PetDeleteBadRequest with default headers values
func (*PetDeleteBadRequest) Error ¶
func (o *PetDeleteBadRequest) Error() string
type PetDeleteNoContent ¶
type PetDeleteNoContent struct { }
PetDeleteNoContent handles this case with default header values.
Deleted successfully
func NewPetDeleteNoContent ¶
func NewPetDeleteNoContent() *PetDeleteNoContent
NewPetDeleteNoContent creates a PetDeleteNoContent with default headers values
func (*PetDeleteNoContent) Error ¶
func (o *PetDeleteNoContent) Error() string
type PetDeleteNotFound ¶
type PetDeleteNotFound struct { }
PetDeleteNotFound handles this case with default header values.
Pet not found
func NewPetDeleteNotFound ¶
func NewPetDeleteNotFound() *PetDeleteNotFound
NewPetDeleteNotFound creates a PetDeleteNotFound with default headers values
func (*PetDeleteNotFound) Error ¶
func (o *PetDeleteNotFound) Error() string
type PetDeleteParams ¶
type PetDeleteParams struct { /*APIKey*/ APIKey *string /*PetID Pet id to delete */ PetID int64 Timeout time.Duration }
PetDeleteParams contains all the parameters to send to the API endpoint for the pet delete operation typically these are written to a http.Request
func (*PetDeleteParams) WriteToRequest ¶
func (o *PetDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type PetDeleteReader ¶
type PetDeleteReader struct {
// contains filtered or unexported fields
}
PetDeleteReader is a Reader for the PetDelete structure.
func (*PetDeleteReader) ReadResponse ¶
func (o *PetDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type PetGetBadRequest ¶
type PetGetBadRequest struct { }
PetGetBadRequest handles this case with default header values.
Invalid ID supplied
func NewPetGetBadRequest ¶
func NewPetGetBadRequest() *PetGetBadRequest
NewPetGetBadRequest creates a PetGetBadRequest with default headers values
func (*PetGetBadRequest) Error ¶
func (o *PetGetBadRequest) Error() string
type PetGetNotFound ¶
type PetGetNotFound struct { }
PetGetNotFound handles this case with default header values.
Pet not found
func NewPetGetNotFound ¶
func NewPetGetNotFound() *PetGetNotFound
NewPetGetNotFound creates a PetGetNotFound with default headers values
func (*PetGetNotFound) Error ¶
func (o *PetGetNotFound) Error() string
type PetGetOK ¶
PetGetOK handles this case with default header values.
successful operation
func NewPetGetOK ¶
func NewPetGetOK() *PetGetOK
NewPetGetOK creates a PetGetOK with default headers values
type PetGetParams ¶
PetGetParams contains all the parameters to send to the API endpoint for the pet get operation typically these are written to a http.Request
func (*PetGetParams) WriteToRequest ¶
func (o *PetGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type PetGetReader ¶
type PetGetReader struct {
// contains filtered or unexported fields
}
PetGetReader is a Reader for the PetGet structure.
func (*PetGetReader) ReadResponse ¶
func (o *PetGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type PetListBadRequest ¶
type PetListBadRequest struct { }
PetListBadRequest handles this case with default header values.
Invalid status value
func NewPetListBadRequest ¶
func NewPetListBadRequest() *PetListBadRequest
NewPetListBadRequest creates a PetListBadRequest with default headers values
func (*PetListBadRequest) Error ¶
func (o *PetListBadRequest) Error() string
type PetListOK ¶
type PetListOK struct {
Payload models.PetListOKBody
}
PetListOK handles this case with default header values.
successful operation
func NewPetListOK ¶
func NewPetListOK() *PetListOK
NewPetListOK creates a PetListOK with default headers values
type PetListParams ¶
type PetListParams struct { /*Status Status values that need to be considered for filter */ Status []string Timeout time.Duration }
PetListParams contains all the parameters to send to the API endpoint for the pet list operation typically these are written to a http.Request
func (*PetListParams) WriteToRequest ¶
func (o *PetListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type PetListReader ¶
type PetListReader struct {
// contains filtered or unexported fields
}
PetListReader is a Reader for the PetList structure.
func (*PetListReader) ReadResponse ¶
func (o *PetListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type PetUpdateBadRequest ¶
type PetUpdateBadRequest struct { }
PetUpdateBadRequest handles this case with default header values.
Invalid ID supplied
func NewPetUpdateBadRequest ¶
func NewPetUpdateBadRequest() *PetUpdateBadRequest
NewPetUpdateBadRequest creates a PetUpdateBadRequest with default headers values
func (*PetUpdateBadRequest) Error ¶
func (o *PetUpdateBadRequest) Error() string
type PetUpdateCreated ¶
PetUpdateCreated handles this case with default header values.
Updated successfully
func NewPetUpdateCreated ¶
func NewPetUpdateCreated() *PetUpdateCreated
NewPetUpdateCreated creates a PetUpdateCreated with default headers values
func (*PetUpdateCreated) Error ¶
func (o *PetUpdateCreated) Error() string
type PetUpdateMethodNotAllowed ¶
type PetUpdateMethodNotAllowed struct { }
PetUpdateMethodNotAllowed handles this case with default header values.
Validation exception
func NewPetUpdateMethodNotAllowed ¶
func NewPetUpdateMethodNotAllowed() *PetUpdateMethodNotAllowed
NewPetUpdateMethodNotAllowed creates a PetUpdateMethodNotAllowed with default headers values
func (*PetUpdateMethodNotAllowed) Error ¶
func (o *PetUpdateMethodNotAllowed) Error() string
type PetUpdateNotFound ¶
type PetUpdateNotFound struct { }
PetUpdateNotFound handles this case with default header values.
Pet not found
func NewPetUpdateNotFound ¶
func NewPetUpdateNotFound() *PetUpdateNotFound
NewPetUpdateNotFound creates a PetUpdateNotFound with default headers values
func (*PetUpdateNotFound) Error ¶
func (o *PetUpdateNotFound) Error() string
type PetUpdateParams ¶
type PetUpdateParams struct { /*Body Pet object that needs to be added to the store */ Body *models.Pet Timeout time.Duration }
PetUpdateParams contains all the parameters to send to the API endpoint for the pet update operation typically these are written to a http.Request
func (*PetUpdateParams) WriteToRequest ¶
func (o *PetUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type PetUpdateReader ¶
type PetUpdateReader struct {
// contains filtered or unexported fields
}
PetUpdateReader is a Reader for the PetUpdate structure.
func (*PetUpdateReader) ReadResponse ¶
func (o *PetUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.