forked from TrueCloudLab/frostfs-rest-gw
[#1] Add route to delete container
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
066656ac48
commit
63fdb08f14
12 changed files with 637 additions and 96 deletions
80
gen/restapi/operations/delete_container_responses.go
Normal file
80
gen/restapi/operations/delete_container_responses.go
Normal file
|
@ -0,0 +1,80 @@
|
|||
// 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"
|
||||
|
||||
"github.com/nspcc-dev/neofs-rest-gw/gen/models"
|
||||
)
|
||||
|
||||
// DeleteContainerNoContentCode is the HTTP code returned for type DeleteContainerNoContent
|
||||
const DeleteContainerNoContentCode int = 204
|
||||
|
||||
/*DeleteContainerNoContent Successul deletion
|
||||
|
||||
swagger:response deleteContainerNoContent
|
||||
*/
|
||||
type DeleteContainerNoContent struct {
|
||||
}
|
||||
|
||||
// NewDeleteContainerNoContent creates DeleteContainerNoContent with default headers values
|
||||
func NewDeleteContainerNoContent() *DeleteContainerNoContent {
|
||||
|
||||
return &DeleteContainerNoContent{}
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *DeleteContainerNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
||||
|
||||
rw.WriteHeader(204)
|
||||
}
|
||||
|
||||
// DeleteContainerBadRequestCode is the HTTP code returned for type DeleteContainerBadRequest
|
||||
const DeleteContainerBadRequestCode int = 400
|
||||
|
||||
/*DeleteContainerBadRequest Bad request
|
||||
|
||||
swagger:response deleteContainerBadRequest
|
||||
*/
|
||||
type DeleteContainerBadRequest struct {
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload models.Error `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewDeleteContainerBadRequest creates DeleteContainerBadRequest with default headers values
|
||||
func NewDeleteContainerBadRequest() *DeleteContainerBadRequest {
|
||||
|
||||
return &DeleteContainerBadRequest{}
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the delete container bad request response
|
||||
func (o *DeleteContainerBadRequest) WithPayload(payload models.Error) *DeleteContainerBadRequest {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the delete container bad request response
|
||||
func (o *DeleteContainerBadRequest) SetPayload(payload models.Error) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *DeleteContainerBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(400)
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue