handlers

package
v0.0.0-...-9b598c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterIdLength = 32
View Source
var MaxKafkaNameLength = 32
View Source
var ValidKafkaClusterNameRegexp = regexp.MustCompile(`^[a-z]([-a-z0-9]*[a-z0-9])?$`)

Functions

func GetAcceptedOrderByParams

func GetAcceptedOrderByParams() []string

func NewAdminKafkaHandler

func NewAdminKafkaHandler(kafkaService services.KafkaService, accountService account.AccountService, providerConfig *config.ProviderConfig, clusterService services.ClusterService, kafkaConfig *config.KafkaConfig,
	kafkaTLSCertificateManagementService kafkatlscertmgmt.KafkaTLSCertificateManagementService) *adminKafkaHandler

func NewAuthenticationBuilder

func NewAuthenticationBuilder(ServerConfig *server.ServerConfig, KeycloakConfig *keycloak.KeycloakConfig) (*authentication.HandlerBuilder, error)

func NewCloudProviderHandler

func NewCloudProviderHandler(cloudProvidersService services.CloudProvidersService, providerConfig *config.ProviderConfig, kafkaService services.KafkaService, clusterPlacementStrategy services.ClusterPlacementStrategy, kafkaConfig *config.KafkaConfig) *cloudProvidersHandler

func NewClusterHandler

func NewClusterHandler(kasFleetshardOperatorAddon services.KasFleetshardOperatorAddon, clusterService services.ClusterService, providerFactory clusters.ProviderFactory,
	kafkaConfig *config.KafkaConfig) *clusterHandler

func NewDataPlaneClusterHandler

func NewDataPlaneClusterHandler(dataplaneClusterService services.DataPlaneClusterService) *dataPlaneClusterHandler

func NewDataPlaneKafkaHandler

func NewDataPlaneKafkaHandler(dataPlaneKafkaService services.DataPlaneKafkaService, kafkaService services.KafkaService) *dataPlaneKafkaHandler

func NewKafkaHandler

func NewKafkaHandler(service services.KafkaService, providerConfig *config.ProviderConfig, authService authorization.Authorization, kafkaConfig *config.KafkaConfig) *kafkaHandler

func NewKafkaPromoteHandler

func NewKafkaPromoteHandler(service services.KafkaService, kafkaConfig *config.KafkaConfig, kafkaPromoteValidatorFactory KafkaPromoteValidatorFactory) *kafkaPromoteHandler

func NewMetricsHandler

func NewMetricsHandler(service services.ObservatoriumService) *metricsHandler

func NewObservatoriumProxyHandler

func NewObservatoriumProxyHandler(clusterService services.ClusterService) *observatoriumProxyHandler

func NewServiceAccountHandler

func NewServiceAccountHandler(service sso.KafkaKeycloakService) *serviceAccountsHandler

func NewSupportedKafkaInstanceTypesHandler

func NewSupportedKafkaInstanceTypesHandler(supportedKafkaInstanceTypesService services.SupportedKafkaInstanceTypesService) *supportedKafkaInstanceTypesHandler

func ValidKafkaClusterName

func ValidKafkaClusterName(value *string, field string) handlers.Validate

func ValidateBillingCloudAccountIdAndMarketplace

func ValidateBillingCloudAccountIdAndMarketplace(ctx context.Context, kafkaService services.KafkaService, kafkaRequestPayload *public.KafkaRequestPayload) handlers.Validate

func ValidateCloudProvider

func ValidateCloudProvider(ctx context.Context, kafkaService services.KafkaService, kafkaRequest *public.KafkaRequestPayload, providerConfig *config.ProviderConfig, action string) handlers.Validate

ValidateCloudProvider returns a validator that validates provided provider and region. The validation is only performed if the cluster id is not supplied in the given kafka request payload in this case the Kafka is an enterprise Kafka and we should not consider supported regions

func ValidateClusterIdIsUnique

func ValidateClusterIdIsUnique(clusterId *string, clusterService services.ClusterService) handlers.Validate

func ValidateKafkaClaims

func ValidateKafkaClaims(ctx context.Context, validations ...ValidateKafkaClaimsOptions) handlers.Validate

ValidateKafkaClaims - Verifies that the context contains the required claims

func ValidateKafkaClusterNameIsUnique

func ValidateKafkaClusterNameIsUnique(name *string, kafkaService services.KafkaService, context context.Context) handlers.Validate

ValidateKafkaClusterNameIsUnique returns a validator that validates that the kafka cluster name is unique

func ValidateKafkaPlan

func ValidateKafkaPlan(ctx context.Context, kafkaService services.KafkaService, kafkaConfig *config.KafkaConfig, kafkaRequestPayload *public.KafkaRequestPayload) handlers.Validate

ValidateKafkaPlan - validate the requested Kafka Plan

func ValidateKafkaUpdateFields

func ValidateKafkaUpdateFields(kafkaUpdateRequest *private.KafkaUpdateRequest) handlers.Validate

func ValidateKafkaUserFacingUpdateFields

func ValidateKafkaUserFacingUpdateFields(ctx context.Context, authService authorization.Authorization, kafkaRequest *dbapi.KafkaRequest, kafkaUpdateReq *public.KafkaUpdateRequest) handlers.Validate

func ValidateMaxDataRetentionSize

func ValidateMaxDataRetentionSize(kafkaRequest *dbapi.KafkaRequest, kafkaUpdateReq *private.KafkaUpdateRequest) handlers.Validate

Types

type DefaultKafkaPromoteValidatorFactory

type DefaultKafkaPromoteValidatorFactory struct {
	// contains filtered or unexported fields
}

func NewDefaultKafkaPromoteValidatorFactory

func NewDefaultKafkaPromoteValidatorFactory(
	kafkaConfig *config.KafkaConfig,
) *DefaultKafkaPromoteValidatorFactory

func (*DefaultKafkaPromoteValidatorFactory) GetValidator

func (v *DefaultKafkaPromoteValidatorFactory) GetValidator(quotaType api.QuotaType) (kafkaPromoteValidator, error)

type KafkaPromoteValidatorFactory

type KafkaPromoteValidatorFactory interface {
	GetValidator(quotaType api.QuotaType) (kafkaPromoteValidator, error)
}

type ValidateKafkaClaimsOptions

type ValidateKafkaClaimsOptions func(claims *auth.KFMClaims) *errors.ServiceError

func ValidateOrganisationId

func ValidateOrganisationId() ValidateKafkaClaimsOptions

func ValidateUsername

func ValidateUsername() ValidateKafkaClaimsOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL