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

101 lines
2.4 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"
)
// VerifyOKCode is the HTTP code returned for type VerifyOK
const VerifyOKCode int = 200
/*VerifyOK OK
swagger:response verifyOK
*/
type VerifyOK struct {
/*
In: Body
*/
Payload bool `json:"body,omitempty"`
}
// NewVerifyOK creates VerifyOK with default headers values
func NewVerifyOK() *VerifyOK {
return &VerifyOK{}
}
// WithPayload adds the payload to the verify o k response
func (o *VerifyOK) WithPayload(payload bool) *VerifyOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the verify o k response
func (o *VerifyOK) SetPayload(payload bool) {
o.Payload = payload
}
// WriteResponse to the client
func (o *VerifyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
// VerifyInternalServerErrorCode is the HTTP code returned for type VerifyInternalServerError
const VerifyInternalServerErrorCode int = 500
/*VerifyInternalServerError Internal Server Error
swagger:response verifyInternalServerError
*/
type VerifyInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewVerifyInternalServerError creates VerifyInternalServerError with default headers values
func NewVerifyInternalServerError() *VerifyInternalServerError {
return &VerifyInternalServerError{}
}
// WithPayload adds the payload to the verify internal server error response
func (o *VerifyInternalServerError) WithPayload(payload *models.ErrResponse) *VerifyInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the verify internal server error response
func (o *VerifyInternalServerError) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *VerifyInternalServerError) 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
}
}
}