diff --git a/internal/resource/obcluster/obcluster_manager.go b/internal/resource/obcluster/obcluster_manager.go index 6b7f29073..ebce4043b 100644 --- a/internal/resource/obcluster/obcluster_manager.go +++ b/internal/resource/obcluster/obcluster_manager.go @@ -32,8 +32,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) +var _ opresource.ResourceManager = &OBClusterManager{} + type OBClusterManager struct { - opresource.ResourceManager Ctx context.Context OBCluster *v1alpha1.OBCluster Client client.Client diff --git a/internal/resource/obparameter/obparameter_manager.go b/internal/resource/obparameter/obparameter_manager.go index 23d589004..9e69314cb 100644 --- a/internal/resource/obparameter/obparameter_manager.go +++ b/internal/resource/obparameter/obparameter_manager.go @@ -35,8 +35,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) +var _ opresource.ResourceManager = &OBParameterManager{} + type OBParameterManager struct { - opresource.ResourceManager Ctx context.Context OBParameter *v1alpha1.OBParameter Client client.Client diff --git a/internal/resource/observer/observer_manager.go b/internal/resource/observer/observer_manager.go index a48fd116c..a7c36228b 100644 --- a/internal/resource/observer/observer_manager.go +++ b/internal/resource/observer/observer_manager.go @@ -34,8 +34,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) +var _ opresource.ResourceManager = &OBServerManager{} + type OBServerManager struct { - opresource.ResourceManager Ctx context.Context OBServer *v1alpha1.OBServer Client client.Client diff --git a/internal/resource/obtenant/obtenant_manager.go b/internal/resource/obtenant/obtenant_manager.go index 3ebfb9422..989e22d47 100644 --- a/internal/resource/obtenant/obtenant_manager.go +++ b/internal/resource/obtenant/obtenant_manager.go @@ -42,8 +42,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) +var _ opresource.ResourceManager = &OBTenantManager{} + type OBTenantManager struct { - opresource.ResourceManager OBTenant *v1alpha1.OBTenant Ctx context.Context Client client.Client diff --git a/internal/resource/obtenantbackup/obtenantbackup_manager.go b/internal/resource/obtenantbackup/obtenantbackup_manager.go index f59f6866c..5ea6ac68a 100644 --- a/internal/resource/obtenantbackup/obtenantbackup_manager.go +++ b/internal/resource/obtenantbackup/obtenantbackup_manager.go @@ -37,9 +37,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) -type OBTenantBackupManager struct { - opresource.ResourceManager +var _ opresource.ResourceManager = &OBTenantBackupManager{} +type OBTenantBackupManager struct { Ctx context.Context Resource *v1alpha1.OBTenantBackup Client client.Client diff --git a/internal/resource/obtenantbackuppolicy/obtenantbackuppolicy_manager.go b/internal/resource/obtenantbackuppolicy/obtenantbackuppolicy_manager.go index b99dc6d70..04773c2ac 100644 --- a/internal/resource/obtenantbackuppolicy/obtenantbackuppolicy_manager.go +++ b/internal/resource/obtenantbackuppolicy/obtenantbackuppolicy_manager.go @@ -40,8 +40,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) +var _ opresource.ResourceManager = &ObTenantBackupPolicyManager{} + type ObTenantBackupPolicyManager struct { - opresource.ResourceManager Ctx context.Context BackupPolicy *v1alpha1.OBTenantBackupPolicy Client client.Client diff --git a/internal/resource/obtenantoperation/obtenantoperation_manager.go b/internal/resource/obtenantoperation/obtenantoperation_manager.go index 3fba95cf8..22bd05bd4 100644 --- a/internal/resource/obtenantoperation/obtenantoperation_manager.go +++ b/internal/resource/obtenantoperation/obtenantoperation_manager.go @@ -36,9 +36,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) -type ObTenantOperationManager struct { - opresource.ResourceManager +var _ opresource.ResourceManager = &ObTenantOperationManager{} +type ObTenantOperationManager struct { Ctx context.Context Resource *v1alpha1.OBTenantOperation Client client.Client diff --git a/internal/resource/obtenantrestore/obtenantrestore_manager.go b/internal/resource/obtenantrestore/obtenantrestore_manager.go index 555e05b89..b950eb3cc 100644 --- a/internal/resource/obtenantrestore/obtenantrestore_manager.go +++ b/internal/resource/obtenantrestore/obtenantrestore_manager.go @@ -36,9 +36,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) -type ObTenantRestoreManager struct { - opresource.ResourceManager +var _ opresource.ResourceManager = &ObTenantRestoreManager{} +type ObTenantRestoreManager struct { Ctx context.Context Resource *v1alpha1.OBTenantRestore Client client.Client diff --git a/internal/resource/obzone/obzone_manager.go b/internal/resource/obzone/obzone_manager.go index aebd078cd..cb9a53fac 100644 --- a/internal/resource/obzone/obzone_manager.go +++ b/internal/resource/obzone/obzone_manager.go @@ -36,8 +36,9 @@ import ( tasktypes "github.com/oceanbase/ob-operator/pkg/task/types" ) +var _ opresource.ResourceManager = &OBZoneManager{} + type OBZoneManager struct { - opresource.ResourceManager Ctx context.Context OBZone *v1alpha1.OBZone Client client.Client