(ctx context.Context, namespace string)
| 79 | } |
| 80 | |
| 81 | func (s *namespaceStore) Labels(ctx context.Context, namespace string) (map[string]string, error) { |
| 82 | labels := map[string]string{} |
| 83 | |
| 84 | bkt := getNamespaceLabelsBucket(s.tx, namespace) |
| 85 | if bkt == nil { |
| 86 | return labels, nil |
| 87 | } |
| 88 | |
| 89 | if err := bkt.ForEach(func(k, v []byte) error { |
| 90 | labels[string(k)] = string(v) |
| 91 | return nil |
| 92 | }); err != nil { |
| 93 | return nil, err |
| 94 | } |
| 95 | |
| 96 | return labels, nil |
| 97 | } |
| 98 | |
| 99 | func (s *namespaceStore) SetLabel(ctx context.Context, namespace, key, value string) error { |
| 100 | if err := l.Validate(key, value); err != nil { |
nothing calls this directly
no test coverage detected