indexeddb

package module
v0.0.0-...-64dd8ac Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider is an IndexedDB implementation of the storage.Provider interface.

func NewProvider

func NewProvider(name string) (*Provider, error)

NewProvider instantiates a new IndexedDB provider.

func (*Provider) Close

func (p *Provider) Close() error

Close closes all stores created under this store provider. There's nothing to do here, so it always returns nil.

func (*Provider) GetOpenStores

func (p *Provider) GetOpenStores() []storage.Store

GetOpenStores is currently not implemented (TODO #2528).

func (*Provider) GetStoreConfig

func (p *Provider) GetStoreConfig(name string) (storage.StoreConfiguration, error)

GetStoreConfig gets the current store configuration. TODO (#2948) When checking for the store, look for the underlying database instead of the stores open in memory

in order to comply with the interface docs.

func (*Provider) OpenStore

func (p *Provider) OpenStore(name string) (storage.Store, error)

OpenStore opens a store with the given name and returns a handle. If the store has never been opened before, then it is created.

func (*Provider) SetStoreConfig

func (p *Provider) SetStoreConfig(name string, config storage.StoreConfiguration) error

SetStoreConfig sets the configuration on a store. With the current implementation, this does not need to be called in order to use tags and querying. For consistency with other storage implementations, the store configuration is still stored (but it otherwise serves no purpose).

Jump to

Keyboard shortcuts

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