fake

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Overview

Package fake provides fake Crossplane resources for use in tests.

Index

Constants

This section is empty.

Variables

View Source
var GV = schema.GroupVersion{Group: "g", Version: "v"}

GV returns a mock schema.GroupVersion.

Functions

func GVK

GVK returns the mock GVK of the given object.

func SchemeWith

func SchemeWith(o ...runtime.Object) *runtime.Scheme

SchemeWith returns a scheme with list of `runtime.Object`s registered.

Types

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 Composed added in v0.8.0

Composed is a mock that implements Composed interface.

func (*Composed) DeepCopyObject added in v0.8.0

func (m *Composed) DeepCopyObject() runtime.Object

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

Composite is a mock that implements Composite interface.

func (*Composite) DeepCopyObject added in v0.8.0

func (m *Composite) DeepCopyObject() runtime.Object

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 CompositeClaim added in v0.10.0

CompositeClaim is a mock that implements the CompositeClaim interface.

func (*CompositeClaim) DeepCopyObject added in v0.10.0

func (m *CompositeClaim) DeepCopyObject() runtime.Object

DeepCopyObject returns a copy of the object as runtime.Object

func (*CompositeClaim) GetObjectKind added in v0.10.0

func (m *CompositeClaim) 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 CompositionRevisionReferencer added in v0.15.0

type CompositionRevisionReferencer struct{ Ref *corev1.ObjectReference }

CompositionRevisionReferencer is a mock that implements CompositionRevisionReferencer interface.

func (*CompositionRevisionReferencer) GetCompositionRevisionReference added in v0.15.0

func (m *CompositionRevisionReferencer) GetCompositionRevisionReference() *corev1.ObjectReference

GetCompositionRevisionReference gets the CompositionRevisionReference.

func (*CompositionRevisionReferencer) SetCompositionRevisionReference added in v0.15.0

func (m *CompositionRevisionReferencer) SetCompositionRevisionReference(r *corev1.ObjectReference)

SetCompositionRevisionReference sets the CompositionRevisionReference.

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 CompositionUpdater added in v0.15.0

type CompositionUpdater struct{ Policy *xpv1.UpdatePolicy }

CompositionUpdater is a mock that implements CompositionUpdater interface.

func (*CompositionUpdater) GetCompositionUpdatePolicy added in v0.15.0

func (m *CompositionUpdater) GetCompositionUpdatePolicy() *xpv1.UpdatePolicy

GetCompositionUpdatePolicy gets the CompositionUpdatePolicy.

func (*CompositionUpdater) SetCompositionUpdatePolicy added in v0.15.0

func (m *CompositionUpdater) SetCompositionUpdatePolicy(p *xpv1.UpdatePolicy)

SetCompositionUpdatePolicy sets the CompositionUpdatePolicy.

type Conditioned

type Conditioned struct{ Conditions []xpv1.Condition }

Conditioned is a mock that implements Conditioned interface.

func (*Conditioned) GetCondition

func (m *Conditioned) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition get the Condition with the given ConditionType.

func (*Conditioned) SetConditions

func (m *Conditioned) SetConditions(c ...xpv1.Condition)

SetConditions sets the Conditions.

type ConnectionDetailsLastPublishedTimer added in v0.11.0

type ConnectionDetailsLastPublishedTimer struct{ Time *metav1.Time }

ConnectionDetailsLastPublishedTimer is a mock that implements the ConnectionDetailsLastPublishedTimer interface.

func (*ConnectionDetailsLastPublishedTimer) GetConnectionDetailsLastPublishedTime added in v0.11.0

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

GetConnectionDetailsLastPublishedTime gets the published time.

func (*ConnectionDetailsLastPublishedTimer) SetConnectionDetailsLastPublishedTime added in v0.11.0

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

SetConnectionDetailsLastPublishedTime sets the published time.

type ConnectionSecretWriterTo

type ConnectionSecretWriterTo struct{ Ref *xpv1.SecretReference }

ConnectionSecretWriterTo is a mock that implements ConnectionSecretWriterTo interface.

