edvprovider

package
v0.1.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIndexNameAndValueAlreadyDeclaredUnique = errors.New("unable to store document since it contains an " +
	"index name and value that are already declared as unique in an existing document")

ErrIndexNameAndValueAlreadyDeclaredUnique is returned when an attempt is made to store a document with an index name and value that are defined as unique in another document already. Note that depending on the provider implementation, it may not be guaranteed that uniqueness can always be maintained.

View Source
var ErrIndexNameAndValueCannotBeUnique = errors.New("unable to store document since it contains an " +
	"index name and value that are declared as unique, but another document already has an " +
	"identical index name + value pair")

ErrIndexNameAndValueCannotBeUnique is returned when an attempt is made to store a document with an index name and value that are defined as unique in the new would-be document, but another document already has an identical index name + value pair defined so uniqueness cannot be achieved. Note that depending on the provider implementation, it may not be guaranteed that uniqueness can always be maintained.

View Source
var ErrIndexingNotSupported = errors.New("indexing is not supported by this provider")

ErrIndexingNotSupported is returned when an attempt is made to create an index in a provider that doesn't support it.

Functions

This section is empty.

Types

type EDVProvider

type EDVProvider interface {
	// CreateStore creates a new store with the given name.
	CreateStore(name string) error

	// OpenStore opens an existing store and returns it.
	OpenStore(name string) (EDVStore, error)
}

EDVProvider represents a provider with functionality needed for EDV data storage.

type EDVStore

type EDVStore interface {
	// Put stores the given document.
	Put(document models.EncryptedDocument) error

	// Get fetches the document associated with the given key.
	Get(k string) ([]byte, error)

	// CreateEDVIndex creates the index which will allow for encrypted indices to work.
	CreateEDVIndex() error

	// Query does an EDV encrypted index query.
	Query(query *models.Query) ([]string, error)
}

EDVStore represents a store with functionality needed for EDV data storage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL