Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIPFSAPIAddress ¶
GetIPFSAPIAddress get IPFS API URL from the specified IPFS repository. If ipfsPath == "", then it's default is "~/.ipfs". This is compatible to IPFS client behaviour: https://github.com/ipfs/go-ipfs-http-client/blob/171fcd55e3b743c38fb9d78a34a3a703ee0b5e89/api.go#L69-L81
Types ¶
type Client ¶
type Client struct {
// Address is URL of IPFS API to connect to.
Address string
// Client is http client to use for connecting to IPFS API
Client *http.Client
}
Client is an IPFS API client.
type FileInfo ¶
type FileInfo struct {
Blocks int `json:"Blocks"`
CumulativeSize uint64 `json:"CumulativeSize"`
Hash string `json:"Hash"`
Local bool `json:"Local"`
Size uint64 `json:"Size"`
SizeLocal uint64 `json:"SizeLocal"`
Type string `json:"Type"`
WithLocality bool `json:"WithLocality"`
}
FileInfo represents the information provided by "/api/v0/files/stat" API of IPFS. Please see details at: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-files-stat
Click to show internal directories.
Click to hide internal directories.