src.dualinventive.com/go/authentication-service/rest/server/operations/authentication/logout_responses.go

127 lines
3.3 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package authentication
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
models "src.dualinventive.com/go/authentication-service/rest/models"
)
// LogoutNoContentCode is the HTTP code returned for type LogoutNoContent
const LogoutNoContentCode int = 204
/*LogoutNoContent Logout successful
swagger:response logoutNoContent
*/
type LogoutNoContent struct {
}
// NewLogoutNoContent creates LogoutNoContent with default headers values
func NewLogoutNoContent() *LogoutNoContent {
return &LogoutNoContent{}
}
// WriteResponse to the client
func (o *LogoutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(204)
}
// LogoutUnauthorizedCode is the HTTP code returned for type LogoutUnauthorized
const LogoutUnauthorizedCode int = 401
/*LogoutUnauthorized Authentication failed
swagger:response logoutUnauthorized
*/
type LogoutUnauthorized struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewLogoutUnauthorized creates LogoutUnauthorized with default headers values
func NewLogoutUnauthorized() *LogoutUnauthorized {
return &LogoutUnauthorized{}
}
// WithPayload adds the payload to the logout unauthorized response
func (o *LogoutUnauthorized) WithPayload(payload *models.ErrResponse) *LogoutUnauthorized {
o.Payload = payload
return o
}
// SetPayload sets the payload to the logout unauthorized response
func (o *LogoutUnauthorized) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *LogoutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(401)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// LogoutInternalServerErrorCode is the HTTP code returned for type LogoutInternalServerError
const LogoutInternalServerErrorCode int = 500
/*LogoutInternalServerError Internal Server Error
swagger:response logoutInternalServerError
*/
type LogoutInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewLogoutInternalServerError creates LogoutInternalServerError with default headers values
func NewLogoutInternalServerError() *LogoutInternalServerError {
return &LogoutInternalServerError{}
}
// WithPayload adds the payload to the logout internal server error response
func (o *LogoutInternalServerError) WithPayload(payload *models.ErrResponse) *LogoutInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the logout internal server error response
func (o *LogoutInternalServerError) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *LogoutInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(500)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}