zrok/rest_server_zrok/operations/account/verify_responses.go

110 lines
2.6 KiB
Go
Raw Normal View History

2022-09-19 21:58:52 +02:00
// Code generated by go-swagger; DO NOT EDIT.
2022-11-30 17:43:00 +01:00
package account
2022-09-19 21:58:52 +02:00
// 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"
"github.com/openziti/zrok/rest_model_zrok"
2022-09-19 21:58:52 +02:00
)
// VerifyOKCode is the HTTP code returned for type VerifyOK
const VerifyOKCode int = 200
/*
VerifyOK token ready
swagger:response verifyOK
*/
type VerifyOK struct {
/*
In: Body
*/
Payload *rest_model_zrok.VerifyResponse `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 *rest_model_zrok.VerifyResponse) *VerifyOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the verify o k response
func (o *VerifyOK) SetPayload(payload *rest_model_zrok.VerifyResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *VerifyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// VerifyNotFoundCode is the HTTP code returned for type VerifyNotFound
const VerifyNotFoundCode int = 404
/*
VerifyNotFound token not found
swagger:response verifyNotFound
*/
type VerifyNotFound struct {
}
// NewVerifyNotFound creates VerifyNotFound with default headers values
func NewVerifyNotFound() *VerifyNotFound {
return &VerifyNotFound{}
}
// WriteResponse to the client
func (o *VerifyNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(404)
}
// VerifyInternalServerErrorCode is the HTTP code returned for type VerifyInternalServerError
const VerifyInternalServerErrorCode int = 500
/*
VerifyInternalServerError internal server error
swagger:response verifyInternalServerError
*/
type VerifyInternalServerError struct {
}
// NewVerifyInternalServerError creates VerifyInternalServerError with default headers values
func NewVerifyInternalServerError() *VerifyInternalServerError {
return &VerifyInternalServerError{}
}
// WriteResponse to the client
func (o *VerifyInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
2022-11-30 17:43:00 +01:00
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
2022-09-19 21:58:52 +02:00
rw.WriteHeader(500)
}