Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedChecker

type AggregatedChecker struct {

	// contains filtered or unexported fields

}

AggregatedChecker is a checker which aggregates multiple checks. All checks are performed sequentially. First failed check stops further ones.

func New

func New(appFinder applicationFinder, mappingClient versioned.ApplicationconnectorV1alpha1Interface, iFind instanceFinder, apiPackagesSupport bool) *AggregatedChecker

New creates new aggregated checker

func (*AggregatedChecker) CanProvision

CanProvision performs actual check

type ApplicationMappingService

type ApplicationMappingService struct {
	// contains filtered or unexported fields

}

ApplicationMappingService provides methods which checks access based on ApplicationMapping objects.

func NewApplicationMappingService

func NewApplicationMappingService(lister emListers.ApplicationMappingLister) *ApplicationMappingService

NewApplicationMappingService creates new instance of NewApplicationMappingService

func (*ApplicationMappingService) IsApplicationEnabled

func (c *ApplicationMappingService) IsApplicationEnabled(namespace, name string) (bool, error)

IsApplicationEnabled checks, if ApplicationMapping with given name in the namespace exists

func (*ApplicationMappingService) NewServiceChecker

func (c *ApplicationMappingService) NewServiceChecker(namespace, name string) (ServiceEnabledChecker, error)

NewServiceChecker creates a ServiceEnabledChecker which is able to check if a service of an application is enabled in the namespace.

type CanProvisionOutput

type CanProvisionOutput struct {
	Allowed bool
	Reason  string
}

CanProvisionOutput aggregates following information: if provision can be performed and reason

type MappingExistsProvisionChecker

type MappingExistsProvisionChecker struct {

	// contains filtered or unexported fields

}

MappingExistsProvisionChecker is a checker which can wait some time for ApplicationMapping before it forbids provisioning

func NewMappingExistsProvisionChecker

func NewMappingExistsProvisionChecker(appFinder applicationFinder, mappingClient versioned.ApplicationconnectorV1alpha1Interface) *MappingExistsProvisionChecker

NewMappingExistsProvisionChecker creates new access checker

func (*MappingExistsProvisionChecker) CanProvision

CanProvision checks if service instance can be provisioned in the namespace

type ProvisionChecker

type ProvisionChecker interface {
	CanProvision(iID internal.InstanceID, rsID internal.ApplicationServiceID, namespace internal.Namespace, maxWaitTime time.Duration) (CanProvisionOutput, error)
}

ProvisionChecker define methods for checking if provision can succeed

type ServiceEnabledChecker

type ServiceEnabledChecker interface {
	// IsServiceEnabled returns true if the service is enabled
	IsServiceEnabled(svc internal.Service) bool
	// Returns information about checker
	IdentifyYourself() string
}

ServiceEnabledChecker provides a method to check if a Service is enabled.

type UniquenessProvisionChecker

type UniquenessProvisionChecker struct {
	InstanceFinder instanceFinder
}

UniquenessProvisionChecker is a checker which ensures that only one instance of a specific class is in namespace.

func NewUniquenessProvisionChecker

func NewUniquenessProvisionChecker(iFind instanceFinder) *UniquenessProvisionChecker

NewUniquenessProvisionChecker creates new access checker

func (*UniquenessProvisionChecker) CanProvision

CanProvision performs actual check

Directories

Path Synopsis
automock Code generated by mockery v1.0.0 Code generated by mockery v1.0.0