(ctx context.Context, namespace, key, value string)
| 97 | } |
| 98 | |
| 99 | func (s *namespaceStore) SetLabel(ctx context.Context, namespace, key, value string) error { |
| 100 | if err := l.Validate(key, value); err != nil { |
| 101 | return fmt.Errorf("namespace.Labels: %w", err) |
| 102 | } |
| 103 | |
| 104 | return withNamespacesLabelsBucket(s.tx, namespace, func(bkt *bolt.Bucket) error { |
| 105 | if value == "" { |
| 106 | return bkt.Delete([]byte(key)) |
| 107 | } |
| 108 | |
| 109 | return bkt.Put([]byte(key), []byte(value)) |
| 110 | }) |
| 111 | |
| 112 | } |
| 113 | |
| 114 | func (s *namespaceStore) List(ctx context.Context) ([]string, error) { |
| 115 | bkt := getBucket(s.tx, bucketKeyVersion) |
nothing calls this directly
no test coverage detected