func (*ConnectionSecretWriterTo) GetWriteConnectionSecretToReference

func (m *ConnectionSecretWriterTo) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference gets the WriteConnectionSecretToReference.

func (*ConnectionSecretWriterTo) SetWriteConnectionSecretToReference

func (m *ConnectionSecretWriterTo) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference sets the WriteConnectionSecretToReference.

type LocalConnectionSecretWriterTo

type LocalConnectionSecretWriterTo struct {
	Ref *xpv1.LocalSecretReference
}

LocalConnectionSecretWriterTo is a mock that implements LocalConnectionSecretWriterTo interface.

func (*LocalConnectionSecretWriterTo) GetWriteConnectionSecretToReference

func (m *LocalConnectionSecretWriterTo) GetWriteConnectionSecretToReference() *xpv1.LocalSecretReference

GetWriteConnectionSecretToReference gets the WriteConnectionSecretToReference.

func (*LocalConnectionSecretWriterTo) SetWriteConnectionSecretToReference

func (m *LocalConnectionSecretWriterTo) SetWriteConnectionSecretToReference(r *xpv1.LocalSecretReference)

SetWriteConnectionSecretToReference sets the WriteConnectionSecretToReference.

type Managed

Managed is a mock that implements Managed interface.

func (*Managed) DeepCopyObject

func (m *Managed) DeepCopyObject() runtime.Object

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) GetClient

func (m *Manager) GetClient() client.Client

GetClient returns the client.

func (*Manager) GetConfig added in v0.8.0

func (m *Manager) GetConfig() *rest.Config

GetConfig returns the config.

func (*Manager) GetRESTMapper added in v0.8.0

func (m *Manager) GetRESTMapper() meta.RESTMapper

GetRESTMapper returns the REST mapper.

func (*Manager) GetScheme

func (m *Manager) GetScheme() *runtime.Scheme

GetScheme returns the scheme.

type MockConnectionSecretOwner added in v0.8.0

