Documentation ¶
Index ¶
- func DecodeCIDFromString(s string) (cid.Cid, error)
- type IPFSProtocol
- func (i *IPFSProtocol) GetData(cid string) ([]byte, error)
- func (i *IPFSProtocol) GetObjectSchema(cid *cid.Cid) (datamodel.Node, error)
- func (i *IPFSProtocol) PutData(data []byte) (*cid.Cid, error)
- func (i *IPFSProtocol) PutObjectSchema(doc *ot.ObjectDoc) (*cid.Cid, error)
- func (i *IPFSProtocol) RemoveFile(cidstr string) error
- type MemoryStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeCIDFromString ¶
DecodeCIDFromString decodes a CID string to a CID.
Types ¶
type IPFSProtocol ¶
IPFSProtocol leverages the IPFSLite library to provide simple file operations.
func (*IPFSProtocol) GetData ¶
func (i *IPFSProtocol) GetData(cid string) ([]byte, error)
GetData returns a file from IPFS.
func (*IPFSProtocol) GetObjectSchema ¶
func (i *IPFSProtocol) GetObjectSchema(cid *cid.Cid) (datamodel.Node, error)
GetObjectSchema returns an object schema from IPFS.
func (*IPFSProtocol) PutData ¶
func (i *IPFSProtocol) PutData(data []byte) (*cid.Cid, error)
PutData puts a file to IPFS and returns the CID.
func (*IPFSProtocol) PutObjectSchema ¶
func (i *IPFSProtocol) PutObjectSchema(doc *ot.ObjectDoc) (*cid.Cid, error)
PutObjectSchema puts an object schema to IPFS and returns the CID.
func (*IPFSProtocol) RemoveFile ¶
func (i *IPFSProtocol) RemoveFile(cidstr string) error
RemoveFile removes a file from IPFS.
type MemoryStore ¶
type MemoryStore struct { storage.WritableStorage // contains filtered or unexported fields }
MemoryStore is a datastore.Batching implementation that stores data in memory.
func (*MemoryStore) Batching ¶
func (ms *MemoryStore) Batching() datastore.Batching
Batching returns the MemoryStore's datastore.Batching implementation.
Click to show internal directories.
Click to hide internal directories.