fake

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

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

Composed is a mock that implements Composed interface.

func (*Composed) DeepCopyObject

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

DeepCopyObject returns a copy of the object as runtime.Object

func (*Composed) GetObjectKind

func (m *Composed) GetObjectKind() schema.ObjectKind

GetObjectKind returns schema.ObjectKind.

type ComposedResourcesReferencer

type ComposedResourcesReferencer struct{ Refs []corev1.ObjectReference }

ComposedResourcesReferencer is a mock that implements ComposedResourcesReferencer interface.

func (*ComposedResourcesReferencer) GetResourceReferences

func (m *ComposedResourcesReferencer) GetResourceReferences() []corev1.ObjectReference

GetResourceReferences gets the composed references.

func (*ComposedResourcesReferencer) SetResourceReferences

func (m *ComposedResourcesReferencer) SetResourceReferences(r []corev1.ObjectReference)

SetResourceReferences sets the composed references.

type Composite

Composite is a mock that implements Composite interface.

func (*Composite) DeepCopyObject

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

DeepCopyObject returns a copy of the object as runtime.Object

func (*Composite) GetObjectKind

func (m *Composite) GetObjectKind() schema.ObjectKind

GetObjectKind returns schema.ObjectKind.

type CompositeClaim

CompositeClaim is a mock that implements the CompositeClaim interface.

func (*CompositeClaim) DeepCopyObject

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

DeepCopyObject returns a copy of the object as runtime.Object

func (*CompositeClaim) GetObjectKind

func (m *CompositeClaim) GetObjectKind() schema.ObjectKind

GetObjectKind returns schema.ObjectKind.

type CompositeResourceReferencer

type CompositeResourceReferencer struct{ Ref *corev1.ObjectReference }

CompositeResourceReferencer is a mock that implements CompositeResourceReferencer interface.

func (*CompositeResourceReferencer) GetResourceReference

func (m *CompositeResourceReferencer) GetResourceReference() *corev1.ObjectReference

GetResourceReference gets the composite resource reference.

func (*CompositeResourceReferencer) SetResourceReference

func (m *CompositeResourceReferencer) SetResourceReference(p *corev1.ObjectReference)

SetResourceReference sets the composite resource reference.

type CompositionReferencer

type CompositionReferencer struct{ Ref *corev1.ObjectReference }

CompositionReferencer is a mock that implements CompositionReferencer interface.

func (*CompositionReferencer) GetCompositionReference

func (m *CompositionReferencer) GetCompositionReference() *corev1.ObjectReference

GetCompositionReference gets the CompositionReference.

func (*CompositionReferencer) SetCompositionReference

func (m *CompositionReferencer) SetCompositionReference(r *corev1.ObjectReference)

SetCompositionReference sets the CompositionReference.

type CompositionSelector

type CompositionSelector struct{ Sel *metav1.LabelSelector }

CompositionSelector is a mock that implements CompositionSelector interface.

func (*CompositionSelector) GetCompositionSelector

func (m *CompositionSelector) GetCompositionSelector() *metav1.LabelSelector

GetCompositionSelector gets the CompositionSelector.

func (*CompositionSelector) SetCompositionSelector

func (m *CompositionSelector) SetCompositionSelector(s *metav1.LabelSelector)

SetCompositionSelector sets the CompositionSelector.

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

type ConnectionDetailsLastPublishedTimer struct{ Time *metav1.Time }

ConnectionDetailsLastPublishedTimer is a mock that implements the ConnectionDetailsLastPublishedTimer interface.

func (*ConnectionDetailsLastPublishedTimer) GetConnectionDetailsLastPublishedTime

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

GetConnectionDetailsLastPublishedTime gets the published time.

func (*ConnectionDetailsLastPublishedTimer) SetConnectionDetailsLastPublishedTime

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

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

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

GetConfig returns the config.

func (*Manager) GetRESTMapper

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

type MockConnectionSecretOwner struct {
	runtime.Object
	metav1.ObjectMeta

	Ref *xpv1.SecretReference
}

MockConnectionSecretOwner is a mock object that satisfies ConnectionSecretOwner interface.

func (*MockConnectionSecretOwner) DeepCopyObject

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

DeepCopyObject returns a copy of the object as runtime.Object

func (*MockConnectionSecretOwner) GetObjectKind

func (m *MockConnectionSecretOwner) GetObjectKind() schema.ObjectKind

GetObjectKind returns schema.ObjectKind.

func (*MockConnectionSecretOwner) GetWriteConnectionSecretToReference

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

GetWriteConnectionSecretToReference returns the connection secret reference.

func (*MockConnectionSecretOwner) SetWriteConnectionSecretToReference

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

SetWriteConnectionSecretToReference sets the connection secret reference.

type MockLocalConnectionSecretOwner

type MockLocalConnectionSecretOwner struct {
	runtime.Object
	metav1.ObjectMeta

	Ref *xpv1.LocalSecretReference
}

MockLocalConnectionSecretOwner is a mock object that satisfies LocalConnectionSecretOwner interface.

func (*MockLocalConnectionSecretOwner) DeepCopyObject

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

DeepCopyObject returns a copy of the object as runtime.Object

func (*MockLocalConnectionSecretOwner) GetObjectKind

GetObjectKind returns schema.ObjectKind.

func (*MockLocalConnectionSecretOwner) GetWriteConnectionSecretToReference

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

GetWriteConnectionSecretToReference returns the connection secret reference.

func (*MockLocalConnectionSecretOwner) SetWriteConnectionSecretToReference

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

type Orphanable struct{ Policy xpv1.DeletionPolicy }

Orphanable implements the Orphanable interface.

func (*Orphanable) GetDeletionPolicy

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

GetDeletionPolicy gets the DeletionPolicy.

func (*Orphanable) SetDeletionPolicy

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

SetDeletionPolicy sets the DeletionPolicy.

type ProviderConfig

type ProviderConfig struct {
	metav1.ObjectMeta

	UserCounter
	xpv1.ConditionedStatus
}

ProviderConfig is a mock implementation of the ProviderConfig interface.

func (*ProviderConfig) DeepCopyObject

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

DeepCopyObject returns a copy of the object as runtime.Object

func (*ProviderConfig) GetObjectKind

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

GetObjectKind returns schema.ObjectKind.

type ProviderConfigReferencer

type ProviderConfigReferencer struct{ Ref *xpv1.Reference }

ProviderConfigReferencer is a mock that implements ProviderConfigReferencer interface.

func (*ProviderConfigReferencer) GetProviderConfigReference

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

GetProviderConfigReference gets the ProviderConfigReference.

func (*ProviderConfigReferencer) SetProviderConfigReference

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

SetProviderConfigReference sets the ProviderConfigReference.

type ProviderConfigUsage

ProviderConfigUsage is a mock implementation of the ProviderConfigUsage interface.

func (*ProviderConfigUsage) DeepCopyObject

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

DeepCopyObject returns a copy of the object as runtime.Object

func (*ProviderConfigUsage) GetObjectKind

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

type RequiredProviderConfigReferencer struct{ Ref xpv1.Reference }

RequiredProviderConfigReferencer is a mock that implements the RequiredProviderConfigReferencer interface.

func (*RequiredProviderConfigReferencer) GetProviderConfigReference

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

GetProviderConfigReference gets the ProviderConfigReference.

func (*RequiredProviderConfigReferencer) SetProviderConfigReference

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

SetProviderConfigReference sets the ProviderConfigReference.

type RequiredTypedResourceReferencer

type RequiredTypedResourceReferencer struct{ Ref xpv1.TypedReference }

RequiredTypedResourceReferencer is a mock that implements the RequiredTypedResourceReferencer interface.

func (*RequiredTypedResourceReferencer) GetResourceReference

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

GetResourceReference gets the ResourceReference.

func (*RequiredTypedResourceReferencer) SetResourceReference

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

SetResourceReference sets the ResourceReference.

type UserCounter

type UserCounter struct{ Users int64 }

UserCounter is a mock that satisfies UserCounter interface.

func (*UserCounter) GetUsers

func (m *UserCounter) GetUsers() int64

GetUsers gets the count of users.

func (*UserCounter) SetUsers

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