Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Add EDV provider #2199

Closed
4 tasks done
DRK3 opened this issue Sep 21, 2020 · 2 comments
Closed
4 tasks done

Add EDV provider #2199

DRK3 opened this issue Sep 21, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@DRK3
Copy link
Contributor

DRK3 commented Sep 21, 2020

REST API and EDV models must be decoupled so as to allow the EDV models to be used in other storage providers.

@DRK3 DRK3 changed the title Add SDS Provider Add SDS provider Sep 21, 2020
@llorllale llorllale added the enhancement New feature or request label Sep 21, 2020
@llorllale llorllale added this to the 0.1.5 milestone Sep 21, 2020
This was referenced Sep 28, 2020
@llorllale
Copy link
Contributor

llorllale commented Oct 26, 2020

@DRK3

High-level Design

storage.Formatter: formats documents to and from storages in a way that preserves the user's privacy vs. external storage providers. This is what is currently known as edv.formatprovider.DocumentProcessor.

package storage

type Formatter interface {
   FormatPair(k string, v []byte) ([]byte, error)
   ParseValue([]byte) ([]byte, error)
}

edv.Formatter: implements storage.Formatter. Formats k and v into an EDV EncryptedDocument.

edv.Store: implements storage.Store. It will essentially be a thin wrapper around the EDV REST API.

storage.FormattedStore: implements storage.Store and is composed of an underlying store and a storage.Formatter. It formats all data before saving it to the underlying store

We will not have to add any new methods to storage.Store. We can delete storage.Store.Query().

Folder hierarchy:

  • pkg/storage
    • formats
      • edv (EDV format impl)
    • edv (EDV Store impl)

@DRK3
Copy link
Contributor Author

DRK3 commented Dec 3, 2020

Support for the [https://github.com/trustbloc/edv](TrustBloc EDV Server) ReturnFullDocumentsOnQuery and Batch extensions have also been implemented in #2355/#2356 and #2365. These are optional capabilities that the EDV REST provider and formatted provider (respectively) can be initialized with.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants