constraints

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 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 any] interface {
	EntityTypeObject[T]

	SetKonnectID(string)
	GetKonnectStatus() *konnectv1alpha1.KonnectEntityStatus
}

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 EntityTypeObject added in v1.5.0

type EntityTypeObject[T any] interface {
	*T

	GetObjectMeta() metav1.Object
	client.Object

	GetConditions() []metav1.Condition
	SetConditions([]metav1.Condition)
	GetTypeName() string
}

EntityTypeObject is an interface that allows non Konnect types to be used in the Konnect reconciler and its helper functions.

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 KongCredential added in v1.5.0

type KongCredential[T SupportedCredentialType] interface {
	*T
	client.Object
	GetConditions() []metav1.Condition
	SetConditions([]metav1.Condition)
}

KongCredential is a generic type constraint that all Kong credential types must implement.

type SupportedCredentialType added in v1.5.0

SupportedCredentialType is a generic type constraint that all Kong credential types must implement.

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