@@ -55,6 +55,10 @@ type UserFilter struct {
55
55
type Client interface {
56
56
// GetCaller returns the API caller.
57
57
GetCaller () * v1pb.User
58
+ // CheckResourceExist check if the resource exists.
59
+ CheckResourceExist (ctx context.Context , name string ) error
60
+ // DeleteResource force delete the resource by name.
61
+ DeleteResource (ctx context.Context , name string ) error
58
62
59
63
// Instance
60
64
// ListInstance will return instances.
@@ -65,8 +69,6 @@ type Client interface {
65
69
CreateInstance (ctx context.Context , instanceID string , instance * v1pb.Instance ) (* v1pb.Instance , error )
66
70
// UpdateInstance updates the instance.
67
71
UpdateInstance (ctx context.Context , patch * v1pb.Instance , updateMasks []string ) (* v1pb.Instance , error )
68
- // DeleteInstance deletes the instance.
69
- DeleteInstance (ctx context.Context , instanceName string ) error
70
72
// UndeleteInstance undeletes the instance.
71
73
UndeleteInstance (ctx context.Context , instanceName string ) (* v1pb.Instance , error )
72
74
// SyncInstanceSchema will trigger the schema sync for an instance.
@@ -105,8 +107,6 @@ type Client interface {
105
107
CreateProject (ctx context.Context , projectID string , project * v1pb.Project ) (* v1pb.Project , error )
106
108
// UpdateProject updates the project.
107
109
UpdateProject (ctx context.Context , patch * v1pb.Project , updateMask []string ) (* v1pb.Project , error )
108
- // DeleteProject deletes the project.
109
- DeleteProject (ctx context.Context , projectName string ) error
110
110
// UndeleteProject undeletes the project.
111
111
UndeleteProject (ctx context.Context , projectName string ) (* v1pb.Project , error )
112
112
// GetProjectIAMPolicy gets the project IAM policy by project full name.
@@ -141,16 +141,12 @@ type Client interface {
141
141
GetUser (ctx context.Context , userName string ) (* v1pb.User , error )
142
142
// UpdateUser updates the user.
143
143
UpdateUser (ctx context.Context , patch * v1pb.User , updateMasks []string ) (* v1pb.User , error )
144
- // DeleteUser deletes the user by name.
145
- DeleteUser (ctx context.Context , userName string ) error
146
144
// UndeleteUser undeletes the user by name.
147
145
UndeleteUser (ctx context.Context , userName string ) (* v1pb.User , error )
148
146
149
147
// Role
150
148
// ListRole will returns all roles.
151
149
ListRole (ctx context.Context ) (* v1pb.ListRolesResponse , error )
152
- // DeleteRole deletes the role by name.
153
- DeleteRole (ctx context.Context , name string ) error
154
150
// CreateRole creates the role.
155
151
CreateRole (ctx context.Context , roleID string , role * v1pb.Role ) (* v1pb.Role , error )
156
152
// GetRole gets the role by full name.
@@ -167,8 +163,6 @@ type Client interface {
167
163
GetGroup (ctx context.Context , name string ) (* v1pb.Group , error )
168
164
// UpdateGroup updates the group.
169
165
UpdateGroup (ctx context.Context , patch * v1pb.Group , updateMasks []string ) (* v1pb.Group , error )
170
- // DeleteGroup deletes the group by name.
171
- DeleteGroup (ctx context.Context , name string ) error
172
166
173
167
// Workspace
174
168
// GetWorkspaceIAMPolicy gets the workspace IAM policy.
@@ -183,8 +177,6 @@ type Client interface {
183
177
GetReviewConfig (ctx context.Context , reviewName string ) (* v1pb.ReviewConfig , error )
184
178
// UpsertReviewConfig updates or creates the review config.
185
179
UpsertReviewConfig (ctx context.Context , patch * v1pb.ReviewConfig , updateMasks []string ) (* v1pb.ReviewConfig , error )
186
- // DeleteReviewConfig deletes the review config.
187
- DeleteReviewConfig (ctx context.Context , reviewName string ) error
188
180
189
181
// Risk
190
182
// ListRisk lists the risk.
@@ -195,8 +187,6 @@ type Client interface {
195
187
CreateRisk (ctx context.Context , risk * v1pb.Risk ) (* v1pb.Risk , error )
196
188
// UpdateRisk updates the risk.
197
189
UpdateRisk (ctx context.Context , patch * v1pb.Risk , updateMasks []string ) (* v1pb.Risk , error )
198
- // DeleteRisk deletes the risk by name.
199
- DeleteRisk (ctx context.Context , name string ) error
200
190
201
191
// ListDatabaseGroup list all database groups in a project.
202
192
ListDatabaseGroup (ctx context.Context , project string ) (* v1pb.ListDatabaseGroupsResponse , error )
@@ -206,6 +196,4 @@ type Client interface {
206
196
GetDatabaseGroup (ctx context.Context , name string , view v1pb.DatabaseGroupView ) (* v1pb.DatabaseGroup , error )
207
197
// UpdateDatabaseGroup updates the database group.
208
198
UpdateDatabaseGroup (ctx context.Context , patch * v1pb.DatabaseGroup , updateMasks []string ) (* v1pb.DatabaseGroup , error )
209
- // DeleteDatabaseGroup deletes the database group by name.
210
- DeleteDatabaseGroup (ctx context.Context , name string ) error
211
199
}
0 commit comments