github.com/circl-dev/go-swagger@v0.31.0/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/circl-dev/runtime" 12 ) 13 14 /*LogoutUserDefault successful operation 15 16 swagger:response logoutUserDefault 17 */ 18 type LogoutUserDefault struct { 19 _statusCode int 20 } 21 22 // NewLogoutUserDefault creates LogoutUserDefault with default headers values 23 func NewLogoutUserDefault(code int) *LogoutUserDefault { 24 if code <= 0 { 25 code = 500 26 } 27 28 return &LogoutUserDefault{ 29 _statusCode: code, 30 } 31 } 32 33 // WithStatusCode adds the status to the logout user default response 34 func (o *LogoutUserDefault) WithStatusCode(code int) *LogoutUserDefault { 35 o._statusCode = code 36 return o 37 } 38 39 // SetStatusCode sets the status to the logout user default response 40 func (o *LogoutUserDefault) SetStatusCode(code int) { 41 o._statusCode = code 42 } 43 44 // WriteResponse to the client 45 func (o *LogoutUserDefault) 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 }