memedvprovider

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrQueryingNotSupported = errors.New("querying is not supported by memstore")

ErrQueryingNotSupported is used when an attempt is made to query a vault backed by a memstore.

Functions

This section is empty.

Types

type MemEDVProvider

type MemEDVProvider struct {
	// contains filtered or unexported fields
}

MemEDVProvider represents an in-memory provider with functionality needed for EDV data storage. It wraps an edge-core memstore provider with additional functionality that's needed for EDV operations, however this additional functionality is not supported in memstore.

func NewProvider

func NewProvider() *MemEDVProvider

NewProvider instantiates Provider

func (MemEDVProvider) CreateStore

func (m MemEDVProvider) CreateStore(name string) error

CreateStore creates a new store with the given name.

func (MemEDVProvider) OpenStore

func (m MemEDVProvider) OpenStore(name string) (edvprovider.EDVStore, error)

OpenStore opens an existing store and returns it.

type MemEDVStore

type MemEDVStore struct {
	// contains filtered or unexported fields
}

MemEDVStore represents an in-memory store with functionality needed for EDV data storage. It wraps an edge-core in-memory store with additional functionality that's needed for EDV operations.

func (MemEDVStore) CreateEDVIndex

func (m MemEDVStore) CreateEDVIndex() error

CreateEDVIndex is not supported in memstore, and calling it will always return an error.

func (MemEDVStore) Get

func (m MemEDVStore) Get(k string) ([]byte, error)

Get fetches the document associated with the given key.

func (MemEDVStore) Put

func (m MemEDVStore) Put(document models.EncryptedDocument) error

Put stores the given document.

func (MemEDVStore) Query

func (m MemEDVStore) Query(query *models.Query) ([]string, error)

Query is not supported in memstore, and calling it will always return an error.

Jump to

Keyboard shortcuts

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