Skip to content

Commit

Permalink
enhance resource deletion flow.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <[email protected]>
  • Loading branch information
morvencao committed Jun 5, 2024
1 parent be8dc75 commit 8146a09
Show file tree
Hide file tree
Showing 20 changed files with 314 additions and 30 deletions.
4 changes: 2 additions & 2 deletions data/generated/openapi/openapi.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,5 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace open-cluster-management.io/sdk-go => github.com/morvencao/ocm-sdk-go v0.0.0-20240605052721-7f362d553aba
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/morvencao/ocm-sdk-go v0.0.0-20240605052721-7f362d553aba h1:KJRyYDW3v8Mr5YgwAAxD29qDWtBVutroM59h3DBpce0=
github.com/morvencao/ocm-sdk-go v0.0.0-20240605052721-7f362d553aba/go.mod h1:muWzHWsgK8IsopltwTnsBjf4DN9IcC9rF0G2uEq/Pjw=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down Expand Up @@ -1177,8 +1179,6 @@ open-cluster-management.io/api v0.13.1-0.20240506072237-800b00d9f0db h1:puVfabid
open-cluster-management.io/api v0.13.1-0.20240506072237-800b00d9f0db/go.mod h1:yrNuMMpciXjXPnj2yznb6LTyrGliiTrFZAJDp/Ck3c4=
open-cluster-management.io/ocm v0.13.1-0.20240521012022-92a2c91f1594 h1:BA7d2C96rNIu1SGs4OwJ1s21Gp9aEwlYDL3ZdQokA8g=
open-cluster-management.io/ocm v0.13.1-0.20240521012022-92a2c91f1594/go.mod h1:0l7ESHU83bf7ZrOD8Zv0fQRBoIyAHKaD7SW7Hp5wNik=
open-cluster-management.io/sdk-go v0.13.1-0.20240520073308-f18d198a844d h1:5lcrL1DsQdNtDQU6U2oXwLAN0EBczcvI421YNgEzL/4=
open-cluster-management.io/sdk-go v0.13.1-0.20240520073308-f18d198a844d/go.mod h1:XBrldz+AqVBy9miOVNIu+6l8JXS18i795XbTqIqURJU=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
6 changes: 6 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,9 @@ components:
updated_at:
type: string
format: date-time
deleted_at:
type: string
format: date-time
manifest:
type: object
delete_option:
Expand Down Expand Up @@ -635,6 +638,9 @@ components:
updated_at:
type: string
format: date-time
deleted_at:
type: string
format: date-time
manifests:
type: array
items:
Expand Down
6 changes: 6 additions & 0 deletions pkg/api/openapi/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,9 @@ components:
updated_at:
format: date-time
type: string
deleted_at:
format: date-time
type: string
manifest:
type: object
delete_option:
Expand Down Expand Up @@ -1041,6 +1044,9 @@ components:
updated_at:
format: date-time
type: string
deleted_at:
format: date-time
type: string
manifests:
items:
type: object
Expand Down
26 changes: 26 additions & 0 deletions pkg/api/openapi/docs/Resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**Version** | Pointer to **int32** | | [optional]
**CreatedAt** | Pointer to **time.Time** | | [optional]
**UpdatedAt** | Pointer to **time.Time** | | [optional]
**DeletedAt** | Pointer to **time.Time** | | [optional]
**Manifest** | Pointer to **map[string]interface{}** | | [optional]
**DeleteOption** | Pointer to **map[string]interface{}** | | [optional]
**UpdateStrategy** | Pointer to **map[string]interface{}** | | [optional]
Expand Down Expand Up @@ -236,6 +237,31 @@ SetUpdatedAt sets UpdatedAt field to given value.

HasUpdatedAt returns a boolean if a field has been set.

### GetDeletedAt

`func (o *Resource) GetDeletedAt() time.Time`

GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise.

### GetDeletedAtOk

`func (o *Resource) GetDeletedAtOk() (*time.Time, bool)`

GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDeletedAt

`func (o *Resource) SetDeletedAt(v time.Time)`

SetDeletedAt sets DeletedAt field to given value.

### HasDeletedAt

`func (o *Resource) HasDeletedAt() bool`

HasDeletedAt returns a boolean if a field has been set.

### GetManifest

