Versions in this module Expand all Collapse all v0 v0.5.0 Aug 17, 2020 Changes in this version + var ErrConnNotFound = errors.New("conn not found") + var ErrIsDir = errors.New("this dag node is a directory") + var ErrNotConnected = errors.New("not connected") + var ErrNotFile = errors.New("this dag node is not a regular file") + var ErrNotSupported = errors.New("operation not supported") + var ErrOffline = errors.New("this action must be run in online mode, try running 'ipfs daemon' first") + var ErrResolveFailed = errors.New("could not resolve name") + func FormatKey(key Key) string + func FormatKeyID(id peer.ID) string + type APIDagService interface + Pinning func() ipld.NodeAdder + type AddEvent struct + Bytes int64 + Name string + Path path.Resolved + Size string + type BadPinNode interface + Err func() error + Path func() path.Resolved + type BlockAPI interface + Get func(context.Context, path.Path) (io.Reader, error) + Put func(context.Context, io.Reader, ...options.BlockPutOption) (BlockStat, error) + Rm func(context.Context, path.Path, ...options.BlockRmOption) error + Stat func(context.Context, path.Path) (BlockStat, error) + type BlockStat interface + Path func() path.Resolved + Size func() int + type ChangeType int + const DiffAdd + const DiffMod + const DiffRemove + type ConnectionInfo interface + Address func() ma.Multiaddr + Direction func() network.Direction + ID func() peer.ID + Latency func() (time.Duration, error) + Streams func() ([]protocol.ID, error) + type CoreAPI interface + Block func() BlockAPI + Dag func() APIDagService + Dht func() DhtAPI + Key func() KeyAPI + Link func() LinkAPI + Name func() NameAPI + Object func() ObjectAPI + Pin func() PinAPI + PubSub func() PubSubAPI + ResolveNode func(context.Context, path.Path) (ipld.Node, error) + ResolvePath func(context.Context, path.Path) (path.Resolved, error) + Swarm func() SwarmAPI + Unixfs func() UnixfsAPI + WithOptions func(...options.ApiOption) (CoreAPI, error) + type DhtAPI interface + FindPeer func(context.Context, peer.ID) (peer.AddrInfo, error) + FindProviders func(context.Context, path.Path, ...options.DhtFindProvidersOption) (<-chan peer.AddrInfo, error) + Provide func(context.Context, path.Path, ...options.DhtProvideOption) error + type DirEntry struct + Cid cid.Cid + Err error + Name string + Size uint64 + Target string + Type FileType + type FileType int32 + const TDirectory + const TFile + const TSymlink + const TUnknown + func (t FileType) String() string + type IpnsEntry interface + Name func() string + Value func() path.Path + type IpnsResult struct + Err error + type Key interface + ID func() peer.ID + Name func() string + Path func() path.Path + type KeyAPI interface + Generate func(ctx context.Context, name string, opts ...options.KeyGenerateOption) (Key, error) + List func(ctx context.Context) ([]Key, error) + Remove func(ctx context.Context, name string) (Key, error) + Rename func(ctx context.Context, oldName string, newName string, ...) (Key, bool, error) + Self func(ctx context.Context) (Key, error) + type LinkAPI interface + type NameAPI interface + Publish func(ctx context.Context, path path.Path, opts ...options.NamePublishOption) (IpnsEntry, error) + Resolve func(ctx context.Context, name string, opts ...options.NameResolveOption) (path.Path, error) + Search func(ctx context.Context, name string, opts ...options.NameResolveOption) (<-chan IpnsResult, error) + type ObjectAPI interface + AddLink func(ctx context.Context, base path.Path, name string, child path.Path, ...) (path.Resolved, error) + AppendData func(context.Context, path.Path, io.Reader) (path.Resolved, error) + Data func(context.Context, path.Path) (io.Reader, error) + Diff func(context.Context, path.Path, path.Path) ([]ObjectChange, error) + Get func(context.Context, path.Path) (ipld.Node, error) + Links func(context.Context, path.Path) ([]*ipld.Link, error) + New func(context.Context, ...options.ObjectNewOption) (ipld.Node, error) + Put func(context.Context, io.Reader, ...options.ObjectPutOption) (path.Resolved, error) + RmLink func(ctx context.Context, base path.Path, link string) (path.Resolved, error) + SetData func(context.Context, path.Path, io.Reader) (path.Resolved, error) + Stat func(context.Context, path.Path) (*ObjectStat, error) + type ObjectChange struct + After path.Resolved + Before path.Resolved + Path string + Type ChangeType + type ObjectStat struct + BlockSize int + Cid cid.Cid + CumulativeSize int + DataSize int + LinksSize int + NumLinks int + type Pin interface + Err func() error + Path func() path.Resolved + Type func() string + type PinAPI interface + Add func(context.Context, path.Path, ...options.PinAddOption) error + IsPinned func(context.Context, path.Path, ...options.PinIsPinnedOption) (string, bool, error) + Ls func(context.Context, ...options.PinLsOption) (<-chan Pin, error) + Rm func(context.Context, path.Path, ...options.PinRmOption) error + Update func(ctx context.Context, from path.Path, to path.Path, ...) error + Verify func(context.Context) (<-chan PinStatus, error) + type PinStatus interface + BadNodes func() []BadPinNode + Ok func() bool + type PubSubAPI interface + Ls func(context.Context) ([]string, error) + Peers func(context.Context, ...options.PubSubPeersOption) ([]peer.ID, error) + Publish func(context.Context, string, []byte) error + Subscribe func(context.Context, string, ...options.PubSubSubscribeOption) (PubSubSubscription, error) + type PubSubMessage interface + Data func() []byte + From func() peer.ID + Seq func() []byte + Topics func() []string + type PubSubSubscription interface + Next func(context.Context) (PubSubMessage, error) + type ReadSeekCloser interface + type Reader interface + CtxReadFull func(context.Context, []byte) (int, error) + Size func() uint64 + type SwarmAPI interface + Connect func(context.Context, peer.AddrInfo) error + Disconnect func(context.Context, ma.Multiaddr) error + KnownAddrs func(context.Context) (map[peer.ID][]ma.Multiaddr, error) + ListenAddrs func(context.Context) ([]ma.Multiaddr, error) + LocalAddrs func(context.Context) ([]ma.Multiaddr, error) + Peers func(context.Context) ([]ConnectionInfo, error) + type UnixfsAPI interface + Add func(context.Context, files.Node, ...options.UnixfsAddOption) (path.Resolved, error) + Get func(context.Context, path.Path) (files.Node, error) + Ls func(context.Context, path.Path, ...options.UnixfsLsOption) (<-chan DirEntry, error)