Versions in this module Expand all Collapse all v0 v0.28.1 Sep 3, 2024 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.ImmutablePath + Size string + type BadPinNode interface + Err func() error + Path func() path.ImmutablePath + 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.ImmutablePath + 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 + Key func() KeyAPI + 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.ImmutablePath, []string, error) + Routing func() RoutingAPI + Swarm func() SwarmAPI + Unixfs func() UnixfsAPI + WithOptions func(...options.ApiOption) (CoreAPI, 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 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) + Sign func(ctx context.Context, name string, data []byte) (Key, []byte, error) + Verify func(ctx context.Context, keyOrName string, signature, data []byte) (Key, bool, error) + type NameAPI interface + Publish func(ctx context.Context, path path.Path, opts ...options.NamePublishOption) (ipns.Name, 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.ImmutablePath, error) + Diff func(context.Context, path.Path, path.Path) ([]ObjectChange, error) + RmLink func(ctx context.Context, base path.Path, link string) (path.ImmutablePath, error) + type ObjectChange struct + After path.ImmutablePath + Before path.ImmutablePath + Path string + Type ChangeType + type Pin interface + Err func() error + Name func() string + Path func() path.ImmutablePath + 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 + Err func() error + 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 RoutingAPI interface + FindPeer func(context.Context, peer.ID) (peer.AddrInfo, error) + FindProviders func(context.Context, path.Path, ...options.RoutingFindProvidersOption) (<-chan peer.AddrInfo, error) + Get func(context.Context, string) ([]byte, error) + Provide func(context.Context, path.Path, ...options.RoutingProvideOption) error + Put func(ctx context.Context, key string, value []byte, ...) error + 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.ImmutablePath, error) + Get func(context.Context, path.Path) (files.Node, error) + Ls func(context.Context, path.Path, ...options.UnixfsLsOption) (<-chan DirEntry, error)