src.dualinventive.com/go/users-service/rest/server/operations/users/get_users_responses.go

191 lines
4.8 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package users
// 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/users-service/rest/models"
)
// GetUsersOKCode is the HTTP code returned for type GetUsersOK
const GetUsersOKCode int = 200
/*GetUsersOK successful operation
swagger:response getUsersOK
*/
type GetUsersOK struct {
/*
In: Body
*/
Payload *models.UsersList `json:"body,omitempty"`
}
// NewGetUsersOK creates GetUsersOK with default headers values
func NewGetUsersOK() *GetUsersOK {
return &GetUsersOK{}
}
// WithPayload adds the payload to the get users o k response
func (o *GetUsersOK) WithPayload(payload *models.UsersList) *GetUsersOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get users o k response
func (o *GetUsersOK) SetPayload(payload *models.UsersList) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetUsersOK) 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
}
}
}
// GetUsersUnauthorizedCode is the HTTP code returned for type GetUsersUnauthorized
const GetUsersUnauthorizedCode int = 401
/*GetUsersUnauthorized authentication failed
swagger:response getUsersUnauthorized
*/
type GetUsersUnauthorized struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetUsersUnauthorized creates GetUsersUnauthorized with default headers values
func NewGetUsersUnauthorized() *GetUsersUnauthorized {
return &GetUsersUnauthorized{}
}
// WithPayload adds the payload to the get users unauthorized response
func (o *GetUsersUnauthorized) WithPayload(payload *models.ErrResponse) *GetUsersUnauthorized {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get users unauthorized response
func (o *GetUsersUnauthorized) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetUsersUnauthorized) 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
}
}
}
// GetUsersNotFoundCode is the HTTP code returned for type GetUsersNotFound
const GetUsersNotFoundCode int = 404
/*GetUsersNotFound not found
swagger:response getUsersNotFound
*/
type GetUsersNotFound struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetUsersNotFound creates GetUsersNotFound with default headers values
func NewGetUsersNotFound() *GetUsersNotFound {
return &GetUsersNotFound{}
}
// WithPayload adds the payload to the get users not found response
func (o *GetUsersNotFound) WithPayload(payload *models.ErrResponse) *GetUsersNotFound {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get users not found response
func (o *GetUsersNotFound) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetUsersNotFound) 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
}
}
}
// GetUsersInternalServerErrorCode is the HTTP code returned for type GetUsersInternalServerError
const GetUsersInternalServerErrorCode int = 500
/*GetUsersInternalServerError internal server error
swagger:response getUsersInternalServerError
*/
type GetUsersInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetUsersInternalServerError creates GetUsersInternalServerError with default headers values
func NewGetUsersInternalServerError() *GetUsersInternalServerError {
return &GetUsersInternalServerError{}
}
// WithPayload adds the payload to the get users internal server error response
func (o *GetUsersInternalServerError) WithPayload(payload *models.ErrResponse) *GetUsersInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get users internal server error response
func (o *GetUsersInternalServerError) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetUsersInternalServerError) 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
}
}
}