From d95afe04d07a62584bbf7afc233f1f19be15a43c Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 21 Sep 2023 13:39:23 +0800 Subject: [PATCH] chore: adjust definition of restoreSource.until fields --- api/v1alpha1/obtenant_types.go | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/api/v1alpha1/obtenant_types.go b/api/v1alpha1/obtenant_types.go index 7fde60890..717625af1 100644 --- a/api/v1alpha1/obtenant_types.go +++ b/api/v1alpha1/obtenant_types.go @@ -54,15 +54,21 @@ type OBTenantSpec struct { // Source for restoring or creating standby type TenantSourceSpec struct { - Tenant *string `json:"tenant,omitempty"` - Restore *RestoreSource `json:"restore,omitempty"` + Tenant *string `json:"tenant,omitempty"` + Restore *RestoreSourceSpec `json:"restore,omitempty"` } -type RestoreSource struct { - SourceUri string `json:"sourceUri"` - Until string `json:"until"` - Description *string `json:"description,omitempty"` - ReplayLogUntil *string `json:"replayLogUntil,omitempty"` +type RestoreSourceSpec struct { + SourceUri string `json:"sourceUri"` + Until RestoreUntilConfig `json:"until"` + Description *string `json:"description,omitempty"` + ReplayLogUntil *RestoreUntilConfig `json:"replayLogUntil,omitempty"` +} + +type RestoreUntilConfig struct { + Timestamp *string `json:"timestamp,omitempty"` + Scn *string `json:"scn,omitempty"` + Unlimited bool `json:"unlimited,omitempty"` } type ResourcePoolSpec struct {