cnabio / cnab-go

A Go implementation of CNAB Core 1.0
MIT License
69 stars 37 forks source link

Update crud.Store to support general storage #175

Closed carolynvs closed 4 years ago

carolynvs commented 4 years ago

CRUD can be used to work with any type of item, not just claims. Update the interface signature to support specifying what type of item is being stored so that the controlling code, e.g. the claim store or eventually a credential store, can say what type of data is being stored. For example "claims" or "credentials".

By altering the interface, this allows tools to avoid creating multiple instances of the same store to work with a different type of data.

Part of #172

~🚨 This has some overlap with #174. I tried to make this PR independent but if that PR is merged first, this should be rebased and tweaked first.~ Rebase done.