type MockConnectionSecretOwner struct {
	runtime.Object
	metav1.ObjectMeta

	Ref *xpv1.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() *xpv1.SecretReference

GetWriteConnectionSecretToReference returns the connection secret reference.

func (*MockConnectionSecretOwner) SetWriteConnectionSecretToReference added in v0.8.0

func (m *MockConnectionSecretOwner) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference sets the connection secret reference.

type MockLocalConnectionSecretOwner added in v0.8.0

type MockLocalConnectionSecretOwner struct {
	runtime.Object
	metav1.ObjectMeta

	Ref *xpv1.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

GetObjectKind returns schema.ObjectKind.

func (*MockLocalConnectionSecretOwner) GetWriteConnectionSecretToReference added in v0.8.0

func (m *MockLocalConnectionSecretOwner) GetWriteConnectionSecretToReference() *xpv1.LocalSecretReference

GetWriteConnectionSecretToReference returns the connection secret reference.

func (*MockLocalConnectionSecretOwner) SetWriteConnectionSecretToReference added in v0.8.0

func (m *MockLocalConnectionSecretOwner) SetWriteConnectionSecretToReference(r *xpv1.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

func (o *Object) DeepCopyObject() runtime.Object

DeepCopyObject returns a copy of the object as runtime.Object

func (*Object) GetObjectKind

func (o *Object) GetObjectKind() schema.ObjectKind

GetObjectKind returns schema.ObjectKind.

type Orphanable added in v0.10.0

type Orphanable struct{ Policy xpv1.DeletionPolicy }

Orphanable implements the Orphanable interface.

func (*Orphanable) GetDeletionPolicy added in v0.10.0

func (m *Orphanable) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy gets the DeletionPolicy.

func (*Orphanable) SetDeletionPolicy added in v0.10.0

func (m *Orphanable) SetDeletionPolicy(p xpv1.DeletionPolicy)

SetDeletionPolicy sets the DeletionPolicy.

type ProviderConfig added in v0.10.0

type ProviderConfig struct {
	metav1.ObjectMeta

	UserCounter
	xpv1.ConditionedStatus
}

ProviderConfig is a mock implementation of the ProviderConfig interface.

func (*ProviderConfig) DeepCopyObject added in v0.10.0

func (p *ProviderConfig) DeepCopyObject() runtime.Object

DeepCopyObject returns a copy of the object as runtime.Object

func (*ProviderConfig) GetObjectKind added in v0.10.0

func (p *ProviderConfig) GetObjectKind() schema.ObjectKind

GetObjectKind returns schema.ObjectKind.

type ProviderConfigReferencer added in v0.10.0

type ProviderConfigReferencer struct{ Ref *xpv1.Reference }

ProviderConfigReferencer is a mock that implements ProviderConfigReferencer interface.

func (*ProviderConfigReferencer) GetProviderConfigReference added in v0.10.0

func (m *ProviderConfigReferencer) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference gets the ProviderConfigReference.

func (*ProviderConfigReferencer) SetProviderConfigReference added in v0.10.0

func (m *ProviderConfigReferencer) SetProviderConfigReference(p *xpv1.Reference)

SetProviderConfigReference sets the ProviderConfigReference.

type ProviderConfigUsage added in v0.10.0

ProviderConfigUsage is a mock implementation of the ProviderConfigUsage interface.

func (*ProviderConfigUsage) DeepCopyObject added in v0.10.0

func (p *ProviderConfigUsage) DeepCopyObject() runtime.Object

DeepCopyObject returns a copy of the object as runtime.Object

func (*ProviderConfigUsage) GetObjectKind added in v0.10.0

func (p *ProviderConfigUsage) GetObjectKind() schema.ObjectKind

GetObjectKind returns schema.ObjectKind.

type ProviderReferencer

type ProviderReferencer struct{ Ref *xpv1.Reference }

ProviderReferencer is a mock that implements ProviderReferencer interface.

func (*ProviderReferencer) GetProviderReference

func (m *ProviderReferencer) GetProviderReference() *xpv1.Reference

GetProviderReference gets the ProviderReference.

func (*ProviderReferencer) SetProviderReference

func (m *ProviderReferencer) SetProviderReference(p *xpv1.Reference)

SetProviderReference sets the ProviderReference.

type RequiredProviderConfigReferencer added in v0.10.0

type RequiredProviderConfigReferencer struct{ Ref xpv1.Reference }

RequiredProviderConfigReferencer is a mock that implements the RequiredProviderConfigReferencer interface.

func (*RequiredProviderConfigReferencer) GetProviderConfigReference added in v0.10.0

func (m *RequiredProviderConfigReferencer) GetProviderConfigReference() xpv1.Reference

GetProviderConfigReference gets the ProviderConfigReference.

func (*RequiredProviderConfigReferencer) SetProviderConfigReference added in v0.10.0

func (m *RequiredProviderConfigReferencer) SetProviderConfigReference(p xpv1.Reference)

SetProviderConfigReference sets the ProviderConfigReference.

type RequiredTypedResourceReferencer added in v0.10.0

type RequiredTypedResourceReferencer struct{ Ref xpv1.TypedReference }

RequiredTypedResourceReferencer is a mock that implements the RequiredTypedResourceReferencer interface.

func (*RequiredTypedResourceReferencer) GetResourceReference added in v0.10.0

func (m *RequiredTypedResourceReferencer) GetResourceReference() xpv1.TypedReference

GetResourceReference gets the ResourceReference.

func (*RequiredTypedResourceReferencer) SetResourceReference added in v0.10.0

func (m *RequiredTypedResourceReferencer) SetResourceReference(p xpv1.TypedReference)

SetResourceReference sets the ResourceReference.

type UserCounter added in v0.10.0

type UserCounter struct{ Users int64 }

UserCounter is a mock that satisfies UserCounter interface.

func (*UserCounter) GetUsers added in v0.10.0

func (m *UserCounter) GetUsers() int64

GetUsers gets the count of users.

func (*UserCounter) SetUsers added in v0.10.0

func (m *UserCounter) SetUsers(i int64)

SetUsers sets the count of users.

Jump to

Keyboard shortcuts

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