github.com/circl-dev/go-swagger@v0.31.0/examples/generated/restapi/operations/user/create_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/circl-dev/runtime"
    12  )
    13  
    14  /*CreateUserDefault successful operation
    15  
    16  swagger:response createUserDefault
    17  */
    18  type CreateUserDefault struct {
    19  	_statusCode int
    20  }
    21  
    22  // NewCreateUserDefault creates CreateUserDefault with default headers values
    23  func NewCreateUserDefault(code int) *CreateUserDefault {
    24  	if code <= 0 {
    25  		code = 500
    26  	}
    27  
    28  	return &CreateUserDefault{
    29  		_statusCode: code,
    30  	}
    31  }
    32  
    33  // WithStatusCode adds the status to the create user default response
    34  func (o *CreateUserDefault) WithStatusCode(code int) *CreateUserDefault {
    35  	o._statusCode = code
    36  	return o
    37  }
    38  
    39  // SetStatusCode sets the status to the create user default response
    40  func (o *CreateUserDefault) SetStatusCode(code int) {
    41  	o._statusCode = code
    42  }
    43  
    44  // WriteResponse to the client
    45  func (o *CreateUserDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    46  
    47  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    48  
    49  	rw.WriteHeader(o._statusCode)
    50  }