| 65 | } |
| 66 | |
| 67 | func (r *remoteNamespaces) SetLabel(ctx context.Context, namespace, key, value string) error { |
| 68 | var req api.UpdateNamespaceRequest |
| 69 | |
| 70 | req.Namespace = &api.Namespace{ |
| 71 | Name: namespace, |
| 72 | Labels: map[string]string{key: value}, |
| 73 | } |
| 74 | |
| 75 | req.UpdateMask = &types.FieldMask{ |
| 76 | Paths: []string{strings.Join([]string{"labels", key}, ".")}, |
| 77 | } |
| 78 | |
| 79 | _, err := r.client.Update(ctx, &req) |
| 80 | if err != nil { |
| 81 | return errgrpc.ToNative(err) |
| 82 | } |
| 83 | |
| 84 | return nil |
| 85 | } |
| 86 | |
| 87 | func (r *remoteNamespaces) List(ctx context.Context) ([]string, error) { |
| 88 | var req api.ListNamespacesRequest |