constraints

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntityTypeName

func EntityTypeName[T typeWithName]() string

EntityTypeName returns the name of the entity type.

func EntityTypeNameForObj

func EntityTypeNameForObj[T typeWithName](obj T) string

EntityTypeNameForObj returns the name of the provided entity.

Types

type EntityType

type EntityType[T SupportedKonnectEntityType] interface {
	*T
	// Kubernetes Object methods
	GetObjectMeta() metav1.Object
	client.Object

	// Additional methods which are used in reconciling Konnect entities.
	GetConditions() []metav1.Condition
	SetConditions([]metav1.Condition)
	GetKonnectStatus() *konnectv1alpha1.KonnectEntityStatus
	SetKonnectID(string)
	GetTypeName() string
}

EntityType is an interface that all Konnect entity types must implement. Separating this from constraints.SupportedKonnectEntityType allows us to use EntityType where client.Object is required, since it embeds client.Object and uses pointer to refer to the constraints.SupportedKonnectEntityType.

type EntityWithKonnectAPIAuthConfigurationRef

type EntityWithKonnectAPIAuthConfigurationRef interface {
	GetKonnectAPIAuthConfigurationRef() konnectv1alpha1.KonnectAPIAuthConfigurationRef
}

EntityWithKonnectAPIAuthConfigurationRef is an interface that all Konnect entity types that reference a KonnectAPIAuthConfiguration must implement. More specifically Konnect's ControlPlane does implement that, while all the other Konnect entities that are defined within a ControlPlane do not because their KonnectAPIAuthConfigurationRef is defined in the referenced ControlPlane.

type SupportedKonnectEntityPluginReferenceableType

type SupportedKonnectEntityPluginReferenceableType interface {
	configurationv1alpha1.KongService |
		configurationv1alpha1.KongRoute |
		configurationv1.KongConsumer |
		configurationv1beta1.KongConsumerGroup

	GetTypeName() string
}

SupportedKonnectEntityPluginReferenceableType is an interface that all Konnect entity types that can be referenced by a KonnectPluginBinding must implement.

Jump to

Keyboard shortcuts

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