github.com/Bio-core/jtree@v0.0.0-20190705165106-1d7a7e7d6272/restapi/operations/logout_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package operations
     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  // LogoutOKCode is the HTTP code returned for type LogoutOK
    15  const LogoutOKCode int = 200
    16  
    17  /*LogoutOK OK
    18  
    19  swagger:response logoutOK
    20  */
    21  type LogoutOK struct {
    22  
    23  	/*
    24  	  In: Body
    25  	*/
    26  	Payload bool `json:"body,omitempty"`
    27  }
    28  
    29  // NewLogoutOK creates LogoutOK with default headers values
    30  func NewLogoutOK() *LogoutOK {
    31  	return &LogoutOK{}
    32  }
    33  
    34  // WithPayload adds the payload to the logout o k response
    35  func (o *LogoutOK) WithPayload(payload bool) *LogoutOK {
    36  	o.Payload = payload
    37  	return o
    38  }
    39  
    40  // SetPayload sets the payload to the logout o k response
    41  func (o *LogoutOK) SetPayload(payload bool) {
    42  	o.Payload = payload
    43  }
    44  
    45  // WriteResponse to the client
    46  func (o *LogoutOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    47  
    48  	rw.WriteHeader(200)
    49  	payload := o.Payload
    50  	if err := producer.Produce(rw, payload); err != nil {
    51  		panic(err) // let the recovery middleware deal with this
    52  	}
    53  
    54  }
    55  
    56  // LogoutNotFoundCode is the HTTP code returned for type LogoutNotFound
    57  const LogoutNotFoundCode int = 404
    58  
    59  /*LogoutNotFound Sample not found
    60  
    61  swagger:response logoutNotFound
    62  */
    63  type LogoutNotFound struct {
    64  }
    65  
    66  // NewLogoutNotFound creates LogoutNotFound with default headers values
    67  func NewLogoutNotFound() *LogoutNotFound {
    68  	return &LogoutNotFound{}
    69  }
    70  
    71  // WriteResponse to the client
    72  func (o *LogoutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    73  
    74  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    75  
    76  	rw.WriteHeader(404)
    77  }