Files
object-browser/restapi/operations/console_api.go
jinapurapu a9e82eb909 #616 added modal on icon click (#747)
* Added refresh tenant functionality

add icon to Users page to change password

commit work to date to github for ongoing use

add modal with fields for current and new password on icon click

missing swagger files

remove unneeded files

move changeUserPassword to admin_api, remove field for current password,
include selected user

Please enter the commit message for your changes. Lines starting

added missing js files

asset and function signature

formatting changes

* fixed lint

* removed Current Password field, returned Groups label, added
selectedUser to modal text

* disabled save button if newPasssword and reNewPassword don't match, removed commented out code

* Added refresh tenant functionality

add icon to Users page to change password

commit work to date to github for ongoing use

add modal with fields for current and new password on icon click

missing swagger files

remove unneeded files

move changeUserPassword to admin_api, remove field for current password,
include selected user

Please enter the commit message for your changes. Lines starting

added missing js files

asset and function signature

formatting changes

* removed Current Password field, returned Groups label, added
selectedUser to modal text

* changed Swagger parameters to camel case

Co-authored-by: Jill <jill@minio.io>
2021-06-03 15:32:22 -07:00

1707 lines
98 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2021 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 <http://www.gnu.org/licenses/>.
//
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 (
"fmt"
"net/http"
"strings"
"github.com/go-openapi/errors"
"github.com/go-openapi/loads"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/runtime/security"
"github.com/go-openapi/spec"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/minio/console/models"
"github.com/minio/console/restapi/operations/admin_api"
"github.com/minio/console/restapi/operations/operator_api"
"github.com/minio/console/restapi/operations/user_api"
)
// NewConsoleAPI creates a new Console instance
func NewConsoleAPI(spec *loads.Document) *ConsoleAPI {
return &ConsoleAPI{
handlers: make(map[string]map[string]http.Handler),
formats: strfmt.Default,
defaultConsumes: "application/json",
defaultProduces: "application/json",
customConsumers: make(map[string]runtime.Consumer),
customProducers: make(map[string]runtime.Producer),
PreServerShutdown: func() {},
ServerShutdown: func() {},
spec: spec,
ServeError: errors.ServeError,
BasicAuthenticator: security.BasicAuth,
APIKeyAuthenticator: security.APIKeyAuth,
BearerAuthenticator: security.BearerAuth,
JSONConsumer: runtime.JSONConsumer(),
MultipartformConsumer: runtime.DiscardConsumer,
BinProducer: runtime.ByteStreamProducer(),
JSONProducer: runtime.JSONProducer(),
UserAPIAccountChangePasswordHandler: user_api.AccountChangePasswordHandlerFunc(func(params user_api.AccountChangePasswordParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.AccountChangePassword has not yet been implemented")
}),
UserAPIAddBucketLifecycleHandler: user_api.AddBucketLifecycleHandlerFunc(func(params user_api.AddBucketLifecycleParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.AddBucketLifecycle has not yet been implemented")
}),
AdminAPIAddGroupHandler: admin_api.AddGroupHandlerFunc(func(params admin_api.AddGroupParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.AddGroup has not yet been implemented")
}),
AdminAPIAddNotificationEndpointHandler: admin_api.AddNotificationEndpointHandlerFunc(func(params admin_api.AddNotificationEndpointParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.AddNotificationEndpoint has not yet been implemented")
}),
AdminAPIAddPolicyHandler: admin_api.AddPolicyHandlerFunc(func(params admin_api.AddPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.AddPolicy has not yet been implemented")
}),
UserAPIAddRemoteBucketHandler: user_api.AddRemoteBucketHandlerFunc(func(params user_api.AddRemoteBucketParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.AddRemoteBucket has not yet been implemented")
}),
AdminAPIAddTierHandler: admin_api.AddTierHandlerFunc(func(params admin_api.AddTierParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.AddTier has not yet been implemented")
}),
AdminAPIAddUserHandler: admin_api.AddUserHandlerFunc(func(params admin_api.AddUserParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.AddUser has not yet been implemented")
}),
AdminAPIAdminInfoHandler: admin_api.AdminInfoHandlerFunc(func(params admin_api.AdminInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.AdminInfo has not yet been implemented")
}),
AdminAPIArnListHandler: admin_api.ArnListHandlerFunc(func(params admin_api.ArnListParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ArnList has not yet been implemented")
}),
UserAPIBucketInfoHandler: user_api.BucketInfoHandlerFunc(func(params user_api.BucketInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.BucketInfo has not yet been implemented")
}),
UserAPIBucketSetPolicyHandler: user_api.BucketSetPolicyHandlerFunc(func(params user_api.BucketSetPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.BucketSetPolicy has not yet been implemented")
}),
AdminAPIBulkUpdateUsersGroupsHandler: admin_api.BulkUpdateUsersGroupsHandlerFunc(func(params admin_api.BulkUpdateUsersGroupsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.BulkUpdateUsersGroups has not yet been implemented")
}),
AdminAPIChangeUserPasswordHandler: admin_api.ChangeUserPasswordHandlerFunc(func(params admin_api.ChangeUserPasswordParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ChangeUserPassword has not yet been implemented")
}),
AdminAPIConfigInfoHandler: admin_api.ConfigInfoHandlerFunc(func(params admin_api.ConfigInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ConfigInfo has not yet been implemented")
}),
UserAPICreateBucketEventHandler: user_api.CreateBucketEventHandlerFunc(func(params user_api.CreateBucketEventParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.CreateBucketEvent has not yet been implemented")
}),
UserAPICreateServiceAccountHandler: user_api.CreateServiceAccountHandlerFunc(func(params user_api.CreateServiceAccountParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.CreateServiceAccount has not yet been implemented")
}),
AdminAPICreateTenantHandler: admin_api.CreateTenantHandlerFunc(func(params admin_api.CreateTenantParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.CreateTenant has not yet been implemented")
}),
AdminAPIDashboardWidgetDetailsHandler: admin_api.DashboardWidgetDetailsHandlerFunc(func(params admin_api.DashboardWidgetDetailsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.DashboardWidgetDetails has not yet been implemented")
}),
UserAPIDeleteBucketHandler: user_api.DeleteBucketHandlerFunc(func(params user_api.DeleteBucketParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DeleteBucket has not yet been implemented")
}),
UserAPIDeleteBucketEventHandler: user_api.DeleteBucketEventHandlerFunc(func(params user_api.DeleteBucketEventParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DeleteBucketEvent has not yet been implemented")
}),
UserAPIDeleteBucketReplicationRuleHandler: user_api.DeleteBucketReplicationRuleHandlerFunc(func(params user_api.DeleteBucketReplicationRuleParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DeleteBucketReplicationRule has not yet been implemented")
}),
UserAPIDeleteObjectHandler: user_api.DeleteObjectHandlerFunc(func(params user_api.DeleteObjectParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DeleteObject has not yet been implemented")
}),
UserAPIDeleteObjectRetentionHandler: user_api.DeleteObjectRetentionHandlerFunc(func(params user_api.DeleteObjectRetentionParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DeleteObjectRetention has not yet been implemented")
}),
UserAPIDeleteRemoteBucketHandler: user_api.DeleteRemoteBucketHandlerFunc(func(params user_api.DeleteRemoteBucketParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DeleteRemoteBucket has not yet been implemented")
}),
UserAPIDeleteServiceAccountHandler: user_api.DeleteServiceAccountHandlerFunc(func(params user_api.DeleteServiceAccountParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DeleteServiceAccount has not yet been implemented")
}),
AdminAPIDeleteTenantHandler: admin_api.DeleteTenantHandlerFunc(func(params admin_api.DeleteTenantParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.DeleteTenant has not yet been implemented")
}),
AdminAPIDirectCSIFormatDriveHandler: admin_api.DirectCSIFormatDriveHandlerFunc(func(params admin_api.DirectCSIFormatDriveParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.DirectCSIFormatDrive has not yet been implemented")
}),
UserAPIDisableBucketEncryptionHandler: user_api.DisableBucketEncryptionHandlerFunc(func(params user_api.DisableBucketEncryptionParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DisableBucketEncryption has not yet been implemented")
}),
UserAPIDownloadObjectHandler: user_api.DownloadObjectHandlerFunc(func(params user_api.DownloadObjectParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.DownloadObject has not yet been implemented")
}),
AdminAPIEditTierCredentialsHandler: admin_api.EditTierCredentialsHandlerFunc(func(params admin_api.EditTierCredentialsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.EditTierCredentials has not yet been implemented")
}),
UserAPIEnableBucketEncryptionHandler: user_api.EnableBucketEncryptionHandlerFunc(func(params user_api.EnableBucketEncryptionParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.EnableBucketEncryption has not yet been implemented")
}),
UserAPIGetBucketEncryptionInfoHandler: user_api.GetBucketEncryptionInfoHandlerFunc(func(params user_api.GetBucketEncryptionInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.GetBucketEncryptionInfo has not yet been implemented")
}),
UserAPIGetBucketLifecycleHandler: user_api.GetBucketLifecycleHandlerFunc(func(params user_api.GetBucketLifecycleParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.GetBucketLifecycle has not yet been implemented")
}),
UserAPIGetBucketObjectLockingStatusHandler: user_api.GetBucketObjectLockingStatusHandlerFunc(func(params user_api.GetBucketObjectLockingStatusParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.GetBucketObjectLockingStatus has not yet been implemented")
}),
UserAPIGetBucketQuotaHandler: user_api.GetBucketQuotaHandlerFunc(func(params user_api.GetBucketQuotaParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.GetBucketQuota has not yet been implemented")
}),
UserAPIGetBucketReplicationHandler: user_api.GetBucketReplicationHandlerFunc(func(params user_api.GetBucketReplicationParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.GetBucketReplication has not yet been implemented")
}),
UserAPIGetBucketRetentionConfigHandler: user_api.GetBucketRetentionConfigHandlerFunc(func(params user_api.GetBucketRetentionConfigParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.GetBucketRetentionConfig has not yet been implemented")
}),
UserAPIGetBucketVersioningHandler: user_api.GetBucketVersioningHandlerFunc(func(params user_api.GetBucketVersioningParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.GetBucketVersioning has not yet been implemented")
}),
AdminAPIGetDirectCSIDriveListHandler: admin_api.GetDirectCSIDriveListHandlerFunc(func(params admin_api.GetDirectCSIDriveListParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetDirectCSIDriveList has not yet been implemented")
}),
AdminAPIGetDirectCSIVolumeListHandler: admin_api.GetDirectCSIVolumeListHandlerFunc(func(params admin_api.GetDirectCSIVolumeListParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetDirectCSIVolumeList has not yet been implemented")
}),
AdminAPIGetMaxAllocatableMemHandler: admin_api.GetMaxAllocatableMemHandlerFunc(func(params admin_api.GetMaxAllocatableMemParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetMaxAllocatableMem has not yet been implemented")
}),
AdminAPIGetParityHandler: admin_api.GetParityHandlerFunc(func(params admin_api.GetParityParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetParity has not yet been implemented")
}),
AdminAPIGetResourceQuotaHandler: admin_api.GetResourceQuotaHandlerFunc(func(params admin_api.GetResourceQuotaParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetResourceQuota has not yet been implemented")
}),
AdminAPIGetTenantPodsHandler: admin_api.GetTenantPodsHandlerFunc(func(params admin_api.GetTenantPodsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetTenantPods has not yet been implemented")
}),
AdminAPIGetTenantUsageHandler: admin_api.GetTenantUsageHandlerFunc(func(params admin_api.GetTenantUsageParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetTenantUsage has not yet been implemented")
}),
AdminAPIGetTenantYAMLHandler: admin_api.GetTenantYAMLHandlerFunc(func(params admin_api.GetTenantYAMLParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetTenantYAML has not yet been implemented")
}),
AdminAPIGetTierHandler: admin_api.GetTierHandlerFunc(func(params admin_api.GetTierParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetTier has not yet been implemented")
}),
AdminAPIGetUserInfoHandler: admin_api.GetUserInfoHandlerFunc(func(params admin_api.GetUserInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GetUserInfo has not yet been implemented")
}),
AdminAPIGroupInfoHandler: admin_api.GroupInfoHandlerFunc(func(params admin_api.GroupInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.GroupInfo has not yet been implemented")
}),
UserAPIHasPermissionToHandler: user_api.HasPermissionToHandlerFunc(func(params user_api.HasPermissionToParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.HasPermissionTo has not yet been implemented")
}),
AdminAPIListAUserServiceAccountsHandler: admin_api.ListAUserServiceAccountsHandlerFunc(func(params admin_api.ListAUserServiceAccountsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListAUserServiceAccounts has not yet been implemented")
}),
AdminAPIListAllTenantsHandler: admin_api.ListAllTenantsHandlerFunc(func(params admin_api.ListAllTenantsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListAllTenants has not yet been implemented")
}),
UserAPIListBucketEventsHandler: user_api.ListBucketEventsHandlerFunc(func(params user_api.ListBucketEventsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.ListBucketEvents has not yet been implemented")
}),
UserAPIListBucketsHandler: user_api.ListBucketsHandlerFunc(func(params user_api.ListBucketsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.ListBuckets has not yet been implemented")
}),
AdminAPIListConfigHandler: admin_api.ListConfigHandlerFunc(func(params admin_api.ListConfigParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListConfig has not yet been implemented")
}),
UserAPIListExternalBucketsHandler: user_api.ListExternalBucketsHandlerFunc(func(params user_api.ListExternalBucketsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.ListExternalBuckets has not yet been implemented")
}),
AdminAPIListGroupsHandler: admin_api.ListGroupsHandlerFunc(func(params admin_api.ListGroupsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListGroups has not yet been implemented")
}),
OperatorAPIListNodeLabelsHandler: operator_api.ListNodeLabelsHandlerFunc(func(params operator_api.ListNodeLabelsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation operator_api.ListNodeLabels has not yet been implemented")
}),
UserAPIListObjectsHandler: user_api.ListObjectsHandlerFunc(func(params user_api.ListObjectsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.ListObjects has not yet been implemented")
}),
AdminAPIListPVCsHandler: admin_api.ListPVCsHandlerFunc(func(params admin_api.ListPVCsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListPVCs has not yet been implemented")
}),
AdminAPIListPoliciesHandler: admin_api.ListPoliciesHandlerFunc(func(params admin_api.ListPoliciesParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListPolicies has not yet been implemented")
}),
AdminAPIListPoliciesWithBucketHandler: admin_api.ListPoliciesWithBucketHandlerFunc(func(params admin_api.ListPoliciesWithBucketParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListPoliciesWithBucket has not yet been implemented")
}),
UserAPIListRemoteBucketsHandler: user_api.ListRemoteBucketsHandlerFunc(func(params user_api.ListRemoteBucketsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.ListRemoteBuckets has not yet been implemented")
}),
AdminAPIListTenantsHandler: admin_api.ListTenantsHandlerFunc(func(params admin_api.ListTenantsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListTenants has not yet been implemented")
}),
UserAPIListUserServiceAccountsHandler: user_api.ListUserServiceAccountsHandlerFunc(func(params user_api.ListUserServiceAccountsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.ListUserServiceAccounts has not yet been implemented")
}),
AdminAPIListUsersHandler: admin_api.ListUsersHandlerFunc(func(params admin_api.ListUsersParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListUsers has not yet been implemented")
}),
AdminAPIListUsersForPolicyHandler: admin_api.ListUsersForPolicyHandlerFunc(func(params admin_api.ListUsersForPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListUsersForPolicy has not yet been implemented")
}),
AdminAPIListUsersWithAccessToBucketHandler: admin_api.ListUsersWithAccessToBucketHandlerFunc(func(params admin_api.ListUsersWithAccessToBucketParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ListUsersWithAccessToBucket has not yet been implemented")
}),
UserAPILogSearchHandler: user_api.LogSearchHandlerFunc(func(params user_api.LogSearchParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.LogSearch has not yet been implemented")
}),
UserAPILoginHandler: user_api.LoginHandlerFunc(func(params user_api.LoginParams) middleware.Responder {
return middleware.NotImplemented("operation user_api.Login has not yet been implemented")
}),
UserAPILoginDetailHandler: user_api.LoginDetailHandlerFunc(func(params user_api.LoginDetailParams) middleware.Responder {
return middleware.NotImplemented("operation user_api.LoginDetail has not yet been implemented")
}),
UserAPILoginOauth2AuthHandler: user_api.LoginOauth2AuthHandlerFunc(func(params user_api.LoginOauth2AuthParams) middleware.Responder {
return middleware.NotImplemented("operation user_api.LoginOauth2Auth has not yet been implemented")
}),
UserAPILoginOperatorHandler: user_api.LoginOperatorHandlerFunc(func(params user_api.LoginOperatorParams) middleware.Responder {
return middleware.NotImplemented("operation user_api.LoginOperator has not yet been implemented")
}),
UserAPILogoutHandler: user_api.LogoutHandlerFunc(func(params user_api.LogoutParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.Logout has not yet been implemented")
}),
UserAPIMakeBucketHandler: user_api.MakeBucketHandlerFunc(func(params user_api.MakeBucketParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.MakeBucket has not yet been implemented")
}),
AdminAPINotificationEndpointListHandler: admin_api.NotificationEndpointListHandlerFunc(func(params admin_api.NotificationEndpointListParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.NotificationEndpointList has not yet been implemented")
}),
AdminAPIPolicyInfoHandler: admin_api.PolicyInfoHandlerFunc(func(params admin_api.PolicyInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.PolicyInfo has not yet been implemented")
}),
UserAPIPostBucketsBucketNameObjectsUploadHandler: user_api.PostBucketsBucketNameObjectsUploadHandlerFunc(func(params user_api.PostBucketsBucketNameObjectsUploadParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.PostBucketsBucketNameObjectsUpload has not yet been implemented")
}),
AdminAPIProfilingStartHandler: admin_api.ProfilingStartHandlerFunc(func(params admin_api.ProfilingStartParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ProfilingStart has not yet been implemented")
}),
AdminAPIProfilingStopHandler: admin_api.ProfilingStopHandlerFunc(func(params admin_api.ProfilingStopParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.ProfilingStop has not yet been implemented")
}),
UserAPIPutObjectLegalHoldHandler: user_api.PutObjectLegalHoldHandlerFunc(func(params user_api.PutObjectLegalHoldParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.PutObjectLegalHold has not yet been implemented")
}),
UserAPIPutObjectRetentionHandler: user_api.PutObjectRetentionHandlerFunc(func(params user_api.PutObjectRetentionParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.PutObjectRetention has not yet been implemented")
}),
UserAPIPutObjectTagsHandler: user_api.PutObjectTagsHandlerFunc(func(params user_api.PutObjectTagsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.PutObjectTags has not yet been implemented")
}),
AdminAPIPutTenantYAMLHandler: admin_api.PutTenantYAMLHandlerFunc(func(params admin_api.PutTenantYAMLParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.PutTenantYAML has not yet been implemented")
}),
UserAPIRemoteBucketDetailsHandler: user_api.RemoteBucketDetailsHandlerFunc(func(params user_api.RemoteBucketDetailsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.RemoteBucketDetails has not yet been implemented")
}),
AdminAPIRemoveGroupHandler: admin_api.RemoveGroupHandlerFunc(func(params admin_api.RemoveGroupParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.RemoveGroup has not yet been implemented")
}),
AdminAPIRemovePolicyHandler: admin_api.RemovePolicyHandlerFunc(func(params admin_api.RemovePolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.RemovePolicy has not yet been implemented")
}),
AdminAPIRemoveUserHandler: admin_api.RemoveUserHandlerFunc(func(params admin_api.RemoveUserParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.RemoveUser has not yet been implemented")
}),
AdminAPIRestartServiceHandler: admin_api.RestartServiceHandlerFunc(func(params admin_api.RestartServiceParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.RestartService has not yet been implemented")
}),
UserAPISessionCheckHandler: user_api.SessionCheckHandlerFunc(func(params user_api.SessionCheckParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.SessionCheck has not yet been implemented")
}),
UserAPISetBucketQuotaHandler: user_api.SetBucketQuotaHandlerFunc(func(params user_api.SetBucketQuotaParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.SetBucketQuota has not yet been implemented")
}),
UserAPISetBucketRetentionConfigHandler: user_api.SetBucketRetentionConfigHandlerFunc(func(params user_api.SetBucketRetentionConfigParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.SetBucketRetentionConfig has not yet been implemented")
}),
UserAPISetBucketVersioningHandler: user_api.SetBucketVersioningHandlerFunc(func(params user_api.SetBucketVersioningParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.SetBucketVersioning has not yet been implemented")
}),
AdminAPISetConfigHandler: admin_api.SetConfigHandlerFunc(func(params admin_api.SetConfigParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SetConfig has not yet been implemented")
}),
UserAPISetMultiBucketReplicationHandler: user_api.SetMultiBucketReplicationHandlerFunc(func(params user_api.SetMultiBucketReplicationParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.SetMultiBucketReplication has not yet been implemented")
}),
AdminAPISetPolicyHandler: admin_api.SetPolicyHandlerFunc(func(params admin_api.SetPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SetPolicy has not yet been implemented")
}),
AdminAPISetPolicyMultipleHandler: admin_api.SetPolicyMultipleHandlerFunc(func(params admin_api.SetPolicyMultipleParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SetPolicyMultiple has not yet been implemented")
}),
UserAPIShareObjectHandler: user_api.ShareObjectHandlerFunc(func(params user_api.ShareObjectParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.ShareObject has not yet been implemented")
}),
AdminAPISubscriptionActivateHandler: admin_api.SubscriptionActivateHandlerFunc(func(params admin_api.SubscriptionActivateParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SubscriptionActivate has not yet been implemented")
}),
AdminAPISubscriptionInfoHandler: admin_api.SubscriptionInfoHandlerFunc(func(params admin_api.SubscriptionInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SubscriptionInfo has not yet been implemented")
}),
AdminAPISubscriptionRefreshHandler: admin_api.SubscriptionRefreshHandlerFunc(func(params admin_api.SubscriptionRefreshParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SubscriptionRefresh has not yet been implemented")
}),
AdminAPISubscriptionValidateHandler: admin_api.SubscriptionValidateHandlerFunc(func(params admin_api.SubscriptionValidateParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SubscriptionValidate has not yet been implemented")
}),
AdminAPITenantAddPoolHandler: admin_api.TenantAddPoolHandlerFunc(func(params admin_api.TenantAddPoolParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.TenantAddPool has not yet been implemented")
}),
AdminAPITenantInfoHandler: admin_api.TenantInfoHandlerFunc(func(params admin_api.TenantInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.TenantInfo has not yet been implemented")
}),
AdminAPITenantUpdateCertificateHandler: admin_api.TenantUpdateCertificateHandlerFunc(func(params admin_api.TenantUpdateCertificateParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.TenantUpdateCertificate has not yet been implemented")
}),
AdminAPITenantUpdateEncryptionHandler: admin_api.TenantUpdateEncryptionHandlerFunc(func(params admin_api.TenantUpdateEncryptionParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.TenantUpdateEncryption has not yet been implemented")
}),
AdminAPITenantUpdatePoolsHandler: admin_api.TenantUpdatePoolsHandlerFunc(func(params admin_api.TenantUpdatePoolsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.TenantUpdatePools has not yet been implemented")
}),
AdminAPITiersListHandler: admin_api.TiersListHandlerFunc(func(params admin_api.TiersListParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.TiersList has not yet been implemented")
}),
UserAPIUpdateBucketLifecycleHandler: user_api.UpdateBucketLifecycleHandlerFunc(func(params user_api.UpdateBucketLifecycleParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user_api.UpdateBucketLifecycle has not yet been implemented")
}),
AdminAPIUpdateGroupHandler: admin_api.UpdateGroupHandlerFunc(func(params admin_api.UpdateGroupParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.UpdateGroup has not yet been implemented")
}),
AdminAPIUpdateTenantHandler: admin_api.UpdateTenantHandlerFunc(func(params admin_api.UpdateTenantParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.UpdateTenant has not yet been implemented")
}),
AdminAPIUpdateUserGroupsHandler: admin_api.UpdateUserGroupsHandlerFunc(func(params admin_api.UpdateUserGroupsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.UpdateUserGroups has not yet been implemented")
}),
AdminAPIUpdateUserInfoHandler: admin_api.UpdateUserInfoHandlerFunc(func(params admin_api.UpdateUserInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.UpdateUserInfo has not yet been implemented")
}),
KeyAuth: func(token string, scopes []string) (*models.Principal, error) {
return nil, errors.NotImplemented("oauth2 bearer auth (key) has not yet been implemented")
},
// default authorizer is authorized meaning no requests are blocked
APIAuthorizer: security.Authorized(),
}
}
/*ConsoleAPI the console API */
type ConsoleAPI struct {
spec *loads.Document
context *middleware.Context
handlers map[string]map[string]http.Handler
formats strfmt.Registry
customConsumers map[string]runtime.Consumer
customProducers map[string]runtime.Producer
defaultConsumes string
defaultProduces string
Middleware func(middleware.Builder) http.Handler
// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
// It has a default implementation in the security package, however you can replace it for your particular usage.
BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator
// JSONConsumer registers a consumer for the following mime types:
// - application/json
JSONConsumer runtime.Consumer
// MultipartformConsumer registers a consumer for the following mime types:
// - multipart/form-data
MultipartformConsumer runtime.Consumer
// BinProducer registers a producer for the following mime types:
// - application/octet-stream
BinProducer runtime.Producer
// JSONProducer registers a producer for the following mime types:
// - application/json
JSONProducer runtime.Producer
// KeyAuth registers a function that takes an access token and a collection of required scopes and returns a principal
// it performs authentication based on an oauth2 bearer token provided in the request
KeyAuth func(string, []string) (*models.Principal, error)
// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
APIAuthorizer runtime.Authorizer
// UserAPIAccountChangePasswordHandler sets the operation handler for the account change password operation
UserAPIAccountChangePasswordHandler user_api.AccountChangePasswordHandler
// UserAPIAddBucketLifecycleHandler sets the operation handler for the add bucket lifecycle operation
UserAPIAddBucketLifecycleHandler user_api.AddBucketLifecycleHandler
// AdminAPIAddGroupHandler sets the operation handler for the add group operation
AdminAPIAddGroupHandler admin_api.AddGroupHandler
// AdminAPIAddNotificationEndpointHandler sets the operation handler for the add notification endpoint operation
AdminAPIAddNotificationEndpointHandler admin_api.AddNotificationEndpointHandler
// AdminAPIAddPolicyHandler sets the operation handler for the add policy operation
AdminAPIAddPolicyHandler admin_api.AddPolicyHandler
// UserAPIAddRemoteBucketHandler sets the operation handler for the add remote bucket operation
UserAPIAddRemoteBucketHandler user_api.AddRemoteBucketHandler
// AdminAPIAddTierHandler sets the operation handler for the add tier operation
AdminAPIAddTierHandler admin_api.AddTierHandler
// AdminAPIAddUserHandler sets the operation handler for the add user operation
AdminAPIAddUserHandler admin_api.AddUserHandler
// AdminAPIAdminInfoHandler sets the operation handler for the admin info operation
AdminAPIAdminInfoHandler admin_api.AdminInfoHandler
// AdminAPIArnListHandler sets the operation handler for the arn list operation
AdminAPIArnListHandler admin_api.ArnListHandler
// UserAPIBucketInfoHandler sets the operation handler for the bucket info operation
UserAPIBucketInfoHandler user_api.BucketInfoHandler
// UserAPIBucketSetPolicyHandler sets the operation handler for the bucket set policy operation
UserAPIBucketSetPolicyHandler user_api.BucketSetPolicyHandler
// AdminAPIBulkUpdateUsersGroupsHandler sets the operation handler for the bulk update users groups operation
AdminAPIBulkUpdateUsersGroupsHandler admin_api.BulkUpdateUsersGroupsHandler
// AdminAPIChangeUserPasswordHandler sets the operation handler for the change user password operation
AdminAPIChangeUserPasswordHandler admin_api.ChangeUserPasswordHandler
// AdminAPIConfigInfoHandler sets the operation handler for the config info operation
AdminAPIConfigInfoHandler admin_api.ConfigInfoHandler
// UserAPICreateBucketEventHandler sets the operation handler for the create bucket event operation
UserAPICreateBucketEventHandler user_api.CreateBucketEventHandler
// UserAPICreateServiceAccountHandler sets the operation handler for the create service account operation
UserAPICreateServiceAccountHandler user_api.CreateServiceAccountHandler
// AdminAPICreateTenantHandler sets the operation handler for the create tenant operation
AdminAPICreateTenantHandler admin_api.CreateTenantHandler
// AdminAPIDashboardWidgetDetailsHandler sets the operation handler for the dashboard widget details operation
AdminAPIDashboardWidgetDetailsHandler admin_api.DashboardWidgetDetailsHandler
// UserAPIDeleteBucketHandler sets the operation handler for the delete bucket operation
UserAPIDeleteBucketHandler user_api.DeleteBucketHandler
// UserAPIDeleteBucketEventHandler sets the operation handler for the delete bucket event operation
UserAPIDeleteBucketEventHandler user_api.DeleteBucketEventHandler
// UserAPIDeleteBucketReplicationRuleHandler sets the operation handler for the delete bucket replication rule operation
UserAPIDeleteBucketReplicationRuleHandler user_api.DeleteBucketReplicationRuleHandler
// UserAPIDeleteObjectHandler sets the operation handler for the delete object operation
UserAPIDeleteObjectHandler user_api.DeleteObjectHandler
// UserAPIDeleteObjectRetentionHandler sets the operation handler for the delete object retention operation
UserAPIDeleteObjectRetentionHandler user_api.DeleteObjectRetentionHandler
// UserAPIDeleteRemoteBucketHandler sets the operation handler for the delete remote bucket operation
UserAPIDeleteRemoteBucketHandler user_api.DeleteRemoteBucketHandler
// UserAPIDeleteServiceAccountHandler sets the operation handler for the delete service account operation
UserAPIDeleteServiceAccountHandler user_api.DeleteServiceAccountHandler
// AdminAPIDeleteTenantHandler sets the operation handler for the delete tenant operation
AdminAPIDeleteTenantHandler admin_api.DeleteTenantHandler
// AdminAPIDirectCSIFormatDriveHandler sets the operation handler for the direct c s i format drive operation
AdminAPIDirectCSIFormatDriveHandler admin_api.DirectCSIFormatDriveHandler
// UserAPIDisableBucketEncryptionHandler sets the operation handler for the disable bucket encryption operation
UserAPIDisableBucketEncryptionHandler user_api.DisableBucketEncryptionHandler
// UserAPIDownloadObjectHandler sets the operation handler for the download object operation
UserAPIDownloadObjectHandler user_api.DownloadObjectHandler
// AdminAPIEditTierCredentialsHandler sets the operation handler for the edit tier credentials operation
AdminAPIEditTierCredentialsHandler admin_api.EditTierCredentialsHandler
// UserAPIEnableBucketEncryptionHandler sets the operation handler for the enable bucket encryption operation
UserAPIEnableBucketEncryptionHandler user_api.EnableBucketEncryptionHandler
// UserAPIGetBucketEncryptionInfoHandler sets the operation handler for the get bucket encryption info operation
UserAPIGetBucketEncryptionInfoHandler user_api.GetBucketEncryptionInfoHandler
// UserAPIGetBucketLifecycleHandler sets the operation handler for the get bucket lifecycle operation
UserAPIGetBucketLifecycleHandler user_api.GetBucketLifecycleHandler
// UserAPIGetBucketObjectLockingStatusHandler sets the operation handler for the get bucket object locking status operation
UserAPIGetBucketObjectLockingStatusHandler user_api.GetBucketObjectLockingStatusHandler
// UserAPIGetBucketQuotaHandler sets the operation handler for the get bucket quota operation
UserAPIGetBucketQuotaHandler user_api.GetBucketQuotaHandler
// UserAPIGetBucketReplicationHandler sets the operation handler for the get bucket replication operation
UserAPIGetBucketReplicationHandler user_api.GetBucketReplicationHandler
// UserAPIGetBucketRetentionConfigHandler sets the operation handler for the get bucket retention config operation
UserAPIGetBucketRetentionConfigHandler user_api.GetBucketRetentionConfigHandler
// UserAPIGetBucketVersioningHandler sets the operation handler for the get bucket versioning operation
UserAPIGetBucketVersioningHandler user_api.GetBucketVersioningHandler
// AdminAPIGetDirectCSIDriveListHandler sets the operation handler for the get direct c s i drive list operation
AdminAPIGetDirectCSIDriveListHandler admin_api.GetDirectCSIDriveListHandler
// AdminAPIGetDirectCSIVolumeListHandler sets the operation handler for the get direct c s i volume list operation
AdminAPIGetDirectCSIVolumeListHandler admin_api.GetDirectCSIVolumeListHandler
// AdminAPIGetMaxAllocatableMemHandler sets the operation handler for the get max allocatable mem operation
AdminAPIGetMaxAllocatableMemHandler admin_api.GetMaxAllocatableMemHandler
// AdminAPIGetParityHandler sets the operation handler for the get parity operation
AdminAPIGetParityHandler admin_api.GetParityHandler
// AdminAPIGetResourceQuotaHandler sets the operation handler for the get resource quota operation
AdminAPIGetResourceQuotaHandler admin_api.GetResourceQuotaHandler
// AdminAPIGetTenantPodsHandler sets the operation handler for the get tenant pods operation
AdminAPIGetTenantPodsHandler admin_api.GetTenantPodsHandler
// AdminAPIGetTenantUsageHandler sets the operation handler for the get tenant usage operation
AdminAPIGetTenantUsageHandler admin_api.GetTenantUsageHandler
// AdminAPIGetTenantYAMLHandler sets the operation handler for the get tenant y a m l operation
AdminAPIGetTenantYAMLHandler admin_api.GetTenantYAMLHandler
// AdminAPIGetTierHandler sets the operation handler for the get tier operation
AdminAPIGetTierHandler admin_api.GetTierHandler
// AdminAPIGetUserInfoHandler sets the operation handler for the get user info operation
AdminAPIGetUserInfoHandler admin_api.GetUserInfoHandler
// AdminAPIGroupInfoHandler sets the operation handler for the group info operation
AdminAPIGroupInfoHandler admin_api.GroupInfoHandler
// UserAPIHasPermissionToHandler sets the operation handler for the has permission to operation
UserAPIHasPermissionToHandler user_api.HasPermissionToHandler
// AdminAPIListAUserServiceAccountsHandler sets the operation handler for the list a user service accounts operation
AdminAPIListAUserServiceAccountsHandler admin_api.ListAUserServiceAccountsHandler
// AdminAPIListAllTenantsHandler sets the operation handler for the list all tenants operation
AdminAPIListAllTenantsHandler admin_api.ListAllTenantsHandler
// UserAPIListBucketEventsHandler sets the operation handler for the list bucket events operation
UserAPIListBucketEventsHandler user_api.ListBucketEventsHandler
// UserAPIListBucketsHandler sets the operation handler for the list buckets operation
UserAPIListBucketsHandler user_api.ListBucketsHandler
// AdminAPIListConfigHandler sets the operation handler for the list config operation
AdminAPIListConfigHandler admin_api.ListConfigHandler
// UserAPIListExternalBucketsHandler sets the operation handler for the list external buckets operation
UserAPIListExternalBucketsHandler user_api.ListExternalBucketsHandler
// AdminAPIListGroupsHandler sets the operation handler for the list groups operation
AdminAPIListGroupsHandler admin_api.ListGroupsHandler
// OperatorAPIListNodeLabelsHandler sets the operation handler for the list node labels operation
OperatorAPIListNodeLabelsHandler operator_api.ListNodeLabelsHandler
// UserAPIListObjectsHandler sets the operation handler for the list objects operation
UserAPIListObjectsHandler user_api.ListObjectsHandler
// AdminAPIListPVCsHandler sets the operation handler for the list p v cs operation
AdminAPIListPVCsHandler admin_api.ListPVCsHandler
// AdminAPIListPoliciesHandler sets the operation handler for the list policies operation
AdminAPIListPoliciesHandler admin_api.ListPoliciesHandler
// AdminAPIListPoliciesWithBucketHandler sets the operation handler for the list policies with bucket operation
AdminAPIListPoliciesWithBucketHandler admin_api.ListPoliciesWithBucketHandler
// UserAPIListRemoteBucketsHandler sets the operation handler for the list remote buckets operation
UserAPIListRemoteBucketsHandler user_api.ListRemoteBucketsHandler
// AdminAPIListTenantsHandler sets the operation handler for the list tenants operation
AdminAPIListTenantsHandler admin_api.ListTenantsHandler
// UserAPIListUserServiceAccountsHandler sets the operation handler for the list user service accounts operation
UserAPIListUserServiceAccountsHandler user_api.ListUserServiceAccountsHandler
// AdminAPIListUsersHandler sets the operation handler for the list users operation
AdminAPIListUsersHandler admin_api.ListUsersHandler
// AdminAPIListUsersForPolicyHandler sets the operation handler for the list users for policy operation
AdminAPIListUsersForPolicyHandler admin_api.ListUsersForPolicyHandler
// AdminAPIListUsersWithAccessToBucketHandler sets the operation handler for the list users with access to bucket operation
AdminAPIListUsersWithAccessToBucketHandler admin_api.ListUsersWithAccessToBucketHandler
// UserAPILogSearchHandler sets the operation handler for the log search operation
UserAPILogSearchHandler user_api.LogSearchHandler
// UserAPILoginHandler sets the operation handler for the login operation
UserAPILoginHandler user_api.LoginHandler
// UserAPILoginDetailHandler sets the operation handler for the login detail operation
UserAPILoginDetailHandler user_api.LoginDetailHandler
// UserAPILoginOauth2AuthHandler sets the operation handler for the login oauth2 auth operation
UserAPILoginOauth2AuthHandler user_api.LoginOauth2AuthHandler
// UserAPILoginOperatorHandler sets the operation handler for the login operator operation
UserAPILoginOperatorHandler user_api.LoginOperatorHandler
// UserAPILogoutHandler sets the operation handler for the logout operation
UserAPILogoutHandler user_api.LogoutHandler
// UserAPIMakeBucketHandler sets the operation handler for the make bucket operation
UserAPIMakeBucketHandler user_api.MakeBucketHandler
// AdminAPINotificationEndpointListHandler sets the operation handler for the notification endpoint list operation
AdminAPINotificationEndpointListHandler admin_api.NotificationEndpointListHandler
// AdminAPIPolicyInfoHandler sets the operation handler for the policy info operation
AdminAPIPolicyInfoHandler admin_api.PolicyInfoHandler
// UserAPIPostBucketsBucketNameObjectsUploadHandler sets the operation handler for the post buckets bucket name objects upload operation
UserAPIPostBucketsBucketNameObjectsUploadHandler user_api.PostBucketsBucketNameObjectsUploadHandler
// AdminAPIProfilingStartHandler sets the operation handler for the profiling start operation
AdminAPIProfilingStartHandler admin_api.ProfilingStartHandler
// AdminAPIProfilingStopHandler sets the operation handler for the profiling stop operation
AdminAPIProfilingStopHandler admin_api.ProfilingStopHandler
// UserAPIPutObjectLegalHoldHandler sets the operation handler for the put object legal hold operation
UserAPIPutObjectLegalHoldHandler user_api.PutObjectLegalHoldHandler
// UserAPIPutObjectRetentionHandler sets the operation handler for the put object retention operation
UserAPIPutObjectRetentionHandler user_api.PutObjectRetentionHandler
// UserAPIPutObjectTagsHandler sets the operation handler for the put object tags operation
UserAPIPutObjectTagsHandler user_api.PutObjectTagsHandler
// AdminAPIPutTenantYAMLHandler sets the operation handler for the put tenant y a m l operation
AdminAPIPutTenantYAMLHandler admin_api.PutTenantYAMLHandler
// UserAPIRemoteBucketDetailsHandler sets the operation handler for the remote bucket details operation
UserAPIRemoteBucketDetailsHandler user_api.RemoteBucketDetailsHandler
// AdminAPIRemoveGroupHandler sets the operation handler for the remove group operation
AdminAPIRemoveGroupHandler admin_api.RemoveGroupHandler
// AdminAPIRemovePolicyHandler sets the operation handler for the remove policy operation
AdminAPIRemovePolicyHandler admin_api.RemovePolicyHandler
// AdminAPIRemoveUserHandler sets the operation handler for the remove user operation
AdminAPIRemoveUserHandler admin_api.RemoveUserHandler
// AdminAPIRestartServiceHandler sets the operation handler for the restart service operation
AdminAPIRestartServiceHandler admin_api.RestartServiceHandler
// UserAPISessionCheckHandler sets the operation handler for the session check operation
UserAPISessionCheckHandler user_api.SessionCheckHandler
// UserAPISetBucketQuotaHandler sets the operation handler for the set bucket quota operation
UserAPISetBucketQuotaHandler user_api.SetBucketQuotaHandler
// UserAPISetBucketRetentionConfigHandler sets the operation handler for the set bucket retention config operation
UserAPISetBucketRetentionConfigHandler user_api.SetBucketRetentionConfigHandler
// UserAPISetBucketVersioningHandler sets the operation handler for the set bucket versioning operation
UserAPISetBucketVersioningHandler user_api.SetBucketVersioningHandler
// AdminAPISetConfigHandler sets the operation handler for the set config operation
AdminAPISetConfigHandler admin_api.SetConfigHandler
// UserAPISetMultiBucketReplicationHandler sets the operation handler for the set multi bucket replication operation
UserAPISetMultiBucketReplicationHandler user_api.SetMultiBucketReplicationHandler
// AdminAPISetPolicyHandler sets the operation handler for the set policy operation
AdminAPISetPolicyHandler admin_api.SetPolicyHandler
// AdminAPISetPolicyMultipleHandler sets the operation handler for the set policy multiple operation
AdminAPISetPolicyMultipleHandler admin_api.SetPolicyMultipleHandler
// UserAPIShareObjectHandler sets the operation handler for the share object operation
UserAPIShareObjectHandler user_api.ShareObjectHandler
// AdminAPISubscriptionActivateHandler sets the operation handler for the subscription activate operation
AdminAPISubscriptionActivateHandler admin_api.SubscriptionActivateHandler
// AdminAPISubscriptionInfoHandler sets the operation handler for the subscription info operation
AdminAPISubscriptionInfoHandler admin_api.SubscriptionInfoHandler
// AdminAPISubscriptionRefreshHandler sets the operation handler for the subscription refresh operation
AdminAPISubscriptionRefreshHandler admin_api.SubscriptionRefreshHandler
// AdminAPISubscriptionValidateHandler sets the operation handler for the subscription validate operation
AdminAPISubscriptionValidateHandler admin_api.SubscriptionValidateHandler
// AdminAPITenantAddPoolHandler sets the operation handler for the tenant add pool operation
AdminAPITenantAddPoolHandler admin_api.TenantAddPoolHandler
// AdminAPITenantInfoHandler sets the operation handler for the tenant info operation
AdminAPITenantInfoHandler admin_api.TenantInfoHandler
// AdminAPITenantUpdateCertificateHandler sets the operation handler for the tenant update certificate operation
AdminAPITenantUpdateCertificateHandler admin_api.TenantUpdateCertificateHandler
// AdminAPITenantUpdateEncryptionHandler sets the operation handler for the tenant update encryption operation
AdminAPITenantUpdateEncryptionHandler admin_api.TenantUpdateEncryptionHandler
// AdminAPITenantUpdatePoolsHandler sets the operation handler for the tenant update pools operation
AdminAPITenantUpdatePoolsHandler admin_api.TenantUpdatePoolsHandler
// AdminAPITiersListHandler sets the operation handler for the tiers list operation
AdminAPITiersListHandler admin_api.TiersListHandler
// UserAPIUpdateBucketLifecycleHandler sets the operation handler for the update bucket lifecycle operation
UserAPIUpdateBucketLifecycleHandler user_api.UpdateBucketLifecycleHandler
// AdminAPIUpdateGroupHandler sets the operation handler for the update group operation
AdminAPIUpdateGroupHandler admin_api.UpdateGroupHandler
// AdminAPIUpdateTenantHandler sets the operation handler for the update tenant operation
AdminAPIUpdateTenantHandler admin_api.UpdateTenantHandler
// AdminAPIUpdateUserGroupsHandler sets the operation handler for the update user groups operation
AdminAPIUpdateUserGroupsHandler admin_api.UpdateUserGroupsHandler
// AdminAPIUpdateUserInfoHandler sets the operation handler for the update user info operation
AdminAPIUpdateUserInfoHandler admin_api.UpdateUserInfoHandler
// ServeError is called when an error is received, there is a default handler
// but you can set your own with this
ServeError func(http.ResponseWriter, *http.Request, error)
// PreServerShutdown is called before the HTTP(S) server is shutdown
// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
PreServerShutdown func()
// ServerShutdown is called when the HTTP(S) server is shut down and done
// handling all active connections and does not accept connections any more
ServerShutdown func()
// Custom command line argument groups with their descriptions
CommandLineOptionsGroups []swag.CommandLineOptionsGroup
// User defined logger function.
Logger func(string, ...interface{})
}
// SetDefaultProduces sets the default produces media type
func (o *ConsoleAPI) SetDefaultProduces(mediaType string) {
o.defaultProduces = mediaType
}
// SetDefaultConsumes returns the default consumes media type
func (o *ConsoleAPI) SetDefaultConsumes(mediaType string) {
o.defaultConsumes = mediaType
}
// SetSpec sets a spec that will be served for the clients.
func (o *ConsoleAPI) SetSpec(spec *loads.Document) {
o.spec = spec
}
// DefaultProduces returns the default produces media type
func (o *ConsoleAPI) DefaultProduces() string {
return o.defaultProduces
}
// DefaultConsumes returns the default consumes media type
func (o *ConsoleAPI) DefaultConsumes() string {
return o.defaultConsumes
}
// Formats returns the registered string formats
func (o *ConsoleAPI) Formats() strfmt.Registry {
return o.formats
}
// RegisterFormat registers a custom format validator
func (o *ConsoleAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator) {
o.formats.Add(name, format, validator)
}
// Validate validates the registrations in the ConsoleAPI
func (o *ConsoleAPI) Validate() error {
var unregistered []string
if o.JSONConsumer == nil {
unregistered = append(unregistered, "JSONConsumer")
}
if o.MultipartformConsumer == nil {
unregistered = append(unregistered, "MultipartformConsumer")
}
if o.BinProducer == nil {
unregistered = append(unregistered, "BinProducer")
}
if o.JSONProducer == nil {
unregistered = append(unregistered, "JSONProducer")
}
if o.KeyAuth == nil {
unregistered = append(unregistered, "KeyAuth")
}
if o.UserAPIAccountChangePasswordHandler == nil {
unregistered = append(unregistered, "user_api.AccountChangePasswordHandler")
}
if o.UserAPIAddBucketLifecycleHandler == nil {
unregistered = append(unregistered, "user_api.AddBucketLifecycleHandler")
}
if o.AdminAPIAddGroupHandler == nil {
unregistered = append(unregistered, "admin_api.AddGroupHandler")
}
if o.AdminAPIAddNotificationEndpointHandler == nil {
unregistered = append(unregistered, "admin_api.AddNotificationEndpointHandler")
}
if o.AdminAPIAddPolicyHandler == nil {
unregistered = append(unregistered, "admin_api.AddPolicyHandler")
}
if o.UserAPIAddRemoteBucketHandler == nil {
unregistered = append(unregistered, "user_api.AddRemoteBucketHandler")
}
if o.AdminAPIAddTierHandler == nil {
unregistered = append(unregistered, "admin_api.AddTierHandler")
}
if o.AdminAPIAddUserHandler == nil {
unregistered = append(unregistered, "admin_api.AddUserHandler")
}
if o.AdminAPIAdminInfoHandler == nil {
unregistered = append(unregistered, "admin_api.AdminInfoHandler")
}
if o.AdminAPIArnListHandler == nil {
unregistered = append(unregistered, "admin_api.ArnListHandler")
}
if o.UserAPIBucketInfoHandler == nil {
unregistered = append(unregistered, "user_api.BucketInfoHandler")
}
if o.UserAPIBucketSetPolicyHandler == nil {
unregistered = append(unregistered, "user_api.BucketSetPolicyHandler")
}
if o.AdminAPIBulkUpdateUsersGroupsHandler == nil {
unregistered = append(unregistered, "admin_api.BulkUpdateUsersGroupsHandler")
}
if o.AdminAPIChangeUserPasswordHandler == nil {
unregistered = append(unregistered, "admin_api.ChangeUserPasswordHandler")
}
if o.AdminAPIConfigInfoHandler == nil {
unregistered = append(unregistered, "admin_api.ConfigInfoHandler")
}
if o.UserAPICreateBucketEventHandler == nil {
unregistered = append(unregistered, "user_api.CreateBucketEventHandler")
}
if o.UserAPICreateServiceAccountHandler == nil {
unregistered = append(unregistered, "user_api.CreateServiceAccountHandler")
}
if o.AdminAPICreateTenantHandler == nil {
unregistered = append(unregistered, "admin_api.CreateTenantHandler")
}
if o.AdminAPIDashboardWidgetDetailsHandler == nil {
unregistered = append(unregistered, "admin_api.DashboardWidgetDetailsHandler")
}
if o.UserAPIDeleteBucketHandler == nil {
unregistered = append(unregistered, "user_api.DeleteBucketHandler")
}
if o.UserAPIDeleteBucketEventHandler == nil {
unregistered = append(unregistered, "user_api.DeleteBucketEventHandler")
}
if o.UserAPIDeleteBucketReplicationRuleHandler == nil {
unregistered = append(unregistered, "user_api.DeleteBucketReplicationRuleHandler")
}
if o.UserAPIDeleteObjectHandler == nil {
unregistered = append(unregistered, "user_api.DeleteObjectHandler")
}
if o.UserAPIDeleteObjectRetentionHandler == nil {
unregistered = append(unregistered, "user_api.DeleteObjectRetentionHandler")
}
if o.UserAPIDeleteRemoteBucketHandler == nil {
unregistered = append(unregistered, "user_api.DeleteRemoteBucketHandler")
}
if o.UserAPIDeleteServiceAccountHandler == nil {
unregistered = append(unregistered, "user_api.DeleteServiceAccountHandler")
}
if o.AdminAPIDeleteTenantHandler == nil {
unregistered = append(unregistered, "admin_api.DeleteTenantHandler")
}
if o.AdminAPIDirectCSIFormatDriveHandler == nil {
unregistered = append(unregistered, "admin_api.DirectCSIFormatDriveHandler")
}
if o.UserAPIDisableBucketEncryptionHandler == nil {
unregistered = append(unregistered, "user_api.DisableBucketEncryptionHandler")
}
if o.UserAPIDownloadObjectHandler == nil {
unregistered = append(unregistered, "user_api.DownloadObjectHandler")
}
if o.AdminAPIEditTierCredentialsHandler == nil {
unregistered = append(unregistered, "admin_api.EditTierCredentialsHandler")
}
if o.UserAPIEnableBucketEncryptionHandler == nil {
unregistered = append(unregistered, "user_api.EnableBucketEncryptionHandler")
}
if o.UserAPIGetBucketEncryptionInfoHandler == nil {
unregistered = append(unregistered, "user_api.GetBucketEncryptionInfoHandler")
}
if o.UserAPIGetBucketLifecycleHandler == nil {
unregistered = append(unregistered, "user_api.GetBucketLifecycleHandler")
}
if o.UserAPIGetBucketObjectLockingStatusHandler == nil {
unregistered = append(unregistered, "user_api.GetBucketObjectLockingStatusHandler")
}
if o.UserAPIGetBucketQuotaHandler == nil {
unregistered = append(unregistered, "user_api.GetBucketQuotaHandler")
}
if o.UserAPIGetBucketReplicationHandler == nil {
unregistered = append(unregistered, "user_api.GetBucketReplicationHandler")
}
if o.UserAPIGetBucketRetentionConfigHandler == nil {
unregistered = append(unregistered, "user_api.GetBucketRetentionConfigHandler")
}
if o.UserAPIGetBucketVersioningHandler == nil {
unregistered = append(unregistered, "user_api.GetBucketVersioningHandler")
}
if o.AdminAPIGetDirectCSIDriveListHandler == nil {
unregistered = append(unregistered, "admin_api.GetDirectCSIDriveListHandler")
}
if o.AdminAPIGetDirectCSIVolumeListHandler == nil {
unregistered = append(unregistered, "admin_api.GetDirectCSIVolumeListHandler")
}
if o.AdminAPIGetMaxAllocatableMemHandler == nil {
unregistered = append(unregistered, "admin_api.GetMaxAllocatableMemHandler")
}
if o.AdminAPIGetParityHandler == nil {
unregistered = append(unregistered, "admin_api.GetParityHandler")
}
if o.AdminAPIGetResourceQuotaHandler == nil {
unregistered = append(unregistered, "admin_api.GetResourceQuotaHandler")
}
if o.AdminAPIGetTenantPodsHandler == nil {
unregistered = append(unregistered, "admin_api.GetTenantPodsHandler")
}
if o.AdminAPIGetTenantUsageHandler == nil {
unregistered = append(unregistered, "admin_api.GetTenantUsageHandler")
}
if o.AdminAPIGetTenantYAMLHandler == nil {
unregistered = append(unregistered, "admin_api.GetTenantYAMLHandler")
}
if o.AdminAPIGetTierHandler == nil {
unregistered = append(unregistered, "admin_api.GetTierHandler")
}
if o.AdminAPIGetUserInfoHandler == nil {
unregistered = append(unregistered, "admin_api.GetUserInfoHandler")
}
if o.AdminAPIGroupInfoHandler == nil {
unregistered = append(unregistered, "admin_api.GroupInfoHandler")
}
if o.UserAPIHasPermissionToHandler == nil {
unregistered = append(unregistered, "user_api.HasPermissionToHandler")
}
if o.AdminAPIListAUserServiceAccountsHandler == nil {
unregistered = append(unregistered, "admin_api.ListAUserServiceAccountsHandler")
}
if o.AdminAPIListAllTenantsHandler == nil {
unregistered = append(unregistered, "admin_api.ListAllTenantsHandler")
}
if o.UserAPIListBucketEventsHandler == nil {
unregistered = append(unregistered, "user_api.ListBucketEventsHandler")
}
if o.UserAPIListBucketsHandler == nil {
unregistered = append(unregistered, "user_api.ListBucketsHandler")
}
if o.AdminAPIListConfigHandler == nil {
unregistered = append(unregistered, "admin_api.ListConfigHandler")
}
if o.UserAPIListExternalBucketsHandler == nil {
unregistered = append(unregistered, "user_api.ListExternalBucketsHandler")
}
if o.AdminAPIListGroupsHandler == nil {
unregistered = append(unregistered, "admin_api.ListGroupsHandler")
}
if o.OperatorAPIListNodeLabelsHandler == nil {
unregistered = append(unregistered, "operator_api.ListNodeLabelsHandler")
}
if o.UserAPIListObjectsHandler == nil {
unregistered = append(unregistered, "user_api.ListObjectsHandler")
}
if o.AdminAPIListPVCsHandler == nil {
unregistered = append(unregistered, "admin_api.ListPVCsHandler")
}
if o.AdminAPIListPoliciesHandler == nil {
unregistered = append(unregistered, "admin_api.ListPoliciesHandler")
}
if o.AdminAPIListPoliciesWithBucketHandler == nil {
unregistered = append(unregistered, "admin_api.ListPoliciesWithBucketHandler")
}
if o.UserAPIListRemoteBucketsHandler == nil {
unregistered = append(unregistered, "user_api.ListRemoteBucketsHandler")
}
if o.AdminAPIListTenantsHandler == nil {
unregistered = append(unregistered, "admin_api.ListTenantsHandler")
}
if o.UserAPIListUserServiceAccountsHandler == nil {
unregistered = append(unregistered, "user_api.ListUserServiceAccountsHandler")
}
if o.AdminAPIListUsersHandler == nil {
unregistered = append(unregistered, "admin_api.ListUsersHandler")
}
if o.AdminAPIListUsersForPolicyHandler == nil {
unregistered = append(unregistered, "admin_api.ListUsersForPolicyHandler")
}
if o.AdminAPIListUsersWithAccessToBucketHandler == nil {
unregistered = append(unregistered, "admin_api.ListUsersWithAccessToBucketHandler")
}
if o.UserAPILogSearchHandler == nil {
unregistered = append(unregistered, "user_api.LogSearchHandler")
}
if o.UserAPILoginHandler == nil {
unregistered = append(unregistered, "user_api.LoginHandler")
}
if o.UserAPILoginDetailHandler == nil {
unregistered = append(unregistered, "user_api.LoginDetailHandler")
}
if o.UserAPILoginOauth2AuthHandler == nil {
unregistered = append(unregistered, "user_api.LoginOauth2AuthHandler")
}
if o.UserAPILoginOperatorHandler == nil {
unregistered = append(unregistered, "user_api.LoginOperatorHandler")
}
if o.UserAPILogoutHandler == nil {
unregistered = append(unregistered, "user_api.LogoutHandler")
}
if o.UserAPIMakeBucketHandler == nil {
unregistered = append(unregistered, "user_api.MakeBucketHandler")
}
if o.AdminAPINotificationEndpointListHandler == nil {
unregistered = append(unregistered, "admin_api.NotificationEndpointListHandler")
}
if o.AdminAPIPolicyInfoHandler == nil {
unregistered = append(unregistered, "admin_api.PolicyInfoHandler")
}
if o.UserAPIPostBucketsBucketNameObjectsUploadHandler == nil {
unregistered = append(unregistered, "user_api.PostBucketsBucketNameObjectsUploadHandler")
}
if o.AdminAPIProfilingStartHandler == nil {
unregistered = append(unregistered, "admin_api.ProfilingStartHandler")
}
if o.AdminAPIProfilingStopHandler == nil {
unregistered = append(unregistered, "admin_api.ProfilingStopHandler")
}
if o.UserAPIPutObjectLegalHoldHandler == nil {
unregistered = append(unregistered, "user_api.PutObjectLegalHoldHandler")
}
if o.UserAPIPutObjectRetentionHandler == nil {
unregistered = append(unregistered, "user_api.PutObjectRetentionHandler")
}
if o.UserAPIPutObjectTagsHandler == nil {
unregistered = append(unregistered, "user_api.PutObjectTagsHandler")
}
if o.AdminAPIPutTenantYAMLHandler == nil {
unregistered = append(unregistered, "admin_api.PutTenantYAMLHandler")
}
if o.UserAPIRemoteBucketDetailsHandler == nil {
unregistered = append(unregistered, "user_api.RemoteBucketDetailsHandler")
}
if o.AdminAPIRemoveGroupHandler == nil {
unregistered = append(unregistered, "admin_api.RemoveGroupHandler")
}
if o.AdminAPIRemovePolicyHandler == nil {
unregistered = append(unregistered, "admin_api.RemovePolicyHandler")
}
if o.AdminAPIRemoveUserHandler == nil {
unregistered = append(unregistered, "admin_api.RemoveUserHandler")
}
if o.AdminAPIRestartServiceHandler == nil {
unregistered = append(unregistered, "admin_api.RestartServiceHandler")
}
if o.UserAPISessionCheckHandler == nil {
unregistered = append(unregistered, "user_api.SessionCheckHandler")
}
if o.UserAPISetBucketQuotaHandler == nil {
unregistered = append(unregistered, "user_api.SetBucketQuotaHandler")
}
if o.UserAPISetBucketRetentionConfigHandler == nil {
unregistered = append(unregistered, "user_api.SetBucketRetentionConfigHandler")
}
if o.UserAPISetBucketVersioningHandler == nil {
unregistered = append(unregistered, "user_api.SetBucketVersioningHandler")
}
if o.AdminAPISetConfigHandler == nil {
unregistered = append(unregistered, "admin_api.SetConfigHandler")
}
if o.UserAPISetMultiBucketReplicationHandler == nil {
unregistered = append(unregistered, "user_api.SetMultiBucketReplicationHandler")
}
if o.AdminAPISetPolicyHandler == nil {
unregistered = append(unregistered, "admin_api.SetPolicyHandler")
}
if o.AdminAPISetPolicyMultipleHandler == nil {
unregistered = append(unregistered, "admin_api.SetPolicyMultipleHandler")
}
if o.UserAPIShareObjectHandler == nil {
unregistered = append(unregistered, "user_api.ShareObjectHandler")
}
if o.AdminAPISubscriptionActivateHandler == nil {
unregistered = append(unregistered, "admin_api.SubscriptionActivateHandler")
}
if o.AdminAPISubscriptionInfoHandler == nil {
unregistered = append(unregistered, "admin_api.SubscriptionInfoHandler")
}
if o.AdminAPISubscriptionRefreshHandler == nil {
unregistered = append(unregistered, "admin_api.SubscriptionRefreshHandler")
}
if o.AdminAPISubscriptionValidateHandler == nil {
unregistered = append(unregistered, "admin_api.SubscriptionValidateHandler")
}
if o.AdminAPITenantAddPoolHandler == nil {
unregistered = append(unregistered, "admin_api.TenantAddPoolHandler")
}
if o.AdminAPITenantInfoHandler == nil {
unregistered = append(unregistered, "admin_api.TenantInfoHandler")
}
if o.AdminAPITenantUpdateCertificateHandler == nil {
unregistered = append(unregistered, "admin_api.TenantUpdateCertificateHandler")
}
if o.AdminAPITenantUpdateEncryptionHandler == nil {
unregistered = append(unregistered, "admin_api.TenantUpdateEncryptionHandler")
}
if o.AdminAPITenantUpdatePoolsHandler == nil {
unregistered = append(unregistered, "admin_api.TenantUpdatePoolsHandler")
}
if o.AdminAPITiersListHandler == nil {
unregistered = append(unregistered, "admin_api.TiersListHandler")
}
if o.UserAPIUpdateBucketLifecycleHandler == nil {
unregistered = append(unregistered, "user_api.UpdateBucketLifecycleHandler")
}
if o.AdminAPIUpdateGroupHandler == nil {
unregistered = append(unregistered, "admin_api.UpdateGroupHandler")
}
if o.AdminAPIUpdateTenantHandler == nil {
unregistered = append(unregistered, "admin_api.UpdateTenantHandler")
}
if o.AdminAPIUpdateUserGroupsHandler == nil {
unregistered = append(unregistered, "admin_api.UpdateUserGroupsHandler")
}
if o.AdminAPIUpdateUserInfoHandler == nil {
unregistered = append(unregistered, "admin_api.UpdateUserInfoHandler")
}
if len(unregistered) > 0 {
return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", "))
}
return nil
}
// ServeErrorFor gets a error handler for a given operation id
func (o *ConsoleAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error) {
return o.ServeError
}
// AuthenticatorsFor gets the authenticators for the specified security schemes
func (o *ConsoleAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator {
result := make(map[string]runtime.Authenticator)
for name := range schemes {
switch name {
case "key":
result[name] = o.BearerAuthenticator(name, func(token string, scopes []string) (interface{}, error) {
return o.KeyAuth(token, scopes)
})
}
}
return result
}
// Authorizer returns the registered authorizer
func (o *ConsoleAPI) Authorizer() runtime.Authorizer {
return o.APIAuthorizer
}
// ConsumersFor gets the consumers for the specified media types.
// MIME type parameters are ignored here.
func (o *ConsoleAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer {
result := make(map[string]runtime.Consumer, len(mediaTypes))
for _, mt := range mediaTypes {
switch mt {
case "application/json":
result["application/json"] = o.JSONConsumer
case "multipart/form-data":
result["multipart/form-data"] = o.MultipartformConsumer
}
if c, ok := o.customConsumers[mt]; ok {
result[mt] = c
}
}
return result
}
// ProducersFor gets the producers for the specified media types.
// MIME type parameters are ignored here.
func (o *ConsoleAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer {
result := make(map[string]runtime.Producer, len(mediaTypes))
for _, mt := range mediaTypes {
switch mt {
case "application/octet-stream":
result["application/octet-stream"] = o.BinProducer
case "application/json":
result["application/json"] = o.JSONProducer
}
if p, ok := o.customProducers[mt]; ok {
result[mt] = p
}
}
return result
}
// HandlerFor gets a http.Handler for the provided operation method and path
func (o *ConsoleAPI) HandlerFor(method, path string) (http.Handler, bool) {
if o.handlers == nil {
return nil, false
}
um := strings.ToUpper(method)
if _, ok := o.handlers[um]; !ok {
return nil, false
}
if path == "/" {
path = ""
}
h, ok := o.handlers[um][path]
return h, ok
}
// Context returns the middleware context for the console API
func (o *ConsoleAPI) Context() *middleware.Context {
if o.context == nil {
o.context = middleware.NewRoutableContext(o.spec, o, nil)
}
return o.context
}
func (o *ConsoleAPI) initHandlerCache() {
o.Context() // don't care about the result, just that the initialization happened
if o.handlers == nil {
o.handlers = make(map[string]map[string]http.Handler)
}
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/account/change-password"] = user_api.NewAccountChangePassword(o.context, o.UserAPIAccountChangePasswordHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/buckets/{bucket_name}/lifecycle"] = user_api.NewAddBucketLifecycle(o.context, o.UserAPIAddBucketLifecycleHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/groups"] = admin_api.NewAddGroup(o.context, o.AdminAPIAddGroupHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/admin/notification_endpoints"] = admin_api.NewAddNotificationEndpoint(o.context, o.AdminAPIAddNotificationEndpointHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/policies"] = admin_api.NewAddPolicy(o.context, o.AdminAPIAddPolicyHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/remote-buckets"] = user_api.NewAddRemoteBucket(o.context, o.UserAPIAddRemoteBucketHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/admin/tiers"] = admin_api.NewAddTier(o.context, o.AdminAPIAddTierHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/users"] = admin_api.NewAddUser(o.context, o.AdminAPIAddUserHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/info"] = admin_api.NewAdminInfo(o.context, o.AdminAPIAdminInfoHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/arns"] = admin_api.NewArnList(o.context, o.AdminAPIArnListHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{name}"] = user_api.NewBucketInfo(o.context, o.UserAPIBucketInfoHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{name}/set-policy"] = user_api.NewBucketSetPolicy(o.context, o.UserAPIBucketSetPolicyHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/users-groups-bulk"] = admin_api.NewBulkUpdateUsersGroups(o.context, o.AdminAPIBulkUpdateUsersGroupsHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/account/change-user-password"] = admin_api.NewChangeUserPassword(o.context, o.AdminAPIChangeUserPasswordHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/configs/{name}"] = admin_api.NewConfigInfo(o.context, o.AdminAPIConfigInfoHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/buckets/{bucket_name}/events"] = user_api.NewCreateBucketEvent(o.context, o.UserAPICreateBucketEventHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/service-accounts"] = user_api.NewCreateServiceAccount(o.context, o.UserAPICreateServiceAccountHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/tenants"] = admin_api.NewCreateTenant(o.context, o.AdminAPICreateTenantHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/info/widgets/{widgetId}"] = admin_api.NewDashboardWidgetDetails(o.context, o.AdminAPIDashboardWidgetDetailsHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/buckets/{name}"] = user_api.NewDeleteBucket(o.context, o.UserAPIDeleteBucketHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/buckets/{bucket_name}/events/{arn}"] = user_api.NewDeleteBucketEvent(o.context, o.UserAPIDeleteBucketEventHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/buckets/{bucket_name}/replication/{rule_id}"] = user_api.NewDeleteBucketReplicationRule(o.context, o.UserAPIDeleteBucketReplicationRuleHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/buckets/{bucket_name}/objects"] = user_api.NewDeleteObject(o.context, o.UserAPIDeleteObjectHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/buckets/{bucket_name}/objects/retention"] = user_api.NewDeleteObjectRetention(o.context, o.UserAPIDeleteObjectRetentionHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/remote-buckets/{source-bucket-name}/{arn}"] = user_api.NewDeleteRemoteBucket(o.context, o.UserAPIDeleteRemoteBucketHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/service-accounts/{access_key}"] = user_api.NewDeleteServiceAccount(o.context, o.UserAPIDeleteServiceAccountHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/namespaces/{namespace}/tenants/{tenant}"] = admin_api.NewDeleteTenant(o.context, o.AdminAPIDeleteTenantHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/direct-csi/drives/format"] = admin_api.NewDirectCSIFormatDrive(o.context, o.AdminAPIDirectCSIFormatDriveHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/buckets/{bucket_name}/encryption/disable"] = user_api.NewDisableBucketEncryption(o.context, o.UserAPIDisableBucketEncryptionHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/objects/download"] = user_api.NewDownloadObject(o.context, o.UserAPIDownloadObjectHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/admin/tiers/{type}/{name}/credentials"] = admin_api.NewEditTierCredentials(o.context, o.AdminAPIEditTierCredentialsHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/buckets/{bucket_name}/encryption/enable"] = user_api.NewEnableBucketEncryption(o.context, o.UserAPIEnableBucketEncryptionHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/encryption/info"] = user_api.NewGetBucketEncryptionInfo(o.context, o.UserAPIGetBucketEncryptionInfoHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/lifecycle"] = user_api.NewGetBucketLifecycle(o.context, o.UserAPIGetBucketLifecycleHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/object-locking"] = user_api.NewGetBucketObjectLockingStatus(o.context, o.UserAPIGetBucketObjectLockingStatusHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{name}/quota"] = user_api.NewGetBucketQuota(o.context, o.UserAPIGetBucketQuotaHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/replication"] = user_api.NewGetBucketReplication(o.context, o.UserAPIGetBucketReplicationHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/retention"] = user_api.NewGetBucketRetentionConfig(o.context, o.UserAPIGetBucketRetentionConfigHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/versioning"] = user_api.NewGetBucketVersioning(o.context, o.UserAPIGetBucketVersioningHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/direct-csi/drives"] = admin_api.NewGetDirectCSIDriveList(o.context, o.AdminAPIGetDirectCSIDriveListHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/direct-csi/volumes"] = admin_api.NewGetDirectCSIVolumeList(o.context, o.AdminAPIGetDirectCSIVolumeListHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/cluster/max-allocatable-memory"] = admin_api.NewGetMaxAllocatableMem(o.context, o.AdminAPIGetMaxAllocatableMemHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/get-parity/{nodes}/{disksPerNode}"] = admin_api.NewGetParity(o.context, o.AdminAPIGetParityHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/namespaces/{namespace}/resourcequotas/{resource-quota-name}"] = admin_api.NewGetResourceQuota(o.context, o.AdminAPIGetResourceQuotaHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/namespaces/{namespace}/tenants/{tenant}/pods"] = admin_api.NewGetTenantPods(o.context, o.AdminAPIGetTenantPodsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/namespaces/{namespace}/tenants/{tenant}/usage"] = admin_api.NewGetTenantUsage(o.context, o.AdminAPIGetTenantUsageHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/namespaces/{namespace}/tenants/{tenant}/yaml"] = admin_api.NewGetTenantYAML(o.context, o.AdminAPIGetTenantYAMLHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/tiers/{type}/{name}"] = admin_api.NewGetTier(o.context, o.AdminAPIGetTierHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/users/{name}"] = admin_api.NewGetUserInfo(o.context, o.AdminAPIGetUserInfoHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/groups/{name}"] = admin_api.NewGroupInfo(o.context, o.AdminAPIGroupInfoHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/has-permission"] = user_api.NewHasPermissionTo(o.context, o.UserAPIHasPermissionToHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/users/{name}/service-accounts"] = admin_api.NewListAUserServiceAccounts(o.context, o.AdminAPIListAUserServiceAccountsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/tenants"] = admin_api.NewListAllTenants(o.context, o.AdminAPIListAllTenantsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/events"] = user_api.NewListBucketEvents(o.context, o.UserAPIListBucketEventsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets"] = user_api.NewListBuckets(o.context, o.UserAPIListBucketsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/configs"] = admin_api.NewListConfig(o.context, o.AdminAPIListConfigHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/list-external-buckets"] = user_api.NewListExternalBuckets(o.context, o.UserAPIListExternalBucketsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/groups"] = admin_api.NewListGroups(o.context, o.AdminAPIListGroupsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/nodes/labels"] = operator_api.NewListNodeLabels(o.context, o.OperatorAPIListNodeLabelsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/objects"] = user_api.NewListObjects(o.context, o.UserAPIListObjectsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/list-pvcs"] = admin_api.NewListPVCs(o.context, o.AdminAPIListPVCsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/policies"] = admin_api.NewListPolicies(o.context, o.AdminAPIListPoliciesHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/bucket-policy/{bucket}"] = admin_api.NewListPoliciesWithBucket(o.context, o.AdminAPIListPoliciesWithBucketHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/remote-buckets"] = user_api.NewListRemoteBuckets(o.context, o.UserAPIListRemoteBucketsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/namespaces/{namespace}/tenants"] = admin_api.NewListTenants(o.context, o.AdminAPIListTenantsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/service-accounts"] = user_api.NewListUserServiceAccounts(o.context, o.UserAPIListUserServiceAccountsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/users"] = admin_api.NewListUsers(o.context, o.AdminAPIListUsersHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/policies/{policy}/users"] = admin_api.NewListUsersForPolicy(o.context, o.AdminAPIListUsersForPolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/bucket-users/{bucket}"] = admin_api.NewListUsersWithAccessToBucket(o.context, o.AdminAPIListUsersWithAccessToBucketHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/logs/search"] = user_api.NewLogSearch(o.context, o.UserAPILogSearchHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/login"] = user_api.NewLogin(o.context, o.UserAPILoginHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/login"] = user_api.NewLoginDetail(o.context, o.UserAPILoginDetailHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/login/oauth2/auth"] = user_api.NewLoginOauth2Auth(o.context, o.UserAPILoginOauth2AuthHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/login/operator"] = user_api.NewLoginOperator(o.context, o.UserAPILoginOperatorHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/logout"] = user_api.NewLogout(o.context, o.UserAPILogoutHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/buckets"] = user_api.NewMakeBucket(o.context, o.UserAPIMakeBucketHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/notification_endpoints"] = admin_api.NewNotificationEndpointList(o.context, o.AdminAPINotificationEndpointListHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/policy"] = admin_api.NewPolicyInfo(o.context, o.AdminAPIPolicyInfoHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/buckets/{bucket_name}/objects/upload"] = user_api.NewPostBucketsBucketNameObjectsUpload(o.context, o.UserAPIPostBucketsBucketNameObjectsUploadHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/profiling/start"] = admin_api.NewProfilingStart(o.context, o.AdminAPIProfilingStartHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/profiling/stop"] = admin_api.NewProfilingStop(o.context, o.AdminAPIProfilingStopHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{bucket_name}/objects/legalhold"] = user_api.NewPutObjectLegalHold(o.context, o.UserAPIPutObjectLegalHoldHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{bucket_name}/objects/retention"] = user_api.NewPutObjectRetention(o.context, o.UserAPIPutObjectRetentionHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{bucket_name}/objects/tags"] = user_api.NewPutObjectTags(o.context, o.UserAPIPutObjectTagsHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/namespaces/{namespace}/tenants/{tenant}/yaml"] = admin_api.NewPutTenantYAML(o.context, o.AdminAPIPutTenantYAMLHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/remote-buckets/{name}"] = user_api.NewRemoteBucketDetails(o.context, o.UserAPIRemoteBucketDetailsHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/groups/{name}"] = admin_api.NewRemoveGroup(o.context, o.AdminAPIRemoveGroupHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/policy"] = admin_api.NewRemovePolicy(o.context, o.AdminAPIRemovePolicyHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/users/{name}"] = admin_api.NewRemoveUser(o.context, o.AdminAPIRemoveUserHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/service/restart"] = admin_api.NewRestartService(o.context, o.AdminAPIRestartServiceHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/session"] = user_api.NewSessionCheck(o.context, o.UserAPISessionCheckHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{name}/quota"] = user_api.NewSetBucketQuota(o.context, o.UserAPISetBucketQuotaHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{bucket_name}/retention"] = user_api.NewSetBucketRetentionConfig(o.context, o.UserAPISetBucketRetentionConfigHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{bucket_name}/versioning"] = user_api.NewSetBucketVersioning(o.context, o.UserAPISetBucketVersioningHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/configs/{name}"] = admin_api.NewSetConfig(o.context, o.AdminAPISetConfigHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/buckets-replication"] = user_api.NewSetMultiBucketReplication(o.context, o.UserAPISetMultiBucketReplicationHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/set-policy/{name}"] = admin_api.NewSetPolicy(o.context, o.AdminAPISetPolicyHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/set-policy-multi/{name}"] = admin_api.NewSetPolicyMultiple(o.context, o.AdminAPISetPolicyMultipleHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/buckets/{bucket_name}/objects/share"] = user_api.NewShareObject(o.context, o.UserAPIShareObjectHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/subscription/namespaces/{namespace}/tenants/{tenant}/activate"] = admin_api.NewSubscriptionActivate(o.context, o.AdminAPISubscriptionActivateHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/subscription/info"] = admin_api.NewSubscriptionInfo(o.context, o.AdminAPISubscriptionInfoHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/subscription/refresh"] = admin_api.NewSubscriptionRefresh(o.context, o.AdminAPISubscriptionRefreshHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/subscription/validate"] = admin_api.NewSubscriptionValidate(o.context, o.AdminAPISubscriptionValidateHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/namespaces/{namespace}/tenants/{tenant}/pools"] = admin_api.NewTenantAddPool(o.context, o.AdminAPITenantAddPoolHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/namespaces/{namespace}/tenants/{tenant}"] = admin_api.NewTenantInfo(o.context, o.AdminAPITenantInfoHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/namespaces/{namespace}/tenants/{tenant}/certificates"] = admin_api.NewTenantUpdateCertificate(o.context, o.AdminAPITenantUpdateCertificateHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/namespaces/{namespace}/tenants/{tenant}/encryption"] = admin_api.NewTenantUpdateEncryption(o.context, o.AdminAPITenantUpdateEncryptionHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/namespaces/{namespace}/tenants/{tenant}/pools"] = admin_api.NewTenantUpdatePools(o.context, o.AdminAPITenantUpdatePoolsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/tiers"] = admin_api.NewTiersList(o.context, o.AdminAPITiersListHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/buckets/{bucket_name}/lifecycle/{lifecycle_id}"] = user_api.NewUpdateBucketLifecycle(o.context, o.UserAPIUpdateBucketLifecycleHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/groups/{name}"] = admin_api.NewUpdateGroup(o.context, o.AdminAPIUpdateGroupHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/namespaces/{namespace}/tenants/{tenant}"] = admin_api.NewUpdateTenant(o.context, o.AdminAPIUpdateTenantHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/users/{name}/groups"] = admin_api.NewUpdateUserGroups(o.context, o.AdminAPIUpdateUserGroupsHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/users/{name}"] = admin_api.NewUpdateUserInfo(o.context, o.AdminAPIUpdateUserInfoHandler)
}
// Serve creates a http handler to serve the API over HTTP
// can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
func (o *ConsoleAPI) Serve(builder middleware.Builder) http.Handler {
o.Init()
if o.Middleware != nil {
return o.Middleware(builder)
}
return o.context.APIHandler(builder)
}
// Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (o *ConsoleAPI) Init() {
if len(o.handlers) == 0 {
o.initHandlerCache()
}
}
// RegisterConsumer allows you to add (or override) a consumer for a media type.
func (o *ConsoleAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer) {
o.customConsumers[mediaType] = consumer
}
// RegisterProducer allows you to add (or override) a producer for a media type.
func (o *ConsoleAPI) RegisterProducer(mediaType string, producer runtime.Producer) {
o.customProducers[mediaType] = producer
}
// AddMiddlewareFor adds a http middleware to existing handler
func (o *ConsoleAPI) AddMiddlewareFor(method, path string, builder middleware.Builder) {
um := strings.ToUpper(method)
if path == "/" {
path = ""
}
o.Init()
if h, ok := o.handlers[um][path]; ok {
o.handlers[method][path] = builder(h)
}
}