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