-
Notifications
You must be signed in to change notification settings - Fork 0
/
bridge_types.go
62 lines (49 loc) · 1.61 KB
/
bridge_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"github.com/zeiss/typhoon/pkg/apis/common/v1alpha1"
)
// +genclient
// +genreconciler
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Bridge is the Schema for the Bridge target.
type Bridge struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BridgeSpec `json:"spec"`
Status v1alpha1.Status `json:"status,omitempty"`
}
// Check the interfaces Bridge should be implementing.
var (
_ v1alpha1.Reconcilable = (*Bridge)(nil)
)
// BridgeSpec defines the desired state of the component.
type BridgeSpec struct {
Components []Component `json:"components"`
}
// Component holds a component of a bridge.
type Component struct {
// Object is the component object.
// +optional
// +nullable
// +kubebuilder:pruning:PreserveUnknownFields
// x-kubernetes-embedded-resource: false
Object runtime.RawExtension `json:"object,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// BridgeList is a list of component instances.
type BridgeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Bridge `json:"items"`
}
type isBridgeObject_BridgeObject interface {
isBridgeObject_BridgeObject()
}
// BridgeObject_Transformation is a component of a bridge.
type BridgeObject_Transformation struct {
Transformation TransformationSpec
}
// Check the interfaces BridgeObject_Transformation should be implementing.
func (*BridgeObject_Transformation) isBridgeObject_BridgeObject() {}