unstructured

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProbablyClaim

func ProbablyClaim(u *unstructured.Unstructured) bool

ProbablyClaim returns true if the supplied *Unstructured is probably a composite resource claim. It considers any namespaced resource with at least one of the fields we inject into the OpenAPI schema of resource claims set. Note that it is possible for this to produce a false negative. All of these injected fields are optional so it's possible that a claim has none of them set. Such a claim would not be functional, as indicated by not having a (composite) resource ref set.

func ProbablyComposite

func ProbablyComposite(u *unstructured.Unstructured) bool

ProbablyComposite returns true if the supplied *Unstructured is probably a composite resource. It considers any cluster scoped resource with at least one of the fields we inject into the OpenAPI schema of composite resources set. Note that it is possible for this to produce a false negative. All of these injected fields are optional so it's possible that an XR has none of them set. Such an XR would not be functional, as indicated by not having an array of composed resource refs set.

func ProbablyManaged

func ProbablyManaged(u *unstructured.Unstructured) bool

ProbablyManaged returns true if the supplied *Unstructured is probably a managed resource. It considers any cluster scoped resource with a string value at field path spec.providerConfigRef.name to probably be a managed resource. spec.providerConfigRef is technically optional, but is defaulted at create time by the CRD's OpenAPI schema.

func ProbablyProviderConfig

func ProbablyProviderConfig(u *unstructured.Unstructured) bool

ProbablyProviderConfig returns true if the supplied *Unstructured is probably a provider config. It considers any cluster scoped resource of kind: ProviderConfig to probably be a provider config.

Types

type Claim

type Claim struct {
	unstructured.Unstructured
}

An Claim composite resource claim.

func (*Claim) GetCompositionReference

func (c *Claim) GetCompositionReference() *corev1.ObjectReference

GetCompositionReference of this composite resource claim.

func (*Claim) GetCompositionSelector

func (c *Claim) GetCompositionSelector() *metav1.LabelSelector

GetCompositionSelector of this composite resource claim.

func (*Claim) GetCondition

func (c *Claim) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this composite resource claim.

func (*Claim) GetConditions

func (c *Claim) GetConditions() []xpv1.Condition

GetConditions of this composite resource claim.

func (*Claim) GetConnectionDetailsLastPublishedTime

func (c *Claim) GetConnectionDetailsLastPublishedTime() *metav1.Time

GetConnectionDetailsLastPublishedTime of this composite resource claim.

func (*Claim) GetResourceReference

func (c *Claim) GetResourceReference() *corev1.ObjectReference

GetResourceReference of this composite resource claim.

func (*Claim) GetUnstructured

func (c *Claim) GetUnstructured() *unstructured.Unstructured

GetUnstructured returns the underlying *unstructured.Unstructured.

func (*Claim) GetWriteConnectionSecretToReference

func (c *Claim) GetWriteConnectionSecretToReference() *xpv1.LocalSecretReference

GetWriteConnectionSecretToReference of this composite resource claim.

func (*Claim) SetCompositionReference

func (c *Claim) SetCompositionReference(ref *corev1.ObjectReference)

SetCompositionReference of this composite resource claim.

func (*Claim) SetCompositionSelector

func (c *Claim) SetCompositionSelector(sel *metav1.LabelSelector)

SetCompositionSelector of this composite resource claim.

func (*Claim) SetConditions

func (c *Claim) SetConditions(conditions ...xpv1.Condition)

SetConditions of this composite resource claim.

func (*Claim) SetConnectionDetailsLastPublishedTime

func (c *Claim) SetConnectionDetailsLastPublishedTime(t *metav1.Time)

SetConnectionDetailsLastPublishedTime of this composite resource claim.

func (*Claim) SetResourceReference

func (c *Claim) SetResourceReference(ref *corev1.ObjectReference)

SetResourceReference of this composite resource claim.

func (*Claim) SetWriteConnectionSecretToReference

func (c *Claim) SetWriteConnectionSecretToReference(ref *xpv1.LocalSecretReference)

SetWriteConnectionSecretToReference of this composite resource claim.

type Composite

type Composite struct {
	unstructured.Unstructured
}

A Composite resource.

func (*Composite) GetClaimReference

func (c *Composite) GetClaimReference() *corev1.ObjectReference

GetClaimReference of this Composite resource.

func (*Composite) GetCompositionReference

func (c *Composite) GetCompositionReference() *corev1.ObjectReference

GetCompositionReference of this Composite resource.

func (*Composite) GetCompositionSelector

func (c *Composite) GetCompositionSelector() *metav1.LabelSelector

GetCompositionSelector of this Composite resource.

func (*Composite) GetCondition

func (c *Composite) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this Composite resource.

func (*Composite) GetConditions

func (c *Composite) GetConditions() []xpv1.Condition

GetConditions of this Composite resource.

func (*Composite) GetConnectionDetailsLastPublishedTime

func (c *Composite) GetConnectionDetailsLastPublishedTime() *metav1.Time

GetConnectionDetailsLastPublishedTime of this Composite resource.

func (*Composite) GetResourceReferences

func (c *Composite) GetResourceReferences() []corev1.ObjectReference

GetResourceReferences of this Composite resource.

func (*Composite) GetUnstructured

func (c *Composite) GetUnstructured() *unstructured.Unstructured

GetUnstructured returns the underlying *Unstructured.

func (*Composite) GetWriteConnectionSecretToReference

func (c *Composite) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this Composite resource.

func (*Composite) SetClaimReference

func (c *Composite) SetClaimReference(ref *corev1.ObjectReference)

SetClaimReference of this Composite resource.

func (*Composite) SetCompositionReference

func (c *Composite) SetCompositionReference(ref *corev1.ObjectReference)

SetCompositionReference of this Composite resource.

func (*Composite) SetCompositionSelector

func (c *Composite) SetCompositionSelector(sel *metav1.LabelSelector)

SetCompositionSelector of this Composite resource.

func (*Composite) SetConditions

func (c *Composite) SetConditions(conditions ...xpv1.Condition)

SetConditions of this Composite resource.

func (*Composite) SetConnectionDetailsLastPublishedTime

func (c *Composite) SetConnectionDetailsLastPublishedTime(t *metav1.Time)

SetConnectionDetailsLastPublishedTime of this Composite resource.

func (*Composite) SetResourceReferences

func (c *Composite) SetResourceReferences(refs []corev1.ObjectReference)

SetResourceReferences of this Composite resource.

func (*Composite) SetWriteConnectionSecretToReference

func (c *Composite) SetWriteConnectionSecretToReference(ref *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this Composite resource.

type Managed

type Managed struct {
	unstructured.Unstructured
}

A Managed resource.

func (*Managed) GetCondition

func (u *Managed) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this managed resource.

func (*Managed) GetConditions

func (u *Managed) GetConditions() []xpv1.Condition

GetConditions of this managed resource.

func (*Managed) GetDeletionPolicy

func (u *Managed) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy of this managed resource.

func (*Managed) GetProviderConfigReference

func (u *Managed) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference of this managed resource.

func (*Managed) GetProviderReference

func (u *Managed) GetProviderReference() *xpv1.Reference

GetProviderReference of this managed resource.

func (*Managed) GetUnstructured

func (u *Managed) GetUnstructured() *unstructured.Unstructured

GetUnstructured returns the underlying *unstructured.Unstructured.

func (*Managed) GetWriteConnectionSecretToReference

func (u *Managed) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this managed resource.

func (*Managed) SetConditions

func (u *Managed) SetConditions(conditions ...xpv1.Condition)

SetConditions of this managed resource.

func (*Managed) SetDeletionPolicy

func (u *Managed) SetDeletionPolicy(p xpv1.DeletionPolicy)

SetDeletionPolicy of this managed resource.

func (*Managed) SetProviderConfigReference

func (u *Managed) SetProviderConfigReference(ref *xpv1.Reference)

SetProviderConfigReference of this managed resource.

func (*Managed) SetProviderReference

func (u *Managed) SetProviderReference(ref *xpv1.Reference)

SetProviderReference of this managed resource.

func (*Managed) SetWriteConnectionSecretToReference

func (u *Managed) SetWriteConnectionSecretToReference(ref *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this managed resource.

type ProviderConfig

type ProviderConfig struct {
	unstructured.Unstructured
}

A ProviderConfig resource.

func (*ProviderConfig) GetCondition

func (u *ProviderConfig) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this provider config.

func (*ProviderConfig) GetConditions

func (u *ProviderConfig) GetConditions() []xpv1.Condition

GetConditions of this provider config.

func (*ProviderConfig) GetUnstructured

func (u *ProviderConfig) GetUnstructured() *unstructured.Unstructured

GetUnstructured returns the underlying *Unstructured.

func (*ProviderConfig) GetUsers

func (u *ProviderConfig) GetUsers() int64

GetUsers of this provider config.

func (*ProviderConfig) SetConditions

func (u *ProviderConfig) SetConditions(conditions ...xpv1.Condition)

SetConditions of this provider config.

func (*ProviderConfig) SetUsers

func (u *ProviderConfig) SetUsers(i int64)

SetUsers of this provider config.

Jump to

Keyboard shortcuts

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