github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/examples/generated/restapi/operations/user/update_user_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package user
     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  // UpdateUserBadRequestCode is the HTTP code returned for type UpdateUserBadRequest
    15  const UpdateUserBadRequestCode int = 400
    16  
    17  /*
    18  UpdateUserBadRequest Invalid user supplied
    19  
    20  swagger:response updateUserBadRequest
    21  */
    22  type UpdateUserBadRequest struct {
    23  }
    24  
    25  // NewUpdateUserBadRequest creates UpdateUserBadRequest with default headers values
    26  func NewUpdateUserBadRequest() *UpdateUserBadRequest {
    27  
    28  	return &UpdateUserBadRequest{}
    29  }
    30  
    31  // WriteResponse to the client
    32  func (o *UpdateUserBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    33  
    34  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    35  
    36  	rw.WriteHeader(400)
    37  }
    38  
    39  // UpdateUserNotFoundCode is the HTTP code returned for type UpdateUserNotFound
    40  const UpdateUserNotFoundCode int = 404
    41  
    42  /*
    43  UpdateUserNotFound User not found
    44  
    45  swagger:response updateUserNotFound
    46  */
    47  type UpdateUserNotFound struct {
    48  }
    49  
    50  // NewUpdateUserNotFound creates UpdateUserNotFound with default headers values
    51  func NewUpdateUserNotFound() *UpdateUserNotFound {
    52  
    53  	return &UpdateUserNotFound{}
    54  }
    55  
    56  // WriteResponse to the client
    57  func (o *UpdateUserNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    58  
    59  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    60  
    61  	rw.WriteHeader(404)
    62  }