(ctx context.Context, key string, data interface{})
| 51 | } |
| 52 | |
| 53 | func (m *mockCache) Get(ctx context.Context, key string, data interface{}) error { |
| 54 | if v, ok := m.data[key]; ok { |
| 55 | // For simplicity, just return the value directly |
| 56 | switch d := data.(type) { |
| 57 | case *[]*model.Transaction: |
| 58 | *d = v.([]*model.Transaction) |
| 59 | } |
| 60 | return nil |
| 61 | } |
| 62 | return errors.New("cache miss") |
| 63 | } |
| 64 | |
| 65 | func (m *mockCache) Delete(ctx context.Context, key string) error { |
| 66 | delete(m.data, key) |
nothing calls this directly
no outgoing calls
no test coverage detected