`func (o *Resource) GetManifest() map[string]interface{}`
Expand Down
26 changes: 26 additions & 0 deletions pkg/api/openapi/docs/ResourceAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**Version** | Pointer to **int32** | | [optional]
**CreatedAt** | Pointer to **time.Time** | | [optional]
**UpdatedAt** | Pointer to **time.Time** | | [optional]
**DeletedAt** | Pointer to **time.Time** | | [optional]
**Manifest** | Pointer to **map[string]interface{}** | | [optional]
**DeleteOption** | Pointer to **map[string]interface{}** | | [optional]
**UpdateStrategy** | Pointer to **map[string]interface{}** | | [optional]
Expand Down Expand Up @@ -158,6 +159,31 @@ SetUpdatedAt sets UpdatedAt field to given value.

HasUpdatedAt returns a boolean if a field has been set.

### GetDeletedAt

`func (o *ResourceAllOf) GetDeletedAt() time.Time`

GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise.

### GetDeletedAtOk

`func (o *ResourceAllOf) GetDeletedAtOk() (*time.Time, bool)`

GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDeletedAt

`func (o *ResourceAllOf) SetDeletedAt(v time.Time)`

SetDeletedAt sets DeletedAt field to given value.

### HasDeletedAt

`func (o *ResourceAllOf) HasDeletedAt() bool`

HasDeletedAt returns a boolean if a field has been set.

### GetManifest

`func (o *ResourceAllOf) GetManifest() map[string]interface{}`
Expand Down
26 changes: 26 additions & 0 deletions pkg/api/openapi/docs/ResourceBundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**Version** | Pointer to **int32** | | [optional]
**CreatedAt** | Pointer to **time.Time** | | [optional]
**UpdatedAt** | Pointer to **time.Time** | | [optional]
**DeletedAt** | Pointer to **time.Time** | | [optional]
**Manifests** | Pointer to **[]map[string]interface{}** | | [optional]
**DeleteOption** | Pointer to **map[string]interface{}** | | [optional]
**ManifestConfigs** | Pointer to **[]map[string]interface{}** | | [optional]
Expand Down Expand Up @@ -236,6 +237,31 @@ SetUpdatedAt sets UpdatedAt field to given value.

HasUpdatedAt returns a boolean if a field has been set.

### GetDeletedAt

`func (o *ResourceBundle) GetDeletedAt() time.Time`

GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise.

### GetDeletedAtOk

`func (o *ResourceBundle) GetDeletedAtOk() (*time.Time, bool)`

GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDeletedAt

`func (o *ResourceBundle) SetDeletedAt(v time.Time)`

SetDeletedAt sets DeletedAt field to given value.

### HasDeletedAt

`func (o *ResourceBundle) HasDeletedAt() bool`

HasDeletedAt returns a boolean if a field has been set.

### GetManifests

`func (o *ResourceBundle) GetManifests() []map[string]interface{}`
Expand Down
26 changes: 26 additions & 0 deletions pkg/api/openapi/docs/ResourceBundleAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**Version** | Pointer to **int32** | | [optional]
**CreatedAt** | Pointer to **time.Time** | | [optional]
**UpdatedAt** | Pointer to **time.Time** | | [optional]
**DeletedAt** | Pointer to **time.Time** | | [optional]
**Manifests** | Pointer to **[]map[string]interface{}** | | [optional]
**DeleteOption** | Pointer to **map[string]interface{}** | | [optional]
**ManifestConfigs** | Pointer to **[]map[string]interface{}** | | [optional]
Expand Down Expand Up @@ -158,6 +159,31 @@ SetUpdatedAt sets UpdatedAt field to given value.

HasUpdatedAt returns a boolean if a field has been set.

### GetDeletedAt

`func (o *ResourceBundleAllOf) GetDeletedAt() time.Time`

GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise.

### GetDeletedAtOk

`func (o *ResourceBundleAllOf) GetDeletedAtOk() (*time.Time, bool)`

GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDeletedAt

`func (o *ResourceBundleAllOf) SetDeletedAt(v time.Time)`

SetDeletedAt sets DeletedAt field to given value.

### HasDeletedAt

`func (o *ResourceBundleAllOf) HasDeletedAt() bool`

HasDeletedAt returns a boolean if a field has been set.

### GetManifests

`func (o *ResourceBundleAllOf) GetManifests() []map[string]interface{}`
Expand Down
36 changes: 36 additions & 0 deletions pkg/api/openapi/model_resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions pkg/api/openapi/model_resource_all_of.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions pkg/api/openapi/model_resource_bundle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8146a09

Please sign in to comment.