(ctx context.Context, id string)
| 134 | } |
| 135 | |
| 136 | func (p *ProjectClient) delete(ctx context.Context, id string) error { |
| 137 | err := p.deleteByLabels(ctx, gateway.ProfessionRouter, map[string]string{"project": id}) |
| 138 | if err != nil { |
| 139 | return err |
| 140 | } |
| 141 | return p.deleteByLabels(ctx, gateway.ProfessionService, map[string]string{"project": id}) |
| 142 | } |
| 143 | func matchLabels[T any](ctx context.Context, client admin_client.Client, profession string, labels map[string]string, t ...[]*T) ([]*T, error) { |
| 144 | list, err := client.MatchLabels(ctx, profession, labels) |
| 145 | if err != nil { |
no test coverage detected