diff --git a/models/csi_format_error_response.go b/models/csi_format_error_response.go deleted file mode 100644 index e0796b5ff..000000000 --- a/models/csi_format_error_response.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// This file is part of MinIO Console Server -// Copyright (c) 2022 MinIO, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CsiFormatErrorResponse csi format error response -// -// swagger:model csiFormatErrorResponse -type CsiFormatErrorResponse struct { - - // drive - Drive string `json:"drive,omitempty"` - - // error - Error string `json:"error,omitempty"` - - // node - Node string `json:"node,omitempty"` -} - -// Validate validates this csi format error response -func (m *CsiFormatErrorResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this csi format error response based on context it is used -func (m *CsiFormatErrorResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CsiFormatErrorResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CsiFormatErrorResponse) UnmarshalBinary(b []byte) error { - var res CsiFormatErrorResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/models/direct_c_s_i_volume_info.go b/models/direct_c_s_i_volume_info.go deleted file mode 100644 index d3cb32bbf..000000000 --- a/models/direct_c_s_i_volume_info.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// This file is part of MinIO Console Server -// Copyright (c) 2022 MinIO, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DirectCSIVolumeInfo direct c s i volume info -// -// swagger:model directCSIVolumeInfo -type DirectCSIVolumeInfo struct { - - // capacity - Capacity int64 `json:"capacity,omitempty"` - - // drive - Drive string `json:"drive,omitempty"` - - // node - Node string `json:"node,omitempty"` - - // volume - Volume string `json:"volume,omitempty"` -} - -// Validate validates this direct c s i volume info -func (m *DirectCSIVolumeInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this direct c s i volume info based on context it is used -func (m *DirectCSIVolumeInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DirectCSIVolumeInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DirectCSIVolumeInfo) UnmarshalBinary(b []byte) error { - var res DirectCSIVolumeInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/models/format_direct_c_s_i_drives_response.go b/models/format_direct_c_s_i_drives_response.go deleted file mode 100644 index 69c24d1b1..000000000 --- a/models/format_direct_c_s_i_drives_response.go +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// This file is part of MinIO Console Server -// Copyright (c) 2022 MinIO, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FormatDirectCSIDrivesResponse format direct c s i drives response -// -// swagger:model formatDirectCSIDrivesResponse -type FormatDirectCSIDrivesResponse struct { - - // format issues list - FormatIssuesList []*CsiFormatErrorResponse `json:"formatIssuesList"` -} - -// Validate validates this format direct c s i drives response -func (m *FormatDirectCSIDrivesResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFormatIssuesList(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FormatDirectCSIDrivesResponse) validateFormatIssuesList(formats strfmt.Registry) error { - if swag.IsZero(m.FormatIssuesList) { // not required - return nil - } - - for i := 0; i < len(m.FormatIssuesList); i++ { - if swag.IsZero(m.FormatIssuesList[i]) { // not required - continue - } - - if m.FormatIssuesList[i] != nil { - if err := m.FormatIssuesList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("formatIssuesList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("formatIssuesList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this format direct c s i drives response based on the context it is used -func (m *FormatDirectCSIDrivesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFormatIssuesList(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *FormatDirectCSIDrivesResponse) contextValidateFormatIssuesList(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FormatIssuesList); i++ { - - if m.FormatIssuesList[i] != nil { - if err := m.FormatIssuesList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("formatIssuesList" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("formatIssuesList" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *FormatDirectCSIDrivesResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FormatDirectCSIDrivesResponse) UnmarshalBinary(b []byte) error { - var res FormatDirectCSIDrivesResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/models/get_direct_c_s_i_drive_list_response.go b/models/get_direct_c_s_i_drive_list_response.go deleted file mode 100644 index 21be6c9c2..000000000 --- a/models/get_direct_c_s_i_drive_list_response.go +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// This file is part of MinIO Console Server -// Copyright (c) 2022 MinIO, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetDirectCSIDriveListResponse get direct c s i drive list response -// -// swagger:model getDirectCSIDriveListResponse -type GetDirectCSIDriveListResponse struct { - - // drives - Drives []*DirectCSIDriveInfo `json:"drives"` -} - -// Validate validates this get direct c s i drive list response -func (m *GetDirectCSIDriveListResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDrives(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetDirectCSIDriveListResponse) validateDrives(formats strfmt.Registry) error { - if swag.IsZero(m.Drives) { // not required - return nil - } - - for i := 0; i < len(m.Drives); i++ { - if swag.IsZero(m.Drives[i]) { // not required - continue - } - - if m.Drives[i] != nil { - if err := m.Drives[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("drives" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("drives" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get direct c s i drive list response based on the context it is used -func (m *GetDirectCSIDriveListResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDrives(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetDirectCSIDriveListResponse) contextValidateDrives(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Drives); i++ { - - if m.Drives[i] != nil { - if err := m.Drives[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("drives" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("drives" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetDirectCSIDriveListResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetDirectCSIDriveListResponse) UnmarshalBinary(b []byte) error { - var res GetDirectCSIDriveListResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/models/get_direct_c_s_i_volume_list_response.go b/models/get_direct_c_s_i_volume_list_response.go deleted file mode 100644 index 384a8d42b..000000000 --- a/models/get_direct_c_s_i_volume_list_response.go +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// This file is part of MinIO Console Server -// Copyright (c) 2022 MinIO, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetDirectCSIVolumeListResponse get direct c s i volume list response -// -// swagger:model getDirectCSIVolumeListResponse -type GetDirectCSIVolumeListResponse struct { - - // volumes - Volumes []*DirectCSIVolumeInfo `json:"volumes"` -} - -// Validate validates this get direct c s i volume list response -func (m *GetDirectCSIVolumeListResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateVolumes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetDirectCSIVolumeListResponse) validateVolumes(formats strfmt.Registry) error { - if swag.IsZero(m.Volumes) { // not required - return nil - } - - for i := 0; i < len(m.Volumes); i++ { - if swag.IsZero(m.Volumes[i]) { // not required - continue - } - - if m.Volumes[i] != nil { - if err := m.Volumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get direct c s i volume list response based on the context it is used -func (m *GetDirectCSIVolumeListResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateVolumes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GetDirectCSIVolumeListResponse) contextValidateVolumes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Volumes); i++ { - - if m.Volumes[i] != nil { - if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GetDirectCSIVolumeListResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetDirectCSIVolumeListResponse) UnmarshalBinary(b []byte) error { - var res GetDirectCSIVolumeListResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/models/operator_subnet_register_api_key.go b/models/operator_subnet_register_api_key.go deleted file mode 100644 index a223b2df7..000000000 --- a/models/operator_subnet_register_api_key.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// This file is part of MinIO Console Server -// Copyright (c) 2022 MinIO, Inc. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OperatorSubnetRegisterAPIKey operator subnet register API key -// -// swagger:model operatorSubnetRegisterAPIKey -type OperatorSubnetRegisterAPIKey struct { - - // registered - Registered bool `json:"registered,omitempty"` -} - -// Validate validates this operator subnet register API key -func (m *OperatorSubnetRegisterAPIKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this operator subnet register API key based on context it is used -func (m *OperatorSubnetRegisterAPIKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OperatorSubnetRegisterAPIKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OperatorSubnetRegisterAPIKey) UnmarshalBinary(b []byte) error { - var res OperatorSubnetRegisterAPIKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/models/tier.go b/models/tier.go index b4adff56b..bcb72e1d5 100644 --- a/models/tier.go +++ b/models/tier.go @@ -43,11 +43,14 @@ type Tier struct { // gcs Gcs *TierGcs `json:"gcs,omitempty"` + // minio + Minio *TierMinio `json:"minio,omitempty"` + // s3 S3 *TierS3 `json:"s3,omitempty"` // type - // Enum: [s3 gcs azure unsupported] + // Enum: [s3 gcs azure minio unsupported] Type string `json:"type,omitempty"` } @@ -63,6 +66,10 @@ func (m *Tier) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMinio(formats); err != nil { + res = append(res, err) + } + if err := m.validateS3(formats); err != nil { res = append(res, err) } @@ -115,6 +122,25 @@ func (m *Tier) validateGcs(formats strfmt.Registry) error { return nil } +func (m *Tier) validateMinio(formats strfmt.Registry) error { + if swag.IsZero(m.Minio) { // not required + return nil + } + + if m.Minio != nil { + if err := m.Minio.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("minio") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("minio") + } + return err + } + } + + return nil +} + func (m *Tier) validateS3(formats strfmt.Registry) error { if swag.IsZero(m.S3) { // not required return nil @@ -138,7 +164,7 @@ var tierTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["s3","gcs","azure","unsupported"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["s3","gcs","azure","minio","unsupported"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -157,6 +183,9 @@ const ( // TierTypeAzure captures enum value "azure" TierTypeAzure string = "azure" + // TierTypeMinio captures enum value "minio" + TierTypeMinio string = "minio" + // TierTypeUnsupported captures enum value "unsupported" TierTypeUnsupported string = "unsupported" ) @@ -194,6 +223,10 @@ func (m *Tier) ContextValidate(ctx context.Context, formats strfmt.Registry) err res = append(res, err) } + if err := m.contextValidateMinio(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateS3(ctx, formats); err != nil { res = append(res, err) } @@ -236,6 +269,22 @@ func (m *Tier) contextValidateGcs(ctx context.Context, formats strfmt.Registry) return nil } +func (m *Tier) contextValidateMinio(ctx context.Context, formats strfmt.Registry) error { + + if m.Minio != nil { + if err := m.Minio.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("minio") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("minio") + } + return err + } + } + + return nil +} + func (m *Tier) contextValidateS3(ctx context.Context, formats strfmt.Registry) error { if m.S3 != nil { diff --git a/models/direct_c_s_i_drive_info.go b/models/tier_minio.go similarity index 54% rename from models/direct_c_s_i_drive_info.go rename to models/tier_minio.go index 40dd3ebb2..cd9da5175 100644 --- a/models/direct_c_s_i_drive_info.go +++ b/models/tier_minio.go @@ -29,45 +29,57 @@ import ( "github.com/go-openapi/swag" ) -// DirectCSIDriveInfo direct c s i drive info +// TierMinio tier minio // -// swagger:model directCSIDriveInfo -type DirectCSIDriveInfo struct { +// swagger:model tier_minio +type TierMinio struct { - // allocated - Allocated int64 `json:"allocated,omitempty"` + // accesskey + Accesskey string `json:"accesskey,omitempty"` - // capacity - Capacity int64 `json:"capacity,omitempty"` + // bucket + Bucket string `json:"bucket,omitempty"` - // drive - Drive string `json:"drive,omitempty"` + // endpoint + Endpoint string `json:"endpoint,omitempty"` - // message - Message string `json:"message,omitempty"` + // name + Name string `json:"name,omitempty"` - // node - Node string `json:"node,omitempty"` + // objects + Objects string `json:"objects,omitempty"` - // status - Status string `json:"status,omitempty"` + // prefix + Prefix string `json:"prefix,omitempty"` - // volumes - Volumes int64 `json:"volumes,omitempty"` + // region + Region string `json:"region,omitempty"` + + // secretkey + Secretkey string `json:"secretkey,omitempty"` + + // storageclass + Storageclass string `json:"storageclass,omitempty"` + + // usage + Usage string `json:"usage,omitempty"` + + // versions + Versions string `json:"versions,omitempty"` } -// Validate validates this direct c s i drive info -func (m *DirectCSIDriveInfo) Validate(formats strfmt.Registry) error { +// Validate validates this tier minio +func (m *TierMinio) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this direct c s i drive info based on context it is used -func (m *DirectCSIDriveInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this tier minio based on context it is used +func (m *TierMinio) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *DirectCSIDriveInfo) MarshalBinary() ([]byte, error) { +func (m *TierMinio) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -75,8 +87,8 @@ func (m *DirectCSIDriveInfo) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *DirectCSIDriveInfo) UnmarshalBinary(b []byte) error { - var res DirectCSIDriveInfo +func (m *TierMinio) UnmarshalBinary(b []byte) error { + var res TierMinio if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/portal-ui/src/screens/Console/Configurations/TiersConfiguration/AddTierConfiguration.tsx b/portal-ui/src/screens/Console/Configurations/TiersConfiguration/AddTierConfiguration.tsx index 767136102..fac82253b 100644 --- a/portal-ui/src/screens/Console/Configurations/TiersConfiguration/AddTierConfiguration.tsx +++ b/portal-ui/src/screens/Console/Configurations/TiersConfiguration/AddTierConfiguration.tsx @@ -142,12 +142,16 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => { let tierType = type; - if (type === "minio") { - tierType = "s3"; - } - switch (type) { case "minio": + request = { + minio: { + ...fields, + accesskey: accessKey, + secretkey: secretKey, + }, + }; + break; case "s3": request = { s3: { @@ -185,7 +189,6 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => { .invoke("POST", `/api/v1/admin/tiers`, payload) .then(() => { setSaving(false); - navigate(IAM_PAGES.TIERS); }) .catch((err: ErrorResponseHandler) => { @@ -499,19 +502,18 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => { name="region" type={type as "azure" | "s3" | "minio" | "gcs"} /> - {type === s3ServiceName || - (type === minioServiceName && ( - ) => { - setStorageClass(e.target.value); - }} - /> - ))} + {type === s3ServiceName && ( + ) => { + setStorageClass(e.target.value); + }} + /> + )} )} diff --git a/portal-ui/src/screens/Console/Configurations/TiersConfiguration/UpdateTierCredentialsModal.tsx b/portal-ui/src/screens/Console/Configurations/TiersConfiguration/UpdateTierCredentialsModal.tsx index bfe17ef7a..6d741015d 100644 --- a/portal-ui/src/screens/Console/Configurations/TiersConfiguration/UpdateTierCredentialsModal.tsx +++ b/portal-ui/src/screens/Console/Configurations/TiersConfiguration/UpdateTierCredentialsModal.tsx @@ -80,7 +80,7 @@ const UpdateTierCredentialsModal = ({ useEffect(() => { let valid = true; - if (type === "s3" || type === "azure") { + if (type === "s3" || type === "azure" || type === "minio") { if (accountName === "" || accountKey === "") { valid = false; } @@ -95,7 +95,7 @@ const UpdateTierCredentialsModal = ({ const addRecord = () => { let rules = {}; - if (type === "s3" || type === "azure") { + if (type === "s3" || type === "azure" || type === "minio") { rules = { access_key: accountName, secret_key: accountKey, @@ -144,7 +144,7 @@ const UpdateTierCredentialsModal = ({ > - {type === "s3" && ( + {(type === "s3" || type === "minio") && (
. +export interface ITierMinio { + name: string; + endpoint: string; + accesskey: string; + secretkey: string; + bucket: string; + prefix: string; + region: string; + storageclass: string; + usage: string; + objects: string; + versions: string; +} + export interface ITierS3 { name: string; endpoint: string; @@ -56,10 +70,11 @@ export interface ITierAzure { } export interface ITierElement { - type: "s3" | "gcs" | "azure" | "unsupported"; + type: "s3" | "gcs" | "azure" | "minio" | "unsupported"; s3?: ITierS3; gcs?: ITierGCS; azure?: ITierAzure; + minio?: ITierMinio; } export interface ITierResponse { diff --git a/restapi/admin_tiers.go b/restapi/admin_tiers.go index 00fe3ffea..1cf080317 100644 --- a/restapi/admin_tiers.go +++ b/restapi/admin_tiers.go @@ -70,12 +70,10 @@ func getTiers(ctx context.Context, client MinioAdmin) (*models.TierListResponse, if err != nil { return nil, err } - tiersInfo, err := client.tierStats(ctx) if err != nil { return nil, err } - var tiersList []*models.Tier for _, tierData := range tiers { @@ -112,6 +110,22 @@ func getTiers(ctx context.Context, client MinioAdmin) (*models.TierListResponse, Versions: strconv.Itoa(stats.NumVersions), }, }) + case madmin.MinIO: + tiersList = append(tiersList, &models.Tier{ + Type: models.TierTypeMinio, + Minio: &models.TierMinio{ + Accesskey: tierData.MinIO.AccessKey, + Bucket: tierData.MinIO.Bucket, + Endpoint: tierData.MinIO.Endpoint, + Name: tierData.Name, + Prefix: tierData.MinIO.Prefix, + Region: tierData.MinIO.Region, + Secretkey: tierData.MinIO.SecretKey, + Usage: humanize.IBytes(stats.TotalSize), + Objects: strconv.Itoa(stats.NumObjects), + Versions: strconv.Itoa(stats.NumVersions), + }, + }) case madmin.GCS: tiersList = append(tiersList, &models.Tier{ Type: models.TierTypeGcs, @@ -181,6 +195,7 @@ func addTier(ctx context.Context, client MinioAdmin, params *tieringApi.AddTierP var err error switch params.Body.Type { + case models.TierTypeS3: cfg, err = madmin.NewTierS3( params.Body.S3.Name, @@ -195,6 +210,19 @@ func addTier(ctx context.Context, client MinioAdmin, params *tieringApi.AddTierP if err != nil { return err } + case models.TierTypeMinio: + cfg, err = madmin.NewTierMinIO( + params.Body.Minio.Name, + params.Body.Minio.Endpoint, + params.Body.Minio.Accesskey, + params.Body.Minio.Secretkey, + params.Body.Minio.Bucket, + madmin.MinIORegion(params.Body.Minio.Region), + madmin.MinIOPrefix(params.Body.Minio.Prefix), + ) + if err != nil { + return err + } case models.TierTypeGcs: gcsOpts := []madmin.GCSOptions{} prefix := params.Body.Gcs.Prefix diff --git a/restapi/embedded_spec.go b/restapi/embedded_spec.go index 13032c538..0a4120c47 100644 --- a/restapi/embedded_spec.go +++ b/restapi/embedded_spec.go @@ -557,7 +557,8 @@ func init() { "enum": [ "s3", "gcs", - "azure" + "azure", + "minio" ], "type": "string", "name": "type", @@ -599,7 +600,8 @@ func init() { "enum": [ "s3", "gcs", - "azure" + "azure", + "minio" ], "type": "string", "name": "type", @@ -6733,6 +6735,10 @@ func init() { "type": "object", "$ref": "#/definitions/tier_gcs" }, + "minio": { + "type": "object", + "$ref": "#/definitions/tier_minio" + }, "s3": { "type": "object", "$ref": "#/definitions/tier_s3" @@ -6743,6 +6749,7 @@ func init() { "s3", "gcs", "azure", + "minio", "unsupported" ] } @@ -6841,6 +6848,44 @@ func init() { } } }, + "tier_minio": { + "type": "object", + "properties": { + "accesskey": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "objects": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "region": { + "type": "string" + }, + "secretkey": { + "type": "string" + }, + "storageclass": { + "type": "string" + }, + "usage": { + "type": "string" + }, + "versions": { + "type": "string" + } + } + }, "tier_s3": { "type": "object", "properties": { @@ -7709,7 +7754,8 @@ func init() { "enum": [ "s3", "gcs", - "azure" + "azure", + "minio" ], "type": "string", "name": "type", @@ -7751,7 +7797,8 @@ func init() { "enum": [ "s3", "gcs", - "azure" + "azure", + "minio" ], "type": "string", "name": "type", @@ -14011,6 +14058,10 @@ func init() { "type": "object", "$ref": "#/definitions/tier_gcs" }, + "minio": { + "type": "object", + "$ref": "#/definitions/tier_minio" + }, "s3": { "type": "object", "$ref": "#/definitions/tier_s3" @@ -14021,6 +14072,7 @@ func init() { "s3", "gcs", "azure", + "minio", "unsupported" ] } @@ -14119,6 +14171,44 @@ func init() { } } }, + "tier_minio": { + "type": "object", + "properties": { + "accesskey": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "objects": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "region": { + "type": "string" + }, + "secretkey": { + "type": "string" + }, + "storageclass": { + "type": "string" + }, + "usage": { + "type": "string" + }, + "versions": { + "type": "string" + } + } + }, "tier_s3": { "type": "object", "properties": { diff --git a/restapi/operations/account/account_change_password_parameters.go b/restapi/operations/account/account_change_password_parameters.go index ce7bffdc8..789648c0f 100644 --- a/restapi/operations/account/account_change_password_parameters.go +++ b/restapi/operations/account/account_change_password_parameters.go @@ -23,7 +23,6 @@ package account // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AccountChangePasswordParams) BindRequest(r *http.Request, route *middle res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/account/change_user_password_parameters.go b/restapi/operations/account/change_user_password_parameters.go index ce7016d85..fc82ba9e3 100644 --- a/restapi/operations/account/change_user_password_parameters.go +++ b/restapi/operations/account/change_user_password_parameters.go @@ -23,7 +23,6 @@ package account // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *ChangeUserPasswordParams) BindRequest(r *http.Request, route *middlewar res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/auth/login_oauth2_auth_parameters.go b/restapi/operations/auth/login_oauth2_auth_parameters.go index 83d1275c4..62cb9619b 100644 --- a/restapi/operations/auth/login_oauth2_auth_parameters.go +++ b/restapi/operations/auth/login_oauth2_auth_parameters.go @@ -23,7 +23,6 @@ package auth // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *LoginOauth2AuthParams) BindRequest(r *http.Request, route *middleware.M res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/auth/login_parameters.go b/restapi/operations/auth/login_parameters.go index 20676ef54..9c9010662 100644 --- a/restapi/operations/auth/login_parameters.go +++ b/restapi/operations/auth/login_parameters.go @@ -23,7 +23,6 @@ package auth // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *LoginParams) BindRequest(r *http.Request, route *middleware.MatchedRout res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/add_bucket_lifecycle_parameters.go b/restapi/operations/bucket/add_bucket_lifecycle_parameters.go index e0c2593f4..577274de1 100644 --- a/restapi/operations/bucket/add_bucket_lifecycle_parameters.go +++ b/restapi/operations/bucket/add_bucket_lifecycle_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *AddBucketLifecycleParams) BindRequest(r *http.Request, route *middlewar res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/add_multi_bucket_lifecycle_parameters.go b/restapi/operations/bucket/add_multi_bucket_lifecycle_parameters.go index e968fb028..b94ffb5cb 100644 --- a/restapi/operations/bucket/add_multi_bucket_lifecycle_parameters.go +++ b/restapi/operations/bucket/add_multi_bucket_lifecycle_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AddMultiBucketLifecycleParams) BindRequest(r *http.Request, route *midd res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/add_remote_bucket_parameters.go b/restapi/operations/bucket/add_remote_bucket_parameters.go index 6fc01df75..cb9f4f9ce 100644 --- a/restapi/operations/bucket/add_remote_bucket_parameters.go +++ b/restapi/operations/bucket/add_remote_bucket_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AddRemoteBucketParams) BindRequest(r *http.Request, route *middleware.M res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/bucket_set_policy_parameters.go b/restapi/operations/bucket/bucket_set_policy_parameters.go index 5578503d6..143105bf4 100644 --- a/restapi/operations/bucket/bucket_set_policy_parameters.go +++ b/restapi/operations/bucket/bucket_set_policy_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *BucketSetPolicyParams) BindRequest(r *http.Request, route *middleware.M res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/create_bucket_event_parameters.go b/restapi/operations/bucket/create_bucket_event_parameters.go index abac79732..ba245b57b 100644 --- a/restapi/operations/bucket/create_bucket_event_parameters.go +++ b/restapi/operations/bucket/create_bucket_event_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *CreateBucketEventParams) BindRequest(r *http.Request, route *middleware res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/delete_access_rule_with_bucket_parameters.go b/restapi/operations/bucket/delete_access_rule_with_bucket_parameters.go index 0c86e5f80..711bf5b5e 100644 --- a/restapi/operations/bucket/delete_access_rule_with_bucket_parameters.go +++ b/restapi/operations/bucket/delete_access_rule_with_bucket_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -94,7 +93,7 @@ func (o *DeleteAccessRuleWithBucketParams) BindRequest(r *http.Request, route *m res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/delete_bucket_event_parameters.go b/restapi/operations/bucket/delete_bucket_event_parameters.go index 5b0d34c1b..aded051c8 100644 --- a/restapi/operations/bucket/delete_bucket_event_parameters.go +++ b/restapi/operations/bucket/delete_bucket_event_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -99,7 +98,7 @@ func (o *DeleteBucketEventParams) BindRequest(r *http.Request, route *middleware res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/delete_selected_replication_rules_parameters.go b/restapi/operations/bucket/delete_selected_replication_rules_parameters.go index f10288d85..3e53a10f4 100644 --- a/restapi/operations/bucket/delete_selected_replication_rules_parameters.go +++ b/restapi/operations/bucket/delete_selected_replication_rules_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -94,7 +93,7 @@ func (o *DeleteSelectedReplicationRulesParams) BindRequest(r *http.Request, rout res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/enable_bucket_encryption_parameters.go b/restapi/operations/bucket/enable_bucket_encryption_parameters.go index 18b5658b4..ec596520f 100644 --- a/restapi/operations/bucket/enable_bucket_encryption_parameters.go +++ b/restapi/operations/bucket/enable_bucket_encryption_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *EnableBucketEncryptionParams) BindRequest(r *http.Request, route *middl res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/list_external_buckets_parameters.go b/restapi/operations/bucket/list_external_buckets_parameters.go index dffc29d26..109d716ac 100644 --- a/restapi/operations/bucket/list_external_buckets_parameters.go +++ b/restapi/operations/bucket/list_external_buckets_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *ListExternalBucketsParams) BindRequest(r *http.Request, route *middlewa res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/make_bucket_parameters.go b/restapi/operations/bucket/make_bucket_parameters.go index afdf48326..566c8e86c 100644 --- a/restapi/operations/bucket/make_bucket_parameters.go +++ b/restapi/operations/bucket/make_bucket_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *MakeBucketParams) BindRequest(r *http.Request, route *middleware.Matche res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/put_bucket_tags_parameters.go b/restapi/operations/bucket/put_bucket_tags_parameters.go index 2cee11e0a..c27668c48 100644 --- a/restapi/operations/bucket/put_bucket_tags_parameters.go +++ b/restapi/operations/bucket/put_bucket_tags_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *PutBucketTagsParams) BindRequest(r *http.Request, route *middleware.Mat res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/set_access_rule_with_bucket_parameters.go b/restapi/operations/bucket/set_access_rule_with_bucket_parameters.go index 77f7b7f5e..a0de10547 100644 --- a/restapi/operations/bucket/set_access_rule_with_bucket_parameters.go +++ b/restapi/operations/bucket/set_access_rule_with_bucket_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -94,7 +93,7 @@ func (o *SetAccessRuleWithBucketParams) BindRequest(r *http.Request, route *midd res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/set_bucket_quota_parameters.go b/restapi/operations/bucket/set_bucket_quota_parameters.go index f8327e95c..c7121b767 100644 --- a/restapi/operations/bucket/set_bucket_quota_parameters.go +++ b/restapi/operations/bucket/set_bucket_quota_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *SetBucketQuotaParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/set_bucket_retention_config_parameters.go b/restapi/operations/bucket/set_bucket_retention_config_parameters.go index 91e76d363..91dd84c8b 100644 --- a/restapi/operations/bucket/set_bucket_retention_config_parameters.go +++ b/restapi/operations/bucket/set_bucket_retention_config_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *SetBucketRetentionConfigParams) BindRequest(r *http.Request, route *mid res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/set_bucket_versioning_parameters.go b/restapi/operations/bucket/set_bucket_versioning_parameters.go index d2871f208..b837fa1e9 100644 --- a/restapi/operations/bucket/set_bucket_versioning_parameters.go +++ b/restapi/operations/bucket/set_bucket_versioning_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *SetBucketVersioningParams) BindRequest(r *http.Request, route *middlewa res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/set_multi_bucket_replication_parameters.go b/restapi/operations/bucket/set_multi_bucket_replication_parameters.go index e4af80c4b..cf1e5cd25 100644 --- a/restapi/operations/bucket/set_multi_bucket_replication_parameters.go +++ b/restapi/operations/bucket/set_multi_bucket_replication_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SetMultiBucketReplicationParams) BindRequest(r *http.Request, route *mi res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/update_bucket_lifecycle_parameters.go b/restapi/operations/bucket/update_bucket_lifecycle_parameters.go index adf880cb0..50bffbdf7 100644 --- a/restapi/operations/bucket/update_bucket_lifecycle_parameters.go +++ b/restapi/operations/bucket/update_bucket_lifecycle_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -94,7 +93,7 @@ func (o *UpdateBucketLifecycleParams) BindRequest(r *http.Request, route *middle res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/bucket/update_multi_bucket_replication_parameters.go b/restapi/operations/bucket/update_multi_bucket_replication_parameters.go index 4b2efda4c..a936e29a3 100644 --- a/restapi/operations/bucket/update_multi_bucket_replication_parameters.go +++ b/restapi/operations/bucket/update_multi_bucket_replication_parameters.go @@ -23,7 +23,6 @@ package bucket // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -94,7 +93,7 @@ func (o *UpdateMultiBucketReplicationParams) BindRequest(r *http.Request, route res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/configuration/add_notification_endpoint_parameters.go b/restapi/operations/configuration/add_notification_endpoint_parameters.go index bd98828df..da5e9b5e0 100644 --- a/restapi/operations/configuration/add_notification_endpoint_parameters.go +++ b/restapi/operations/configuration/add_notification_endpoint_parameters.go @@ -23,7 +23,6 @@ package configuration // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AddNotificationEndpointParams) BindRequest(r *http.Request, route *midd res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/configuration/set_config_parameters.go b/restapi/operations/configuration/set_config_parameters.go index c973c24c0..c99835f9c 100644 --- a/restapi/operations/configuration/set_config_parameters.go +++ b/restapi/operations/configuration/set_config_parameters.go @@ -23,7 +23,6 @@ package configuration // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *SetConfigParams) BindRequest(r *http.Request, route *middleware.Matched res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/group/add_group_parameters.go b/restapi/operations/group/add_group_parameters.go index cbfdd7c5e..a75d2db8a 100644 --- a/restapi/operations/group/add_group_parameters.go +++ b/restapi/operations/group/add_group_parameters.go @@ -23,7 +23,6 @@ package group // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AddGroupParams) BindRequest(r *http.Request, route *middleware.MatchedR res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/group/update_group_parameters.go b/restapi/operations/group/update_group_parameters.go index 66af044fc..ba224ae74 100644 --- a/restapi/operations/group/update_group_parameters.go +++ b/restapi/operations/group/update_group_parameters.go @@ -23,7 +23,6 @@ package group // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *UpdateGroupParams) BindRequest(r *http.Request, route *middleware.Match res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/object/put_object_legal_hold_parameters.go b/restapi/operations/object/put_object_legal_hold_parameters.go index 57385fa86..503ee16a6 100644 --- a/restapi/operations/object/put_object_legal_hold_parameters.go +++ b/restapi/operations/object/put_object_legal_hold_parameters.go @@ -23,7 +23,6 @@ package object // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *PutObjectLegalHoldParams) BindRequest(r *http.Request, route *middlewar res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/object/put_object_retention_parameters.go b/restapi/operations/object/put_object_retention_parameters.go index 3598c108a..3d896578a 100644 --- a/restapi/operations/object/put_object_retention_parameters.go +++ b/restapi/operations/object/put_object_retention_parameters.go @@ -23,7 +23,6 @@ package object // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *PutObjectRetentionParams) BindRequest(r *http.Request, route *middlewar res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/object/put_object_tags_parameters.go b/restapi/operations/object/put_object_tags_parameters.go index 957ea0149..53aff4939 100644 --- a/restapi/operations/object/put_object_tags_parameters.go +++ b/restapi/operations/object/put_object_tags_parameters.go @@ -23,7 +23,6 @@ package object // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -101,7 +100,7 @@ func (o *PutObjectTagsParams) BindRequest(r *http.Request, route *middleware.Mat res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/policy/add_policy_parameters.go b/restapi/operations/policy/add_policy_parameters.go index 0ff8f5b5a..3b3e7aeeb 100644 --- a/restapi/operations/policy/add_policy_parameters.go +++ b/restapi/operations/policy/add_policy_parameters.go @@ -23,7 +23,6 @@ package policy // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AddPolicyParams) BindRequest(r *http.Request, route *middleware.Matched res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/policy/set_policy_multiple_parameters.go b/restapi/operations/policy/set_policy_multiple_parameters.go index d84b27e43..7680200fc 100644 --- a/restapi/operations/policy/set_policy_multiple_parameters.go +++ b/restapi/operations/policy/set_policy_multiple_parameters.go @@ -23,7 +23,6 @@ package policy // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SetPolicyMultipleParams) BindRequest(r *http.Request, route *middleware res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/policy/set_policy_parameters.go b/restapi/operations/policy/set_policy_parameters.go index 3712ae0b1..0502a7be3 100644 --- a/restapi/operations/policy/set_policy_parameters.go +++ b/restapi/operations/policy/set_policy_parameters.go @@ -23,7 +23,6 @@ package policy // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SetPolicyParams) BindRequest(r *http.Request, route *middleware.Matched res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/profile/profiling_start_parameters.go b/restapi/operations/profile/profiling_start_parameters.go index e3a956400..703941be0 100644 --- a/restapi/operations/profile/profiling_start_parameters.go +++ b/restapi/operations/profile/profiling_start_parameters.go @@ -23,7 +23,6 @@ package profile // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *ProfilingStartParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/service_account/create_service_account_creds_parameters.go b/restapi/operations/service_account/create_service_account_creds_parameters.go index 03f4e962b..d19e81a54 100644 --- a/restapi/operations/service_account/create_service_account_creds_parameters.go +++ b/restapi/operations/service_account/create_service_account_creds_parameters.go @@ -23,7 +23,6 @@ package service_account // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *CreateServiceAccountCredsParams) BindRequest(r *http.Request, route *mi res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/service_account/create_service_account_parameters.go b/restapi/operations/service_account/create_service_account_parameters.go index dcd107913..f60876734 100644 --- a/restapi/operations/service_account/create_service_account_parameters.go +++ b/restapi/operations/service_account/create_service_account_parameters.go @@ -23,7 +23,6 @@ package service_account // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *CreateServiceAccountParams) BindRequest(r *http.Request, route *middlew res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/service_account/set_service_account_policy_parameters.go b/restapi/operations/service_account/set_service_account_policy_parameters.go index 93fa6670a..41d5468b3 100644 --- a/restapi/operations/service_account/set_service_account_policy_parameters.go +++ b/restapi/operations/service_account/set_service_account_policy_parameters.go @@ -23,7 +23,6 @@ package service_account // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -94,7 +93,7 @@ func (o *SetServiceAccountPolicyParams) BindRequest(r *http.Request, route *midd res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/site_replication/site_replication_edit_parameters.go b/restapi/operations/site_replication/site_replication_edit_parameters.go index bc7c7f7d8..f7d6b8588 100644 --- a/restapi/operations/site_replication/site_replication_edit_parameters.go +++ b/restapi/operations/site_replication/site_replication_edit_parameters.go @@ -23,7 +23,6 @@ package site_replication // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SiteReplicationEditParams) BindRequest(r *http.Request, route *middlewa res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/site_replication/site_replication_info_add_parameters.go b/restapi/operations/site_replication/site_replication_info_add_parameters.go index 8a11484df..d5360be6d 100644 --- a/restapi/operations/site_replication/site_replication_info_add_parameters.go +++ b/restapi/operations/site_replication/site_replication_info_add_parameters.go @@ -23,7 +23,6 @@ package site_replication // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SiteReplicationInfoAddParams) BindRequest(r *http.Request, route *middl res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/site_replication/site_replication_remove_parameters.go b/restapi/operations/site_replication/site_replication_remove_parameters.go index dc5dd9668..5f94255b4 100644 --- a/restapi/operations/site_replication/site_replication_remove_parameters.go +++ b/restapi/operations/site_replication/site_replication_remove_parameters.go @@ -23,7 +23,6 @@ package site_replication // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SiteReplicationRemoveParams) BindRequest(r *http.Request, route *middle res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/subnet/subnet_login_m_f_a_parameters.go b/restapi/operations/subnet/subnet_login_m_f_a_parameters.go index 516d5c528..154ddc6d9 100644 --- a/restapi/operations/subnet/subnet_login_m_f_a_parameters.go +++ b/restapi/operations/subnet/subnet_login_m_f_a_parameters.go @@ -23,7 +23,6 @@ package subnet // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SubnetLoginMFAParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/subnet/subnet_login_parameters.go b/restapi/operations/subnet/subnet_login_parameters.go index 8f54a6321..07a04b147 100644 --- a/restapi/operations/subnet/subnet_login_parameters.go +++ b/restapi/operations/subnet/subnet_login_parameters.go @@ -23,7 +23,6 @@ package subnet // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SubnetLoginParams) BindRequest(r *http.Request, route *middleware.Match res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/subnet/subnet_register_parameters.go b/restapi/operations/subnet/subnet_register_parameters.go index e196c3b61..2a24fd431 100644 --- a/restapi/operations/subnet/subnet_register_parameters.go +++ b/restapi/operations/subnet/subnet_register_parameters.go @@ -23,7 +23,6 @@ package subnet // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *SubnetRegisterParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/tiering/add_tier_parameters.go b/restapi/operations/tiering/add_tier_parameters.go index 6cc0897d0..66e3c172d 100644 --- a/restapi/operations/tiering/add_tier_parameters.go +++ b/restapi/operations/tiering/add_tier_parameters.go @@ -23,7 +23,6 @@ package tiering // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AddTierParams) BindRequest(r *http.Request, route *middleware.MatchedRo res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/tiering/edit_tier_credentials_parameters.go b/restapi/operations/tiering/edit_tier_credentials_parameters.go index 6113daabb..058aa624e 100644 --- a/restapi/operations/tiering/edit_tier_credentials_parameters.go +++ b/restapi/operations/tiering/edit_tier_credentials_parameters.go @@ -23,7 +23,6 @@ package tiering // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -94,7 +93,7 @@ func (o *EditTierCredentialsParams) BindRequest(r *http.Request, route *middlewa res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } @@ -157,7 +156,7 @@ func (o *EditTierCredentialsParams) bindType(rawData []string, hasKey bool, form // validateType carries on validations for parameter Type func (o *EditTierCredentialsParams) validateType(formats strfmt.Registry) error { - if err := validate.EnumCase("type", "path", o.Type, []interface{}{"s3", "gcs", "azure"}, true); err != nil { + if err := validate.EnumCase("type", "path", o.Type, []interface{}{"s3", "gcs", "azure", "minio"}, true); err != nil { return err } diff --git a/restapi/operations/tiering/get_tier_parameters.go b/restapi/operations/tiering/get_tier_parameters.go index dbc57e474..92723cec9 100644 --- a/restapi/operations/tiering/get_tier_parameters.go +++ b/restapi/operations/tiering/get_tier_parameters.go @@ -119,7 +119,7 @@ func (o *GetTierParams) bindType(rawData []string, hasKey bool, formats strfmt.R // validateType carries on validations for parameter Type func (o *GetTierParams) validateType(formats strfmt.Registry) error { - if err := validate.EnumCase("type", "path", o.Type, []interface{}{"s3", "gcs", "azure"}, true); err != nil { + if err := validate.EnumCase("type", "path", o.Type, []interface{}{"s3", "gcs", "azure", "minio"}, true); err != nil { return err } diff --git a/restapi/operations/user/add_user_parameters.go b/restapi/operations/user/add_user_parameters.go index e53cdd717..42b33fc7c 100644 --- a/restapi/operations/user/add_user_parameters.go +++ b/restapi/operations/user/add_user_parameters.go @@ -23,7 +23,6 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *AddUserParams) BindRequest(r *http.Request, route *middleware.MatchedRo res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/user/bulk_update_users_groups_parameters.go b/restapi/operations/user/bulk_update_users_groups_parameters.go index 709649d4d..80e9f08a4 100644 --- a/restapi/operations/user/bulk_update_users_groups_parameters.go +++ b/restapi/operations/user/bulk_update_users_groups_parameters.go @@ -23,7 +23,6 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -83,7 +82,7 @@ func (o *BulkUpdateUsersGroupsParams) BindRequest(r *http.Request, route *middle res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/user/create_a_user_service_account_parameters.go b/restapi/operations/user/create_a_user_service_account_parameters.go index f7cd4f01f..9ed0a8f2f 100644 --- a/restapi/operations/user/create_a_user_service_account_parameters.go +++ b/restapi/operations/user/create_a_user_service_account_parameters.go @@ -23,7 +23,6 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *CreateAUserServiceAccountParams) BindRequest(r *http.Request, route *mi res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/user/create_service_account_credentials_parameters.go b/restapi/operations/user/create_service_account_credentials_parameters.go index 26e83859f..82e8b3773 100644 --- a/restapi/operations/user/create_service_account_credentials_parameters.go +++ b/restapi/operations/user/create_service_account_credentials_parameters.go @@ -23,7 +23,6 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *CreateServiceAccountCredentialsParams) BindRequest(r *http.Request, rou res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/user/update_user_groups_parameters.go b/restapi/operations/user/update_user_groups_parameters.go index d64f2c145..7d12cfe55 100644 --- a/restapi/operations/user/update_user_groups_parameters.go +++ b/restapi/operations/user/update_user_groups_parameters.go @@ -23,7 +23,6 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *UpdateUserGroupsParams) BindRequest(r *http.Request, route *middleware. res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/operations/user/update_user_info_parameters.go b/restapi/operations/user/update_user_info_parameters.go index 5db1f028f..763fc940b 100644 --- a/restapi/operations/user/update_user_info_parameters.go +++ b/restapi/operations/user/update_user_info_parameters.go @@ -23,7 +23,6 @@ package user // Editing this file might prove futile when you re-run the swagger generate command import ( - "context" "io" "net/http" @@ -89,7 +88,7 @@ func (o *UpdateUserInfoParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } - ctx := validate.WithOperationRequest(context.Background()) + ctx := validate.WithOperationRequest(r.Context()) if err := body.ContextValidate(ctx, route.Formats); err != nil { res = append(res, err) } diff --git a/restapi/server.go b/restapi/server.go index 684eda5da..80cbc577a 100644 --- a/restapi/server.go +++ b/restapi/server.go @@ -25,7 +25,6 @@ import ( "crypto/x509" "errors" "fmt" - "io/ioutil" "log" "net" "net/http" @@ -291,7 +290,7 @@ func (s *Server) Serve() (err error) { if s.TLSCACertificate != "" { // include specified CA certificate - caCert, caCertErr := ioutil.ReadFile(string(s.TLSCACertificate)) + caCert, caCertErr := os.ReadFile(string(s.TLSCACertificate)) if caCertErr != nil { return caCertErr } diff --git a/swagger-console.yml b/swagger-console.yml index 125b2e2b6..2c40f85e2 100644 --- a/swagger-console.yml +++ b/swagger-console.yml @@ -2683,6 +2683,7 @@ paths: - s3 - gcs - azure + - minio - name: name in: path required: true @@ -2712,6 +2713,7 @@ paths: - s3 - gcs - azure + - minio - name: name in: path required: true @@ -4657,6 +4659,32 @@ definitions: versions: type: string + tier_minio: + type: object + properties: + name: + type: string + endpoint: + type: string + accesskey: + type: string + secretkey: + type: string + bucket: + type: string + prefix: + type: string + region: + type: string + storageclass: + type: string + usage: + type: string + objects: + type: string + versions: + type: string + tier_azure: type: object properties: @@ -4732,6 +4760,7 @@ definitions: - s3 - gcs - azure + - minio - unsupported s3: type: object @@ -4742,6 +4771,9 @@ definitions: azure: type: object $ref: "#/definitions/tier_azure" + minio: + type: object + $ref: "#/definitions/tier_minio" tierListResponse: type: object