package
0.5.3-beta.0
Repository: https://github.com/cpchain/chain.git
Documentation: pkg.go.dev

# Functions

NewFakeIpfsAdapter creates a new FakeIpfsAdapter instance.
NewIpfsDB creates a new IpfsDatabase instance with given url which is the IPFS node's API url.
NewIpfsDbWithAdapter creates a new IpfsDatabase instance with given IPFS adapter.
NewLDBDatabase returns a LevelDB wrapped object.
No description provided by the author
NewTable returns a Database object that prefixes all keys with a given string.

# Constants

Code using batches should try to add this much data to the batch.

# Variables

No description provided by the author
No description provided by the author

# Structs

DummyDatabase is a dummy "remote database" which actually save all data to key, i.e.
FakeIpfsAdapter is a fake IPFS for unit test.
IpfsDatabase is a IPFS-based database.
No description provided by the author
No description provided by the author

# Interfaces

Batch is a write-only database that commits changes to its host database when Write is called.
Database wraps all database operations.
Deleter wraps the database delete operation supported by both batches and regular databases.
IpfsAdapter represents an adapter for IPFS access.
Putter wraps the database write operation supported by both batches and regular databases.
RemoteDatabase represents the database interface that offloads data to distributed storage such as ipfs.