Documentation ¶
Index ¶
- func NewDefaultNodeWithFSRepo(ctx context.Context, repoPath string) (*core.IpfsNode, error)
- func NewTmpDirNode(ctx context.Context) (*core.IpfsNode, error)
- type Interface
- type Shell
- func (s *Shell) Add(r io.Reader) (string, error)
- func (s *Shell) AddLink(target string) (string, error)
- func (s *Shell) Cat(p string) (io.ReadCloser, error)
- func (s *Shell) Get(ref, outdir string) error
- func (s *Shell) List(ipath string) ([]*sh.LsLink, error)
- func (s *Shell) NewObject(template string) (string, error)
- func (s *Shell) Patch(root, action string, args ...string) (string, error)
- func (s *Shell) PatchLink(root, npath, childhash string, create bool) (string, error)
- func (s *Shell) ResolvePath(ipath string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interface ¶
type Interface interface { // Add reads everything from the Reader and returns the IPFS hash Add(io.Reader) (string, error) // Cat returns a reader returning the data under the IPFS path Cat(path string) (io.ReadCloser, error) // AddDir(dir string) (string, error) Get(hash string, outdir string) error }
Interface ...
type Shell ¶
type Shell struct {
// contains filtered or unexported fields
}
Shell ...
func NewShellWithContext ¶
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) Get ¶
Cat resolves the ipfs path p and returns a reader for that data, if it exists and is availalbe
func (*Shell) Patch ¶
TODO: extract all this logic from the core/commands/object.go to avoid dupe code
Click to show internal directories.
Click to hide internal directories.