api

package
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2022 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCoreAPI

func NewCoreAPI(n *core.IpfsNode, c ipfsiface.CoreAPI, opts ...options.ApiOption) (fxfsiface.CoreAPI, error)

NewCoreAPI creates new instance of IPFS CoreAPI backed by go-ipfs Node.

Types

type CoreAPI

type CoreAPI struct {
	// contains filtered or unexported fields
}

func (*CoreAPI) PrivateFS

func (api *CoreAPI) PrivateFS() fxfsiface.PrivateFS

PrivateFS unixfs returns the UnixfsAPI interface implementation backed by the go-ipfs node

func (*CoreAPI) PublicFS

func (api *CoreAPI) PublicFS() fxfsiface.PublicFS

PublicFS block returns the BlockAPI interface implementation backed by the go-ipfs node

func (*CoreAPI) WithIPFSOptions

func (api *CoreAPI) WithIPFSOptions(opts ...options.ApiOption) (fxfsiface.CoreAPI, error)

WithIPFSOptions withOptions returns fxCoreAPI api with global options applied

type PrivateAPI

type PrivateAPI CoreAPI

func (*PrivateAPI) Add

func (api *PrivateAPI) Add(ctx context.Context, files files.Node, opts ...options.UnixfsAddOption) (path.Resolved, error)

func (*PrivateAPI) Get

func (api *PrivateAPI) Get(ctx context.Context, p path.Path) (files.Node, error)

func (*PrivateAPI) Ls

func (api *PrivateAPI) Ls(ctx context.Context, p path.Path, opts ...options.UnixfsLsOption) (<-chan iface.DirEntry, error)

type PublicAPI

type PublicAPI CoreAPI

func (*PublicAPI) Add

func (api *PublicAPI) Add(ctx context.Context, files files.Node, opts ...options.UnixfsAddOption) (path.Resolved, error)

func (*PublicAPI) Get

func (api *PublicAPI) Get(ctx context.Context, p path.Path) (files.Node, error)

func (*PublicAPI) Ls

func (api *PublicAPI) Ls(ctx context.Context, p path.Path, opts ...options.UnixfsLsOption) (<-chan iface.DirEntry, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL