147 lines
3.7 KiB
Go
147 lines
3.7 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
// 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 "github.com/elfsternberg/timeofday/models"
|
|
)
|
|
|
|
// ClockGetOKCode is the HTTP code returned for type ClockGetOK
|
|
const ClockGetOKCode int = 200
|
|
|
|
/*ClockGetOK Returns the time of day.
|
|
|
|
swagger:response clockGetOK
|
|
*/
|
|
type ClockGetOK struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *models.Timeofday `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewClockGetOK creates ClockGetOK with default headers values
|
|
func NewClockGetOK() *ClockGetOK {
|
|
|
|
return &ClockGetOK{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the clock get o k response
|
|
func (o *ClockGetOK) WithPayload(payload *models.Timeofday) *ClockGetOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the clock get o k response
|
|
func (o *ClockGetOK) SetPayload(payload *models.Timeofday) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *ClockGetOK) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// ClockGetNotFoundCode is the HTTP code returned for type ClockGetNotFound
|
|
const ClockGetNotFoundCode int = 404
|
|
|
|
/*ClockGetNotFound Time zone not found
|
|
|
|
swagger:response clockGetNotFound
|
|
*/
|
|
type ClockGetNotFound struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewClockGetNotFound creates ClockGetNotFound with default headers values
|
|
func NewClockGetNotFound() *ClockGetNotFound {
|
|
|
|
return &ClockGetNotFound{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the clock get not found response
|
|
func (o *ClockGetNotFound) WithPayload(payload *models.ErrorResponse) *ClockGetNotFound {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the clock get not found response
|
|
func (o *ClockGetNotFound) SetPayload(payload *models.ErrorResponse) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *ClockGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(404)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
// ClockGetInternalServerErrorCode is the HTTP code returned for type ClockGetInternalServerError
|
|
const ClockGetInternalServerErrorCode int = 500
|
|
|
|
/*ClockGetInternalServerError Something has gone horribly wrong
|
|
|
|
swagger:response clockGetInternalServerError
|
|
*/
|
|
type ClockGetInternalServerError struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewClockGetInternalServerError creates ClockGetInternalServerError with default headers values
|
|
func NewClockGetInternalServerError() *ClockGetInternalServerError {
|
|
|
|
return &ClockGetInternalServerError{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the clock get internal server error response
|
|
func (o *ClockGetInternalServerError) WithPayload(payload *models.ErrorResponse) *ClockGetInternalServerError {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the clock get internal server error response
|
|
func (o *ClockGetInternalServerError) SetPayload(payload *models.ErrorResponse) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *ClockGetInternalServerError) 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
|
|
}
|
|
}
|
|
}
|