forked from TrueCloudLab/frostfs-rest-gw
parent
6e01a0ead7
commit
d18312ecde
44 changed files with 2613 additions and 148 deletions
|
@ -21,6 +21,10 @@ const DeleteContainerOKCode int = 200
|
|||
swagger:response deleteContainerOK
|
||||
*/
|
||||
type DeleteContainerOK struct {
|
||||
/*
|
||||
|
||||
*/
|
||||
AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"`
|
||||
|
||||
/*
|
||||
In: Body
|
||||
|
@ -34,6 +38,17 @@ func NewDeleteContainerOK() *DeleteContainerOK {
|
|||
return &DeleteContainerOK{}
|
||||
}
|
||||
|
||||
// WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the delete container o k response
|
||||
func (o *DeleteContainerOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *DeleteContainerOK {
|
||||
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
||||
return o
|
||||
}
|
||||
|
||||
// SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the delete container o k response
|
||||
func (o *DeleteContainerOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) {
|
||||
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the delete container o k response
|
||||
func (o *DeleteContainerOK) WithPayload(payload *models.SuccessResponse) *DeleteContainerOK {
|
||||
o.Payload = payload
|
||||
|
@ -48,6 +63,13 @@ func (o *DeleteContainerOK) SetPayload(payload *models.SuccessResponse) {
|
|||
// WriteResponse to the client
|
||||
func (o *DeleteContainerOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
// response header Access-Control-Allow-Origin
|
||||
|
||||
accessControlAllowOrigin := o.AccessControlAllowOrigin
|
||||
if accessControlAllowOrigin != "" {
|
||||
rw.Header().Set("Access-Control-Allow-Origin", accessControlAllowOrigin)
|
||||
}
|
||||
|
||||
rw.WriteHeader(200)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue