Documentation
¶
Overview ¶
Package fake provides fake Crossplane resources for use in tests.
Index ¶
- Variables
- func GVK(o runtime.Object) schema.GroupVersionKind
- func SchemeWith(o ...runtime.Object) *runtime.Scheme
- type Bindable
- type Claim
- type ClaimReferencer
- type Class
- type ClassReferencer
- type ClassSelector
- type Composed
- type ComposedResourcesReferencer
- type Composite
- type CompositeResourceReferencer
- type CompositionReferencer
- type CompositionSelector
- type Conditioned
- type ConnectionSecretWriterTo
- type CredentialsSecretReferencer
- type LocalConnectionSecretWriterTo
- type Managed
- type ManagedResourceReferencer
- type Manager
- type MockConnectionSecretOwner
- func (m *MockConnectionSecretOwner) DeepCopyObject() runtime.Object
- func (m *MockConnectionSecretOwner) GetObjectKind() schema.ObjectKind
- func (m *MockConnectionSecretOwner) GetWriteConnectionSecretToReference() *v1alpha1.SecretReference
- func (m *MockConnectionSecretOwner) SetWriteConnectionSecretToReference(r *v1alpha1.SecretReference)
- type MockLocalConnectionSecretOwner
- func (m *MockLocalConnectionSecretOwner) DeepCopyObject() runtime.Object
- func (m *MockLocalConnectionSecretOwner) GetObjectKind() schema.ObjectKind
- func (m *MockLocalConnectionSecretOwner) GetWriteConnectionSecretToReference() *v1alpha1.LocalSecretReference
- func (m *MockLocalConnectionSecretOwner) SetWriteConnectionSecretToReference(r *v1alpha1.LocalSecretReference)
- type Object
- type Provider
- type ProviderReferencer
- type Reclaimer
- type Requirement
- type RequirementReferencer
- type Target
Constants ¶
This section is empty.
Variables ¶
var GV = schema.GroupVersion{Group: "g", Version: "v"}
GV returns a mock schema.GroupVersion.
Functions ¶
Types ¶
type Bindable ¶
type Bindable struct{ Phase v1alpha1.BindingPhase }
Bindable is a mock that implements Bindable interface.
func (*Bindable) GetBindingPhase ¶
func (m *Bindable) GetBindingPhase() v1alpha1.BindingPhase
GetBindingPhase sets the BindingPhase.
func (*Bindable) SetBindingPhase ¶
func (m *Bindable) SetBindingPhase(p v1alpha1.BindingPhase)
SetBindingPhase sets the BindingPhase.
type Claim ¶
type Claim struct {
metav1.ObjectMeta
ClassSelector
ClassReferencer
ManagedResourceReferencer
LocalConnectionSecretWriterTo
v1alpha1.ConditionedStatus
v1alpha1.BindingStatus
}
Claim is a mock that implements Claim interface.
func (*Claim) DeepCopyObject ¶
DeepCopyObject returns a copy of the object as runtime.Object
func (*Claim) GetObjectKind ¶
func (m *Claim) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type ClaimReferencer ¶
type ClaimReferencer struct{ Ref *corev1.ObjectReference }
ClaimReferencer is a mock that implements ClaimReferencer interface.
func (*ClaimReferencer) GetClaimReference ¶
func (m *ClaimReferencer) GetClaimReference() *corev1.ObjectReference
GetClaimReference gets the ClaimReference.
func (*ClaimReferencer) SetClaimReference ¶
func (m *ClaimReferencer) SetClaimReference(r *corev1.ObjectReference)
SetClaimReference sets the ClaimReference.
type Class ¶
type Class struct {
metav1.ObjectMeta
Reclaimer
}
Class is a mock that implements Class interface.
func (*Class) DeepCopyObject ¶
DeepCopyObject returns a copy of the object as runtime.Object
func (*Class) GetObjectKind ¶
func (m *Class) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type ClassReferencer ¶
type ClassReferencer struct{ Ref *corev1.ObjectReference }
ClassReferencer is a mock that implements ClassReferencer interface.
func (*ClassReferencer) GetClassReference ¶
func (m *ClassReferencer) GetClassReference() *corev1.ObjectReference
GetClassReference gets the ClassReference.
func (*ClassReferencer) SetClassReference ¶
func (m *ClassReferencer) SetClassReference(r *corev1.ObjectReference)
SetClassReference sets the ClassReference.
type ClassSelector ¶
type ClassSelector struct{ Sel *metav1.LabelSelector }
ClassSelector is a mock that implements ClassSelector interface.
func (*ClassSelector) GetClassSelector ¶
func (m *ClassSelector) GetClassSelector() *metav1.LabelSelector
GetClassSelector gets the ClassSelector.
func (*ClassSelector) SetClassSelector ¶
func (m *ClassSelector) SetClassSelector(s *metav1.LabelSelector)
SetClassSelector sets the ClassSelector.
type Composed ¶ added in v0.8.0
type Composed struct {
metav1.ObjectMeta
ConnectionSecretWriterTo
v1alpha1.ConditionedStatus
}
Composed is a mock that implements Composed interface.
func (*Composed) DeepCopyObject ¶ added in v0.8.0
DeepCopyObject returns a copy of the object as runtime.Object
func (*Composed) GetObjectKind ¶ added in v0.8.0
func (m *Composed) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type ComposedResourcesReferencer ¶ added in v0.8.0
type ComposedResourcesReferencer struct{ Refs []corev1.ObjectReference }
ComposedResourcesReferencer is a mock that implements ComposedResourcesReferencer interface.
func (*ComposedResourcesReferencer) GetResourceReferences ¶ added in v0.8.0
func (m *ComposedResourcesReferencer) GetResourceReferences() []corev1.ObjectReference
GetResourceReferences gets the composed references.
func (*ComposedResourcesReferencer) SetResourceReferences ¶ added in v0.8.0
func (m *ComposedResourcesReferencer) SetResourceReferences(r []corev1.ObjectReference)
SetResourceReferences sets the composed references.
type Composite ¶ added in v0.8.0
type Composite struct {
metav1.ObjectMeta
CompositionSelector
CompositionReferencer
ComposedResourcesReferencer
RequirementReferencer
Reclaimer
ConnectionSecretWriterTo
v1alpha1.ConditionedStatus
}
Composite is a mock that implements Composite interface.
func (*Composite) DeepCopyObject ¶ added in v0.8.0
DeepCopyObject returns a copy of the object as runtime.Object
func (*Composite) GetObjectKind ¶ added in v0.8.0
func (m *Composite) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type CompositeResourceReferencer ¶ added in v0.8.0
type CompositeResourceReferencer struct{ Ref *corev1.ObjectReference }
CompositeResourceReferencer is a mock that implements CompositeResourceReferencer interface.
func (*CompositeResourceReferencer) GetResourceReference ¶ added in v0.8.0
func (m *CompositeResourceReferencer) GetResourceReference() *corev1.ObjectReference
GetResourceReference gets the composite resource reference.
func (*CompositeResourceReferencer) SetResourceReference ¶ added in v0.8.0
func (m *CompositeResourceReferencer) SetResourceReference(p *corev1.ObjectReference)
SetResourceReference sets the composite resource reference.
type CompositionReferencer ¶ added in v0.8.0
type CompositionReferencer struct{ Ref *corev1.ObjectReference }
CompositionReferencer is a mock that implements CompositionReferencer interface.
func (*CompositionReferencer) GetCompositionReference ¶ added in v0.8.0
func (m *CompositionReferencer) GetCompositionReference() *corev1.ObjectReference
GetCompositionReference gets the CompositionReference.
func (*CompositionReferencer) SetCompositionReference ¶ added in v0.8.0
func (m *CompositionReferencer) SetCompositionReference(r *corev1.ObjectReference)
SetCompositionReference sets the CompositionReference.
type CompositionSelector ¶ added in v0.8.0
type CompositionSelector struct{ Sel *metav1.LabelSelector }
CompositionSelector is a mock that implements CompositionSelector interface.
func (*CompositionSelector) GetCompositionSelector ¶ added in v0.8.0
func (m *CompositionSelector) GetCompositionSelector() *metav1.LabelSelector
GetCompositionSelector gets the CompositionSelector.
func (*CompositionSelector) SetCompositionSelector ¶ added in v0.8.0
func (m *CompositionSelector) SetCompositionSelector(s *metav1.LabelSelector)
SetCompositionSelector sets the CompositionSelector.
type Conditioned ¶
Conditioned is a mock that implements Conditioned interface.
func (*Conditioned) GetCondition ¶
func (m *Conditioned) GetCondition(ct v1alpha1.ConditionType) v1alpha1.Condition
GetCondition get the Condition with the given ConditionType.
func (*Conditioned) SetConditions ¶
func (m *Conditioned) SetConditions(c ...v1alpha1.Condition)
SetConditions sets the Conditions.
type ConnectionSecretWriterTo ¶
type ConnectionSecretWriterTo struct{ Ref *v1alpha1.SecretReference }
ConnectionSecretWriterTo is a mock that implements ConnectionSecretWriterTo interface.
func (*ConnectionSecretWriterTo) GetWriteConnectionSecretToReference ¶
func (m *ConnectionSecretWriterTo) GetWriteConnectionSecretToReference() *v1alpha1.SecretReference
GetWriteConnectionSecretToReference gets the WriteConnectionSecretToReference.
func (*ConnectionSecretWriterTo) SetWriteConnectionSecretToReference ¶
func (m *ConnectionSecretWriterTo) SetWriteConnectionSecretToReference(r *v1alpha1.SecretReference)
SetWriteConnectionSecretToReference sets the WriteConnectionSecretToReference.
type CredentialsSecretReferencer ¶
type CredentialsSecretReferencer struct{ Ref v1alpha1.SecretKeySelector }
CredentialsSecretReferencer is a mock that satisfies CredentialsSecretReferencer interface.
func (*CredentialsSecretReferencer) GetCredentialsSecretReference ¶
func (m *CredentialsSecretReferencer) GetCredentialsSecretReference() v1alpha1.SecretKeySelector
GetCredentialsSecretReference gets CredentialsSecretReference.
func (*CredentialsSecretReferencer) SetCredentialsSecretReference ¶
func (m *CredentialsSecretReferencer) SetCredentialsSecretReference(r v1alpha1.SecretKeySelector)
SetCredentialsSecretReference sets CredentialsSecretReference.
type LocalConnectionSecretWriterTo ¶
type LocalConnectionSecretWriterTo struct {
Ref *v1alpha1.LocalSecretReference
}
LocalConnectionSecretWriterTo is a mock that implements LocalConnectionSecretWriterTo interface.
func (*LocalConnectionSecretWriterTo) GetWriteConnectionSecretToReference ¶
func (m *LocalConnectionSecretWriterTo) GetWriteConnectionSecretToReference() *v1alpha1.LocalSecretReference
GetWriteConnectionSecretToReference gets the WriteConnectionSecretToReference.
func (*LocalConnectionSecretWriterTo) SetWriteConnectionSecretToReference ¶
func (m *LocalConnectionSecretWriterTo) SetWriteConnectionSecretToReference(r *v1alpha1.LocalSecretReference)
SetWriteConnectionSecretToReference sets the WriteConnectionSecretToReference.
type Managed ¶
type Managed struct {
metav1.ObjectMeta
ClassReferencer
ClaimReferencer
ProviderReferencer
ConnectionSecretWriterTo
Reclaimer
v1alpha1.ConditionedStatus
v1alpha1.BindingStatus
}
Managed is a mock that implements Managed interface.
func (*Managed) DeepCopyObject ¶
DeepCopyObject returns a copy of the object as runtime.Object
func (*Managed) GetObjectKind ¶
func (m *Managed) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type ManagedResourceReferencer ¶
type ManagedResourceReferencer struct{ Ref *corev1.ObjectReference }
ManagedResourceReferencer is a mock that implements ManagedResourceReferencer interface.
func (*ManagedResourceReferencer) GetResourceReference ¶
func (m *ManagedResourceReferencer) GetResourceReference() *corev1.ObjectReference
GetResourceReference gets the ResourceReference.
func (*ManagedResourceReferencer) SetResourceReference ¶
func (m *ManagedResourceReferencer) SetResourceReference(r *corev1.ObjectReference)
SetResourceReference sets the ResourceReference.
type Manager ¶
type Manager struct {
manager.Manager
Client client.Client
Scheme *runtime.Scheme
Config *rest.Config
RESTMapper meta.RESTMapper
}
Manager is a mock object that satisfies manager.Manager interface.
func (*Manager) Elected ¶ added in v0.8.0
func (m *Manager) Elected() <-chan struct{}
Elected returns a closed channel.
func (*Manager) GetRESTMapper ¶ added in v0.8.0
func (m *Manager) GetRESTMapper() meta.RESTMapper
GetRESTMapper returns the REST mapper.
type MockConnectionSecretOwner ¶ added in v0.8.0
type MockConnectionSecretOwner struct {
runtime.Object
metav1.ObjectMeta
Ref *v1alpha1.SecretReference
}
MockConnectionSecretOwner is a mock object that satisfies ConnectionSecretOwner interface.
func (*MockConnectionSecretOwner) DeepCopyObject ¶ added in v0.8.0
func (m *MockConnectionSecretOwner) DeepCopyObject() runtime.Object
DeepCopyObject returns a copy of the object as runtime.Object
func (*MockConnectionSecretOwner) GetObjectKind ¶ added in v0.8.0
func (m *MockConnectionSecretOwner) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
func (*MockConnectionSecretOwner) GetWriteConnectionSecretToReference ¶ added in v0.8.0
func (m *MockConnectionSecretOwner) GetWriteConnectionSecretToReference() *v1alpha1.SecretReference
GetWriteConnectionSecretToReference returns the connection secret reference.
func (*MockConnectionSecretOwner) SetWriteConnectionSecretToReference ¶ added in v0.8.0
func (m *MockConnectionSecretOwner) SetWriteConnectionSecretToReference(r *v1alpha1.SecretReference)
SetWriteConnectionSecretToReference sets the connection secret reference.
type MockLocalConnectionSecretOwner ¶ added in v0.8.0
type MockLocalConnectionSecretOwner struct {
runtime.Object
metav1.ObjectMeta
Ref *v1alpha1.LocalSecretReference
}
MockLocalConnectionSecretOwner is a mock object that satisfies LocalConnectionSecretOwner interface.
func (*MockLocalConnectionSecretOwner) DeepCopyObject ¶ added in v0.8.0
func (m *MockLocalConnectionSecretOwner) DeepCopyObject() runtime.Object
DeepCopyObject returns a copy of the object as runtime.Object
func (*MockLocalConnectionSecretOwner) GetObjectKind ¶ added in v0.8.0
func (m *MockLocalConnectionSecretOwner) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
func (*MockLocalConnectionSecretOwner) GetWriteConnectionSecretToReference ¶ added in v0.8.0
func (m *MockLocalConnectionSecretOwner) GetWriteConnectionSecretToReference() *v1alpha1.LocalSecretReference
GetWriteConnectionSecretToReference returns the connection secret reference.
func (*MockLocalConnectionSecretOwner) SetWriteConnectionSecretToReference ¶ added in v0.8.0
func (m *MockLocalConnectionSecretOwner) SetWriteConnectionSecretToReference(r *v1alpha1.LocalSecretReference)
SetWriteConnectionSecretToReference sets the connection secret reference.
type Object ¶
type Object struct {
metav1.ObjectMeta
runtime.Object
}
Object is a mock that implements Object interface.
func (*Object) DeepCopyObject ¶
DeepCopyObject returns a copy of the object as runtime.Object
func (*Object) GetObjectKind ¶
func (o *Object) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type Provider ¶
type Provider struct {
metav1.ObjectMeta
CredentialsSecretReferencer
}
Provider is a mock that satisfies Provider interface.
func (*Provider) DeepCopyObject ¶
DeepCopyObject returns a deep copy of Provider as runtime.Object.
func (*Provider) GetObjectKind ¶
func (m *Provider) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type ProviderReferencer ¶
type ProviderReferencer struct{ Ref *corev1.ObjectReference }
ProviderReferencer is a mock that implements ProviderReferencer interface.
func (*ProviderReferencer) GetProviderReference ¶
func (m *ProviderReferencer) GetProviderReference() *corev1.ObjectReference
GetProviderReference gets the ProviderReference.
func (*ProviderReferencer) SetProviderReference ¶
func (m *ProviderReferencer) SetProviderReference(p *corev1.ObjectReference)
SetProviderReference sets the ProviderReference.
type Reclaimer ¶
type Reclaimer struct{ Policy v1alpha1.ReclaimPolicy }
Reclaimer is a mock that implements Reclaimer interface.
func (*Reclaimer) GetReclaimPolicy ¶
func (m *Reclaimer) GetReclaimPolicy() v1alpha1.ReclaimPolicy
GetReclaimPolicy gets the ReclaimPolicy.
func (*Reclaimer) SetReclaimPolicy ¶
func (m *Reclaimer) SetReclaimPolicy(p v1alpha1.ReclaimPolicy)
SetReclaimPolicy sets the ReclaimPolicy.
type Requirement ¶ added in v0.8.0
type Requirement struct {
metav1.ObjectMeta
CompositionSelector
CompositionReferencer
CompositeResourceReferencer
LocalConnectionSecretWriterTo
v1alpha1.ConditionedStatus
}
Requirement is a mock that implements Requirement interface.
func (*Requirement) DeepCopyObject ¶ added in v0.8.0
func (m *Requirement) DeepCopyObject() runtime.Object
DeepCopyObject returns a copy of the object as runtime.Object
func (*Requirement) GetObjectKind ¶ added in v0.8.0
func (m *Requirement) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type RequirementReferencer ¶ added in v0.8.0
type RequirementReferencer struct{ Ref *corev1.ObjectReference }
RequirementReferencer is a mock that implements RequirementReferencer interface.
func (*RequirementReferencer) GetRequirementReference ¶ added in v0.8.0
func (m *RequirementReferencer) GetRequirementReference() *corev1.ObjectReference
GetRequirementReference gets the requirement reference.
func (*RequirementReferencer) SetRequirementReference ¶ added in v0.8.0
func (m *RequirementReferencer) SetRequirementReference(p *corev1.ObjectReference)
SetRequirementReference sets the requirement reference.
type Target ¶
type Target struct {
metav1.ObjectMeta
ManagedResourceReferencer
LocalConnectionSecretWriterTo
v1alpha1.ConditionedStatus
}
Target is a mock that implements Target interface.
func (*Target) DeepCopyObject ¶
DeepCopyObject returns a deep copy of Target as runtime.Object.
func (*Target) GetObjectKind ¶
func (m *Target) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.