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