mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
feat(v1beta1): scaffolding the Convertible interface
This commit is contained in:
26
api/v1alpha1/conversion_hub.go
Normal file
26
api/v1alpha1/conversion_hub.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2020-2021 Clastix Labs
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"github.com/clastix/capsule/api/v1beta1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
)
|
||||
|
||||
func (t *Tenant) ConvertTo(dstRaw conversion.Hub) error {
|
||||
dst := dstRaw.(*v1beta1.Tenant)
|
||||
|
||||
println(dst)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Tenant) ConvertFrom(srcRaw conversion.Hub) error {
|
||||
src := srcRaw.(*v1beta1.Tenant)
|
||||
|
||||
println(src)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user