Documentation ¶
Index ¶
- type IPFSStorageDriver
- func (ipfs *IPFSStorageDriver) Create(ctx context.Context, publicKey kyber.Point, data []byte) (string, error)
- func (ipfs *IPFSStorageDriver) Delete(key string) error
- func (ipfs *IPFSStorageDriver) Read(ctx context.Context, privateKey kyber.Scalar, cid string) ([]byte, error)
- func (ipfs *IPFSStorageDriver) Update(key string, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPFSStorageDriver ¶
type IPFSStorageDriver struct {
// contains filtered or unexported fields
}
IPFSStorageDriver implements the StorageDriver interface for IPFS.
func NewIPFSDriver ¶
func NewIPFSDriver(ipfsNodeAddress string, keyManager cryptography.KeyManager) *IPFSStorageDriver
NewIPFSStorageDriver initializes a new IPFS storage driver.
func (*IPFSStorageDriver) Create ¶
func (ipfs *IPFSStorageDriver) Create(ctx context.Context, publicKey kyber.Point, data []byte) (string, error)
Create stores data in IPFS and returns the hash of the stored content.
func (*IPFSStorageDriver) Delete ¶
func (ipfs *IPFSStorageDriver) Delete(key string) error
Delete is not directly supported by IPFS as it is immutable; data will be garbage collected if not pinned.
Click to show internal directories.
Click to hide internal directories.