Method
Filter
(_ context.Context, pattern store.Pattern)
Source from the content-addressed store, hash-verified
| 146 | } |
| 147 | |
| 148 | func (m *MockStore) Filter(_ context.Context, pattern store.Pattern) (map[store.ID]store.Secret, error) { |
| 149 | m.lock.Lock() |
| 150 | defer m.lock.Unlock() |
| 151 | |
| 152 | if m.errFilter != nil { |
| 153 | return nil, m.errFilter |
| 154 | } |
| 155 | |
| 156 | filtered := make(map[store.ID]store.Secret) |
| 157 | for id, f := range m.store { |
| 158 | if pattern.Match(id) { |
| 159 | filtered[id] = f |
| 160 | } |
| 161 | } |
| 162 | return filtered, nil |
| 163 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected