@@ -55,6 +55,10 @@ type UserFilter struct {
5555type Client interface {
5656 // GetCaller returns the API caller.
5757 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
5862
5963 // Instance
6064 // ListInstance will return instances.
@@ -65,8 +69,6 @@ type Client interface {
6569 CreateInstance (ctx context.Context , instanceID string , instance * v1pb.Instance ) (* v1pb.Instance , error )
6670 // UpdateInstance updates the instance.
6771 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
7072 // UndeleteInstance undeletes the instance.
7173 UndeleteInstance (ctx context.Context , instanceName string ) (* v1pb.Instance , error )
7274 // SyncInstanceSchema will trigger the schema sync for an instance.
@@ -105,8 +107,6 @@ type Client interface {
105107 CreateProject (ctx context.Context , projectID string , project * v1pb.Project ) (* v1pb.Project , error )
106108 // UpdateProject updates the project.
107109 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
110110 // UndeleteProject undeletes the project.
111111 UndeleteProject (ctx context.Context , projectName string ) (* v1pb.Project , error )
112112 // GetProjectIAMPolicy gets the project IAM policy by project full name.
@@ -141,16 +141,12 @@ type Client interface {
141141 GetUser (ctx context.Context , userName string ) (* v1pb.User , error )
142142 // UpdateUser updates the user.
143143 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
146144 // UndeleteUser undeletes the user by name.
147145 UndeleteUser (ctx context.Context , userName string ) (* v1pb.User , error )
148146
149147 // Role
150148 // ListRole will returns all roles.
151149 ListRole (ctx context.Context ) (* v1pb.ListRolesResponse , error )
152- // DeleteRole deletes the role by name.
153- DeleteRole (ctx context.Context , name string ) error
154150 // CreateRole creates the role.
155151 CreateRole (ctx context.Context , roleID string , role * v1pb.Role ) (* v1pb.Role , error )
156152 // GetRole gets the role by full name.
@@ -167,8 +163,6 @@ type Client interface {
167163 GetGroup (ctx context.Context , name string ) (* v1pb.Group , error )
168164 // UpdateGroup updates the group.
169165 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
172166
173167 // Workspace
174168 // GetWorkspaceIAMPolicy gets the workspace IAM policy.
@@ -183,8 +177,6 @@ type Client interface {
183177 GetReviewConfig (ctx context.Context , reviewName string ) (* v1pb.ReviewConfig , error )
184178 // UpsertReviewConfig updates or creates the review config.
185179 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
188180
189181 // Risk
190182 // ListRisk lists the risk.
@@ -195,8 +187,6 @@ type Client interface {
195187 CreateRisk (ctx context.Context , risk * v1pb.Risk ) (* v1pb.Risk , error )
196188 // UpdateRisk updates the risk.
197189 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
200190
201191 // ListDatabaseGroup list all database groups in a project.
202192 ListDatabaseGroup (ctx context.Context , project string ) (* v1pb.ListDatabaseGroupsResponse , error )
@@ -206,6 +196,4 @@ type Client interface {
206196 GetDatabaseGroup (ctx context.Context , name string , view v1pb.DatabaseGroupView ) (* v1pb.DatabaseGroup , error )
207197 // UpdateDatabaseGroup updates the database group.
208198 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
211199}
0 commit comments