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

147 lines
3.6 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"
)
// GetMeOKCode is the HTTP code returned for type GetMeOK
const GetMeOKCode int = 200
/*GetMeOK Success
swagger:response getMeOK
*/
type GetMeOK struct {
/*
In: Body
*/
Payload *models.User `json:"body,omitempty"`
}
// NewGetMeOK creates GetMeOK with default headers values
func NewGetMeOK() *GetMeOK {
return &GetMeOK{}
}
// WithPayload adds the payload to the get me o k response
func (o *GetMeOK) WithPayload(payload *models.User) *GetMeOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get me o k response
func (o *GetMeOK) SetPayload(payload *models.User) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetMeOK) 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
}
}
}
// GetMeUnauthorizedCode is the HTTP code returned for type GetMeUnauthorized
const GetMeUnauthorizedCode int = 401
/*GetMeUnauthorized Authentication failed
swagger:response getMeUnauthorized
*/
type GetMeUnauthorized struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetMeUnauthorized creates GetMeUnauthorized with default headers values
func NewGetMeUnauthorized() *GetMeUnauthorized {
return &GetMeUnauthorized{}
}
// WithPayload adds the payload to the get me unauthorized response
func (o *GetMeUnauthorized) WithPayload(payload *models.ErrResponse) *GetMeUnauthorized {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get me unauthorized response
func (o *GetMeUnauthorized) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetMeUnauthorized) 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
}
}
}
// GetMeInternalServerErrorCode is the HTTP code returned for type GetMeInternalServerError
const GetMeInternalServerErrorCode int = 500
/*GetMeInternalServerError Internal Server Error
swagger:response getMeInternalServerError
*/
type GetMeInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetMeInternalServerError creates GetMeInternalServerError with default headers values
func NewGetMeInternalServerError() *GetMeInternalServerError {
return &GetMeInternalServerError{}
}
// WithPayload adds the payload to the get me internal server error response
func (o *GetMeInternalServerError) WithPayload(payload *models.ErrResponse) *GetMeInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get me internal server error response
func (o *GetMeInternalServerError) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetMeInternalServerError) 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
}
}
}