Skip to content

Commit 6f257d7

Browse files
Add MSSQLServerBinding interface (#28)
Signed-off-by: obaydullahmhs <[email protected]>
1 parent d9cfd08 commit 6f257d7

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

api/catalog/v1alpha1/memcachedbinding_types.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package v1alpha1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21+
kmapi "kmodules.xyz/client-go/api/v1"
2122
)
2223

2324
const (
@@ -56,3 +57,21 @@ type MemcachedBindingList struct {
5657
func init() {
5758
SchemeBuilder.Register(&MemcachedBinding{}, &MemcachedBindingList{})
5859
}
60+
61+
var _ BindingInterface = &MemcachedBinding{}
62+
63+
func (in *MemcachedBinding) GetSourceRef() kmapi.ObjectReference {
64+
return in.Spec.SourceRef
65+
}
66+
67+
func (in *MemcachedBinding) GetStatus() *BindingStatus {
68+
return &in.Status
69+
}
70+
71+
func (in *MemcachedBinding) GetConditions() kmapi.Conditions {
72+
return in.Status.Conditions
73+
}
74+
75+
func (in *MemcachedBinding) SetConditions(conditions kmapi.Conditions) {
76+
in.Status.Conditions = conditions
77+
}

api/catalog/v1alpha1/mssqlserverbinding_types.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package v1alpha1
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21+
kmapi "kmodules.xyz/client-go/api/v1"
2122
)
2223

2324
const (
@@ -56,3 +57,21 @@ type MSSQLServerBindingList struct {
5657
func init() {
5758
SchemeBuilder.Register(&MSSQLServerBinding{}, &MSSQLServerBindingList{})
5859
}
60+
61+
var _ BindingInterface = &MSSQLServerBinding{}
62+
63+
func (in *MSSQLServerBinding) GetSourceRef() kmapi.ObjectReference {
64+
return in.Spec.SourceRef
65+
}
66+
67+
func (in *MSSQLServerBinding) GetStatus() *BindingStatus {
68+
return &in.Status
69+
}
70+
71+
func (in *MSSQLServerBinding) GetConditions() kmapi.Conditions {
72+
return in.Status.Conditions
73+
}
74+
75+
func (in *MSSQLServerBinding) SetConditions(conditions kmapi.Conditions) {
76+
in.Status.Conditions = conditions
77+
}

0 commit comments

Comments
 (0)