Documentation ¶
Overview ¶
Package mock provides fake OAM resources for use in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GV = schema.GroupVersion{Group: "g", Version: "v"}
GV returns a mock schema.GroupVersion.
Functions ¶
Types ¶
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 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 ¶
Manager is a mock object that satisfies manager.Manager interface.
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 Trait ¶
type Trait struct { metav1.ObjectMeta runtime.Object v1alpha1.ConditionedStatus WorkloadReferencer }
Trait is a mock that implements Trait interface.
func (*Trait) DeepCopyObject ¶
DeepCopyObject returns a copy of the object as runtime.Object
func (*Trait) GetObjectKind ¶
func (t *Trait) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type Workload ¶
type Workload struct { metav1.ObjectMeta runtime.Object v1alpha1.ConditionedStatus }
Workload is a mock that implements Workload interface.
func (*Workload) DeepCopyObject ¶
DeepCopyObject returns a copy of the object as runtime.Object
func (*Workload) GetObjectKind ¶
func (w *Workload) GetObjectKind() schema.ObjectKind
GetObjectKind returns schema.ObjectKind.
type WorkloadReferencer ¶
type WorkloadReferencer struct{ Ref v1alpha1.TypedReference }
A WorkloadReferencer references an OAM Workload type.
func (*WorkloadReferencer) GetWorkloadReference ¶
func (w *WorkloadReferencer) GetWorkloadReference() v1alpha1.TypedReference
GetWorkloadReference gets the WorkloadReference.
func (*WorkloadReferencer) SetWorkloadReference ¶
func (w *WorkloadReferencer) SetWorkloadReference(r v1alpha1.TypedReference)
SetWorkloadReference sets the WorkloadReference.