Documentation ¶
Index ¶
- func NewDefaultQuotaServiceFactory(amsClient ocm.AMSClient, connectionFactory *db.ConnectionFactory, ...) services.QuotaServiceFactory
- type DefaultQuotaServiceFactory
- type QuotaManagementListService
- func (q QuotaManagementListService) CheckIfQuotaIsDefinedForInstanceType(username string, organisationId string, instanceType types.KafkaInstanceType, ...) (bool, *errors.ServiceError)
- func (q QuotaManagementListService) DeleteQuota(SubscriptionId string) *errors.ServiceError
- func (q QuotaManagementListService) DeleteQuotaForBillingModel(subscriptionId string, kafkaBillingModel config.KafkaBillingModel) *errors.ServiceError
- func (q QuotaManagementListService) IsQuotaEntitlementActive(kafka *dbapi.KafkaRequest) (bool, error)
- func (q QuotaManagementListService) ReserveQuota(kafka *dbapi.KafkaRequest) (string, *errors.ServiceError)
- func (q QuotaManagementListService) ReserveQuotaIfNotAlreadyReserved(kafka *dbapi.KafkaRequest) (string, *errors.ServiceError)
- func (q QuotaManagementListService) ValidateBillingAccount(organisationId string, instanceType types.KafkaInstanceType, ...) *errors.ServiceError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultQuotaServiceFactory ¶
func NewDefaultQuotaServiceFactory( amsClient ocm.AMSClient, connectionFactory *db.ConnectionFactory, quotaManagementListConfig *quota_management.QuotaManagementListConfig, kafkaConfig *config.KafkaConfig, ) services.QuotaServiceFactory
Types ¶
type DefaultQuotaServiceFactory ¶
type DefaultQuotaServiceFactory struct {
// contains filtered or unexported fields
}
DefaultQuotaServiceFactory the default implementation for ProviderFactory
func (*DefaultQuotaServiceFactory) GetQuotaService ¶
func (factory *DefaultQuotaServiceFactory) GetQuotaService(quotaType api.QuotaType) (services.QuotaService, *errors.ServiceError)
type QuotaManagementListService ¶
type QuotaManagementListService struct {
// contains filtered or unexported fields
}
func (QuotaManagementListService) CheckIfQuotaIsDefinedForInstanceType ¶
func (q QuotaManagementListService) CheckIfQuotaIsDefinedForInstanceType(username string, organisationId string, instanceType types.KafkaInstanceType, kafkaBillingModel config.KafkaBillingModel) (bool, *errors.ServiceError)
CheckIfQuotaIsDefinedForInstanceType - returns if there is any quota configuration for the given instanceType/billingAccount pair (either organization or service account)
func (QuotaManagementListService) DeleteQuota ¶
func (q QuotaManagementListService) DeleteQuota(SubscriptionId string) *errors.ServiceError
func (QuotaManagementListService) DeleteQuotaForBillingModel ¶
func (q QuotaManagementListService) DeleteQuotaForBillingModel(subscriptionId string, kafkaBillingModel config.KafkaBillingModel) *errors.ServiceError
func (QuotaManagementListService) IsQuotaEntitlementActive ¶
func (q QuotaManagementListService) IsQuotaEntitlementActive(kafka *dbapi.KafkaRequest) (bool, error)
Checks if quota used by the given Kafka instance is granted to the organisation/user and if it is active, not expired, in the quota management list configuration Note that organisation will always take priority over individual accounts to mimic the behaviour of quota allowance checks during Kafka creation.
func (QuotaManagementListService) ReserveQuota ¶
func (q QuotaManagementListService) ReserveQuota(kafka *dbapi.KafkaRequest) (string, *errors.ServiceError)
ReserveQuota - tries to reserve the quota for the received kafka request
func (QuotaManagementListService) ReserveQuotaIfNotAlreadyReserved ¶
func (q QuotaManagementListService) ReserveQuotaIfNotAlreadyReserved(kafka *dbapi.KafkaRequest) (string, *errors.ServiceError)
func (QuotaManagementListService) ValidateBillingAccount ¶
func (q QuotaManagementListService) ValidateBillingAccount(organisationId string, instanceType types.KafkaInstanceType, billingModelID string, billingCloudAccountId string, marketplace *string) *errors.ServiceError
Source Files ¶
Click to show internal directories.
Click to hide internal directories.