You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
4.0 KiB
145 lines
4.0 KiB
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package event_management
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
|
|
"github.com/Cyclops-Labs/cyclops-4-hpc.git/services/eventsengine/models"
|
|
)
|
|
|
|
// GetHistoryReader is a Reader for the GetHistory structure.
|
|
type GetHistoryReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetHistoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetHistoryOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 404:
|
|
result := NewGetHistoryNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetHistoryInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
default:
|
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetHistoryOK creates a GetHistoryOK with default headers values
|
|
func NewGetHistoryOK() *GetHistoryOK {
|
|
return &GetHistoryOK{}
|
|
}
|
|
|
|
/*GetHistoryOK handles this case with default header values.
|
|
|
|
Description of a successfully operation
|
|
*/
|
|
type GetHistoryOK struct {
|
|
Payload []*models.Event
|
|
}
|
|
|
|
func (o *GetHistoryOK) Error() string {
|
|
return fmt.Sprintf("[GET /event/history/{account}][%d] getHistoryOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetHistoryOK) GetPayload() []*models.Event {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetHistoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetHistoryNotFound creates a GetHistoryNotFound with default headers values
|
|
func NewGetHistoryNotFound() *GetHistoryNotFound {
|
|
return &GetHistoryNotFound{}
|
|
}
|
|
|
|
/*GetHistoryNotFound handles this case with default header values.
|
|
|
|
Item not found in the system
|
|
*/
|
|
type GetHistoryNotFound struct {
|
|
Payload *models.ErrorResponse
|
|
}
|
|
|
|
func (o *GetHistoryNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /event/history/{account}][%d] getHistoryNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetHistoryNotFound) GetPayload() *models.ErrorResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetHistoryNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.ErrorResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetHistoryInternalServerError creates a GetHistoryInternalServerError with default headers values
|
|
func NewGetHistoryInternalServerError() *GetHistoryInternalServerError {
|
|
return &GetHistoryInternalServerError{}
|
|
}
|
|
|
|
/*GetHistoryInternalServerError handles this case with default header values.
|
|
|
|
Something unexpected happend, error raised
|
|
*/
|
|
type GetHistoryInternalServerError struct {
|
|
Payload *models.ErrorResponse
|
|
}
|
|
|
|
func (o *GetHistoryInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /event/history/{account}][%d] getHistoryInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetHistoryInternalServerError) GetPayload() *models.ErrorResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetHistoryInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.ErrorResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|