ipfsApi

package
v0.0.0-...-89f51bc Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Api_Catching

func Api_Catching(path string) []byte

func Api_CloseNode

func Api_CloseNode()

func Api_Get

func Api_Get(path string, outfile string)

func Api_InitNode

func Api_InitNode(tmpNode bool, privateKey string) error

func Api_ServeHTTPGateway

func Api_ServeHTTPGateway() error

func Api_SetBoostarp

func Api_SetBoostarp(bootstarpurl string)

func ClearNode

func ClearNode()

func NewMobileNode

func NewMobileNode(ctx context.Context, repoPath string, privateKey string, bootstarpurl []string, cacheNode bool) (*core.IpfsNode, error)

func ProgressExtract

func ProgressExtract(v int64) int64

Types

type Interface

type Interface interface {

	// Cat returns a reader returning the data under the IPFS path
	Cat(path string) (io.ReadCloser, error)

	Get(hash string, outdir string) error

	Catching(p string) ([]byte, error)
}

Interface ...

type Shell

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

Shell ...

func NewShell

func NewShell(node *core.IpfsNode) *Shell

func (*Shell) Cat

func (s *Shell) Cat(p string) (io.ReadCloser, error)

Cat resolves the ipfs path p and returns a reader for that data, if it exists and is availalbe

func (*Shell) Catching

func (s *Shell) Catching(p string) ([]byte, error)

func (*Shell) CloseShell

func (s *Shell) CloseShell()

func (*Shell) Get

func (s *Shell) Get(ref, outdir string) error

Cat resolves the ipfs path p and returns a reader for that data, if it exists and is availalbe

func (*Shell) ServeHTTPGateway

func (s *Shell) ServeHTTPGateway(repoPath string) (<-chan error, error)

Jump to

Keyboard shortcuts

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