github.com/circl-dev/go-swagger@v0.31.0/examples/file-server/client/uploads/upload_file_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package uploads
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"fmt"
    10  
    11  	"github.com/go-openapi/strfmt"
    12  	"github.com/circl-dev/runtime"
    13  )
    14  
    15  // UploadFileReader is a Reader for the UploadFile structure.
    16  type UploadFileReader struct {
    17  	formats strfmt.Registry
    18  }
    19  
    20  // ReadResponse reads a server response into the received o.
    21  func (o *UploadFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
    22  	switch response.Code() {
    23  	case 200:
    24  		result := NewUploadFileOK()
    25  		if err := result.readResponse(response, consumer, o.formats); err != nil {
    26  			return nil, err
    27  		}
    28  		return result, nil
    29  	default:
    30  		return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
    31  	}
    32  }
    33  
    34  // NewUploadFileOK creates a UploadFileOK with default headers values
    35  func NewUploadFileOK() *UploadFileOK {
    36  	return &UploadFileOK{}
    37  }
    38  
    39  /* UploadFileOK describes a response with status code 200, with default header values.
    40  
    41  OK
    42  */
    43  type UploadFileOK struct {
    44  }
    45  
    46  func (o *UploadFileOK) Error() string {
    47  	return fmt.Sprintf("[POST /upload][%d] uploadFileOK ", 200)
    48  }
    49  
    50  func (o *UploadFileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
    51  
    52  	return nil
    53  }