# README
coreiface.CoreAPI
over http rpc
IPFS CoreAPI implementation using HTTP API
This packages implements coreiface.CoreAPI
over the HTTP API.
Documentation
https://pkg.go.dev/github.com/ipfs/kubo/client/rpc
Example
Pin file on your local IPFS node based on its CID:
package main
import (
"context"
"fmt"
"github.com/ipfs/kubo/client/rpc"
path "github.com/ipfs/boxo/coreiface/path"
)
func main() {
// "Connect" to local node
node, err := rpc.NewLocalApi()
if err != nil {
fmt.Printf(err)
return
}
// Pin a given file by its CID
ctx := context.Background()
cid := "bafkreidtuosuw37f5xmn65b3ksdiikajy7pwjjslzj2lxxz2vc4wdy3zku"
p := path.New(cid)
err = node.Pin().Add(ctx, p)
if err != nil {
fmt.Printf(err)
return
}
return
}
# Packages
No description provided by the author
# Functions
ApiAddr reads api file in specified ipfs path.
NewApi constructs HttpApi with specified endpoint.
NewApiWithClient constructs HttpApi with specified endpoint and custom http client.
NewLocalApi tries to construct new HttpApi instance communicating with local IPFS daemon
Daemon api address is pulled from the $IPFS_PATH/api file.
NewPathApi constructs new HttpApi by pulling api address from specified ipfspath.
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ErrApiNotFound if we fail to find a running daemon.
# Interfaces
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author