Documentation
¶
Index ¶
- func GetIPFSAPI() *rpc.HttpApi
- func GetIPFSAPIUrl() string
- func IPFSDagPutCBOR(data []byte, pin bool, bb bool) (cid.Cid, error)
- func IPFSDagPutWithOptions(data []byte, inputCodec string, storeCodec string, pin bool, hash string, ...) (cid.Cid, error)
- func ResolveRootCID(name string, cached bool) (cid.Cid, error)
- type DagPutResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIPFSAPI ¶
func GetIPFSAPIUrl ¶
func GetIPFSAPIUrl() string
func IPFSDagPutCBOR ¶
Publish publishes a simple CBOR struct to IPFS and returns the CID. The parameters are the data, a flag whether to pin the data and a flag whether to allow big blocks.
func IPFSDagPutWithOptions ¶
func IPFSDagPutWithOptions(data []byte, inputCodec string, storeCodec string, pin bool, hash string, allowBigBlock bool) (cid.Cid, error)
Publish publishes a simple CBOR struct to IPFS and returns the CID. This is a kludge, as the kubo client/rpc is not working. The parameters are consistent with the correspconding IPFS API call. Ref. https://docs.ipfs.io/reference/http/api/#api-v0-dag-put
func ResolveRootCID ¶ added in v0.7.5
Takes an IPFS path name and returns the root CID. The cached field tells the function whether to use the cached value or not.
Types ¶
type DagPutResponse ¶
type DagPutResponse struct { Cid struct { CidString string `json:"/"` } `json:"Cid"` }
Click to show internal directories.
Click to hide internal directories.