Documentation
¶
Index ¶
- Constants
- type Provider
- type Store
- func (c *Store) Delete(docID string) error
- func (c *Store) Get(k string) ([]byte, error)
- func (c *Store) Put(document models.EncryptedDocument) error
- func (c *Store) Query(query *models.Query) ([]models.EncryptedDocument, error)
- func (c *Store) StoreDataVaultConfiguration(config *models.DataVaultConfiguration, vaultID string) error
- func (c *Store) Update(newDoc models.EncryptedDocument) error
- func (c *Store) UpsertBulk(documents []models.EncryptedDocument) error
Constants ¶
const ( // VaultConfigurationStoreName is the name for the store that holds data vault configurations. VaultConfigurationStoreName = "data_vault_configurations" // VaultConfigReferenceIDTagName is the tag name used for querying vault configs based on their reference IDs. VaultConfigReferenceIDTagName = "ReferenceID" // MappingDocumentTagName is the tag name used for querying mapping documents // based on what attribute name they're for. MappingDocumentTagName = "AttributeName" // MappingDocumentMatchingEncryptedDocIDTagName is the tag name used for querying mapping documents // based on what encrypted document they're for. MappingDocumentMatchingEncryptedDocIDTagName = "MatchingEncryptedDocumentID" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶ added in v0.1.7
type Provider struct {
// contains filtered or unexported fields
}
Provider represents an EDV storage provider. It wraps an Aries storage provider with additional functionality that's needed for EDV operations.
func NewProvider ¶ added in v0.1.7
NewProvider instantiates a new Provider. retrievalPageSize is used by ariesProvider for query paging. It may be ignored if ariesProvider doesn't support paging.
func (*Provider) OpenStore ¶ added in v0.1.7
OpenStore opens a store and returns it. The name is converted to a UUID if it is a base58-encoded 128-bit value.
func (*Provider) SetStoreConfig ¶ added in v0.1.7
func (c *Provider) SetStoreConfig(name string, config storage.StoreConfiguration) error
SetStoreConfig sets the store configuration in the underlying core provider.
type Store ¶ added in v0.1.7
type Store struct {
// contains filtered or unexported fields
}
Store represents an EDV store. It wraps an Aries store with additional functionality that's needed for EDV operations.
func (*Store) Delete ¶ added in v0.1.7
Delete deletes the given document and its mapping document(s).
func (*Store) Put ¶ added in v0.1.7
func (c *Store) Put(document models.EncryptedDocument) error
Put stores the given document. Mapping documents are also created and stored in order to allow for encrypted indices to work.
func (*Store) Query ¶ added in v0.1.7
Query does an EDV encrypted index query. We first get the "mapping document" and then use the ID we get from that to lookup the associated encrypted document. Then we check that encrypted document to see if the value matches what was specified in the query. If query.Has is not blank, then we assume it's a "has" query, and so any documents with an index name matching query.Has will be returned regardless of value. TODO (#168): Add support for pagination (not currently in the spec).
The c.retrievalPageSize parameter is passed in from the startup args and could be used with pagination.
func (*Store) StoreDataVaultConfiguration ¶ added in v0.1.7
func (c *Store) StoreDataVaultConfiguration(config *models.DataVaultConfiguration, vaultID string) error
StoreDataVaultConfiguration stores the given DataVaultConfiguration and vaultID
func (*Store) Update ¶ added in v0.1.7
func (c *Store) Update(newDoc models.EncryptedDocument) error
Update updates the given document.
func (*Store) UpsertBulk ¶ added in v0.1.7
func (c *Store) UpsertBulk(documents []models.EncryptedDocument) error
UpsertBulk stores the given documents, creating or updating them as needed. TODO (#171): Address encrypted index limitations of this method.