2022-04-13 15:23:03 +00:00
|
|
|
// 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"
|
|
|
|
|
2022-12-15 10:03:54 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-rest-gw/gen/models"
|
2022-04-13 15:23:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ListContainersOKCode is the HTTP code returned for type ListContainersOK
|
|
|
|
const ListContainersOKCode int = 200
|
|
|
|
|
2022-12-15 10:03:54 +00:00
|
|
|
/*
|
|
|
|
ListContainersOK Containers info.
|
2022-04-13 15:23:03 +00:00
|
|
|
|
|
|
|
swagger:response listContainersOK
|
|
|
|
*/
|
|
|
|
type ListContainersOK struct {
|
2022-08-05 19:09:19 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
*/
|
|
|
|
AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"`
|
2022-04-13 15:23:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload *models.ContainerList `json:"body,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewListContainersOK creates ListContainersOK with default headers values
|
|
|
|
func NewListContainersOK() *ListContainersOK {
|
|
|
|
|
|
|
|
return &ListContainersOK{}
|
|
|
|
}
|
|
|
|
|
2022-08-05 19:09:19 +00:00
|
|
|
// WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the list containers o k response
|
|
|
|
func (o *ListContainersOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *ListContainersOK {
|
|
|
|
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the list containers o k response
|
|
|
|
func (o *ListContainersOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) {
|
|
|
|
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
|
|
|
}
|
|
|
|
|
2022-04-13 15:23:03 +00:00
|
|
|
// WithPayload adds the payload to the list containers o k response
|
|
|
|
func (o *ListContainersOK) WithPayload(payload *models.ContainerList) *ListContainersOK {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the list containers o k response
|
|
|
|
func (o *ListContainersOK) SetPayload(payload *models.ContainerList) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *ListContainersOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
2022-08-05 19:09:19 +00:00
|
|
|
// response header Access-Control-Allow-Origin
|
|
|
|
|
|
|
|
accessControlAllowOrigin := o.AccessControlAllowOrigin
|
|
|
|
if accessControlAllowOrigin != "" {
|
|
|
|
rw.Header().Set("Access-Control-Allow-Origin", accessControlAllowOrigin)
|
|
|
|
}
|
|
|
|
|
2022-04-13 15:23:03 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ListContainersBadRequestCode is the HTTP code returned for type ListContainersBadRequest
|
|
|
|
const ListContainersBadRequestCode int = 400
|
|
|
|
|
2022-12-15 10:03:54 +00:00
|
|
|
/*
|
|
|
|
ListContainersBadRequest Bad request.
|
2022-04-13 15:23:03 +00:00
|
|
|
|
|
|
|
swagger:response listContainersBadRequest
|
|
|
|
*/
|
|
|
|
type ListContainersBadRequest struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
2022-07-07 12:59:38 +00:00
|
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
2022-04-13 15:23:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewListContainersBadRequest creates ListContainersBadRequest with default headers values
|
|
|
|
func NewListContainersBadRequest() *ListContainersBadRequest {
|
|
|
|
|
|
|
|
return &ListContainersBadRequest{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the list containers bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *ListContainersBadRequest) WithPayload(payload *models.ErrorResponse) *ListContainersBadRequest {
|
2022-04-13 15:23:03 +00:00
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the list containers bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *ListContainersBadRequest) SetPayload(payload *models.ErrorResponse) {
|
2022-04-13 15:23:03 +00:00
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *ListContainersBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.WriteHeader(400)
|
2022-07-07 12:59:38 +00:00
|
|
|
if o.Payload != nil {
|
|
|
|
payload := o.Payload
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
|
|
panic(err) // let the recovery middleware deal with this
|
|
|
|
}
|
2022-04-13 15:23:03 +00:00
|
|
|
}
|
|
|
|
}
|