Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
Adapter implements go-ipld-prime/storage.ReadableStorage and go-ipld-prime/storage.WritableStorage backed by a go-datastore.Datastore.
Optionally, an EscapingFunc may also be set, which transforms the (possibly binary) keys considered acceptable by the go-ipld-prime/storage APIs into a subset that the go-datastore can accept. (Be careful to use any escaping consistently, and be wary of potential unexpected behavior if the escaping function might collapse two distinct keys into the same "escaped" key.)
The go-datastore.Datastore may internally have other configuration, such as key sharding functions, etc, and we don't interfere with that here; such configuration should be handled when creating the go-datastore value.
Contexts given to this system are checked for errors at the beginning of an operation, but otherwise have no effect, because the Datastore API doesn't accept context parameters.