Versions in this module Expand all Collapse all v0 v0.0.1 Aug 17, 2020 Changes in this version + func NewCoreAPI(n *core.IpfsNode, opts ...options.ApiOption) (coreiface.CoreAPI, error) + type BlockAPI CoreAPI + func (api *BlockAPI) Get(ctx context.Context, p path.Path) (io.Reader, error) + func (api *BlockAPI) Put(ctx context.Context, src io.Reader, opts ...caopts.BlockPutOption) (coreiface.BlockStat, error) + func (api *BlockAPI) Rm(ctx context.Context, p path.Path, opts ...caopts.BlockRmOption) error + func (api *BlockAPI) Stat(ctx context.Context, p path.Path) (coreiface.BlockStat, error) + type BlockStat struct + func (bs *BlockStat) Path() path.Resolved + func (bs *BlockStat) Size() int + type CoreAPI struct + func (api *CoreAPI) Block() coreiface.BlockAPI + func (api *CoreAPI) Dag() coreiface.APIDagService + func (api *CoreAPI) Dht() coreiface.DhtAPI + func (api *CoreAPI) Key() coreiface.KeyAPI + func (api *CoreAPI) Name() coreiface.NameAPI + func (api *CoreAPI) Object() coreiface.ObjectAPI + func (api *CoreAPI) Pin() coreiface.PinAPI + func (api *CoreAPI) PubSub() coreiface.PubSubAPI + func (api *CoreAPI) ResolveNode(ctx context.Context, p path.Path) (ipld.Node, error) + func (api *CoreAPI) ResolvePath(ctx context.Context, p path.Path) (path.Resolved, error) + func (api *CoreAPI) Swarm() coreiface.SwarmAPI + func (api *CoreAPI) Unixfs() coreiface.UnixfsAPI + func (api *CoreAPI) WithOptions(opts ...options.ApiOption) (coreiface.CoreAPI, error) + type DhtAPI CoreAPI + func (api *DhtAPI) FindPeer(ctx context.Context, p peer.ID) (peer.AddrInfo, error) + func (api *DhtAPI) FindProviders(ctx context.Context, p path.Path, opts ...caopts.DhtFindProvidersOption) (<-chan peer.AddrInfo, error) + func (api *DhtAPI) Provide(ctx context.Context, path path.Path, opts ...caopts.DhtProvideOption) error + type KeyAPI CoreAPI + func (api *KeyAPI) Generate(ctx context.Context, name string, opts ...caopts.KeyGenerateOption) (coreiface.Key, error) + func (api *KeyAPI) List(ctx context.Context) ([]coreiface.Key, error) + func (api *KeyAPI) Remove(ctx context.Context, name string) (coreiface.Key, error) + func (api *KeyAPI) Rename(ctx context.Context, oldName string, newName string, ...) (coreiface.Key, bool, error) + func (api *KeyAPI) Self(ctx context.Context) (coreiface.Key, error) + type Link struct + Hash string + Name string + Size uint64 + type NameAPI CoreAPI + func (api *NameAPI) Publish(ctx context.Context, p path.Path, opts ...caopts.NamePublishOption) (coreiface.IpnsEntry, error) + func (api *NameAPI) Resolve(ctx context.Context, name string, opts ...caopts.NameResolveOption) (path.Path, error) + func (api *NameAPI) Search(ctx context.Context, name string, opts ...caopts.NameResolveOption) (<-chan coreiface.IpnsResult, error) + type Node struct + Data string + Links []Link + type ObjectAPI CoreAPI + func (api *ObjectAPI) AddLink(ctx context.Context, base ipath.Path, name string, child ipath.Path, ...) (ipath.Resolved, error) + func (api *ObjectAPI) AppendData(ctx context.Context, path ipath.Path, r io.Reader) (ipath.Resolved, error) + func (api *ObjectAPI) Data(ctx context.Context, path ipath.Path) (io.Reader, error) + func (api *ObjectAPI) Diff(ctx context.Context, before ipath.Path, after ipath.Path) ([]coreiface.ObjectChange, error) + func (api *ObjectAPI) Get(ctx context.Context, path ipath.Path) (ipld.Node, error) + func (api *ObjectAPI) Links(ctx context.Context, path ipath.Path) ([]*ipld.Link, error) + func (api *ObjectAPI) New(ctx context.Context, opts ...caopts.ObjectNewOption) (ipld.Node, error) + func (api *ObjectAPI) Put(ctx context.Context, src io.Reader, opts ...caopts.ObjectPutOption) (ipath.Resolved, error) + func (api *ObjectAPI) RmLink(ctx context.Context, base ipath.Path, link string) (ipath.Resolved, error) + func (api *ObjectAPI) SetData(ctx context.Context, path ipath.Path, r io.Reader) (ipath.Resolved, error) + func (api *ObjectAPI) Stat(ctx context.Context, path ipath.Path) (*coreiface.ObjectStat, error) + type PinAPI CoreAPI + func (api *PinAPI) Add(ctx context.Context, p path.Path, opts ...caopts.PinAddOption) error + func (api *PinAPI) IsPinned(ctx context.Context, p path.Path, opts ...caopts.PinIsPinnedOption) (string, bool, error) + func (api *PinAPI) Ls(ctx context.Context, opts ...caopts.PinLsOption) (<-chan coreiface.Pin, error) + func (api *PinAPI) Rm(ctx context.Context, p path.Path, opts ...caopts.PinRmOption) error + func (api *PinAPI) Update(ctx context.Context, from path.Path, to path.Path, ...) error + func (api *PinAPI) Verify(ctx context.Context) (<-chan coreiface.PinStatus, error) + type ProviderAPI CoreAPI + func (api *ProviderAPI) Provide(cid cid.Cid) error + type PubSubAPI CoreAPI + func (api *PubSubAPI) Ls(ctx context.Context) ([]string, error) + func (api *PubSubAPI) Peers(ctx context.Context, opts ...caopts.PubSubPeersOption) ([]peer.ID, error) + func (api *PubSubAPI) Publish(ctx context.Context, topic string, data []byte) error + func (api *PubSubAPI) Subscribe(ctx context.Context, topic string, opts ...caopts.PubSubSubscribeOption) (coreiface.PubSubSubscription, error) + type SwarmAPI CoreAPI + func (api *SwarmAPI) Connect(ctx context.Context, pi peer.AddrInfo) error + func (api *SwarmAPI) Disconnect(ctx context.Context, addr ma.Multiaddr) error + func (api *SwarmAPI) KnownAddrs(context.Context) (map[peer.ID][]ma.Multiaddr, error) + func (api *SwarmAPI) ListenAddrs(context.Context) ([]ma.Multiaddr, error) + func (api *SwarmAPI) LocalAddrs(context.Context) ([]ma.Multiaddr, error) + func (api *SwarmAPI) Peers(context.Context) ([]coreiface.ConnectionInfo, error) + type UnixfsAPI CoreAPI + func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options.UnixfsAddOption) (path.Resolved, error) + func (api *UnixfsAPI) Get(ctx context.Context, p path.Path) (files.Node, error) + func (api *UnixfsAPI) Ls(ctx context.Context, p path.Path, opts ...options.UnixfsLsOption) (<-chan coreiface.DirEntry, error)