Documentation
¶
Index ¶
- func TestFileToString(t *testing.T)
- func TestStorage(t *testing.T)
- type IPFSStorage
- func (s IPFSStorage) GetObject(cid string, payload interface{}) (ok bool)
- func (s IPFSStorage) ManualDagGet(cid string, v interface{}) interface{}
- func (s IPFSStorage) PutObject(payload interface{}) (st string, err error)
- func (s IPFSStorage) StoreFile(filename string) (cid string)
- func (s IPFSStorage) TestIPFS()
- func (s IPFSStorage) UpdateHead(cid string)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestFileToString ¶
func TestStorage ¶
Types ¶
type IPFSStorage ¶
type IPFSStorage struct {
// contains filtered or unexported fields
}
func NewIPFSStore ¶
func NewIPFSStore(url string, folder string) *IPFSStorage
func (IPFSStorage) GetObject ¶
func (s IPFSStorage) GetObject(cid string, payload interface{}) (ok bool)
func (IPFSStorage) ManualDagGet ¶
func (s IPFSStorage) ManualDagGet(cid string, v interface{}) interface{}
func (IPFSStorage) PutObject ¶
func (s IPFSStorage) PutObject(payload interface{}) (st string, err error)
* return the cid, data and eventual error
func (IPFSStorage) StoreFile ¶
func (s IPFSStorage) StoreFile(filename string) (cid string)
Store a file from the file system into IPFS
return its IPFS CID
func (IPFSStorage) TestIPFS ¶
func (s IPFSStorage) TestIPFS()
func (IPFSStorage) UpdateHead ¶
func (s IPFSStorage) UpdateHead(cid string)
Click to show internal directories.
Click to hide internal directories.