github.com/circl-dev/go-swagger@v0.31.0/examples/contributed-templates/stratoscale/restapi/operations/pet/pet_delete_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package pet
     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  	"net/http"
    10  
    11  	"github.com/circl-dev/runtime"
    12  )
    13  
    14  // PetDeleteNoContentCode is the HTTP code returned for type PetDeleteNoContent
    15  const PetDeleteNoContentCode int = 204
    16  
    17  /*PetDeleteNoContent Deleted successfully
    18  
    19  swagger:response petDeleteNoContent
    20  */
    21  type PetDeleteNoContent struct {
    22  }
    23  
    24  // NewPetDeleteNoContent creates PetDeleteNoContent with default headers values
    25  func NewPetDeleteNoContent() *PetDeleteNoContent {
    26  
    27  	return &PetDeleteNoContent{}
    28  }
    29  
    30  // WriteResponse to the client
    31  func (o *PetDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    32  
    33  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    34  
    35  	rw.WriteHeader(204)
    36  }
    37  
    38  // PetDeleteBadRequestCode is the HTTP code returned for type PetDeleteBadRequest
    39  const PetDeleteBadRequestCode int = 400
    40  
    41  /*PetDeleteBadRequest Invalid ID supplied
    42  
    43  swagger:response petDeleteBadRequest
    44  */
    45  type PetDeleteBadRequest struct {
    46  }
    47  
    48  // NewPetDeleteBadRequest creates PetDeleteBadRequest with default headers values
    49  func NewPetDeleteBadRequest() *PetDeleteBadRequest {
    50  
    51  	return &PetDeleteBadRequest{}
    52  }
    53  
    54  // WriteResponse to the client
    55  func (o *PetDeleteBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    56  
    57  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    58  
    59  	rw.WriteHeader(400)
    60  }
    61  
    62  // PetDeleteNotFoundCode is the HTTP code returned for type PetDeleteNotFound
    63  const PetDeleteNotFoundCode int = 404
    64  
    65  /*PetDeleteNotFound Pet not found
    66  
    67  swagger:response petDeleteNotFound
    68  */
    69  type PetDeleteNotFound struct {
    70  }
    71  
    72  // NewPetDeleteNotFound creates PetDeleteNotFound with default headers values
    73  func NewPetDeleteNotFound() *PetDeleteNotFound {
    74  
    75  	return &PetDeleteNotFound{}
    76  }
    77  
    78  // WriteResponse to the client
    79  func (o *PetDeleteNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    80  
    81  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    82  
    83  	rw.WriteHeader(404)
    84  }