ipfs

package
v0.0.0-...-d3ce1e5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Overview

Package ipfs is a wrapper around IPFS UnixFS API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogWriter   io.Writer
	TempRepo    bool
	TempRepoDir string // IPFS repository directory if TempRepo == true
}

type DirEntry

type DirEntry struct {
	Name   string
	Cid    cid.Cid
	Size   uint64
	Type   icore.FileType
	Parent *DirEntry
}

type IPFS

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

func New

func New(ctx context.Context, cfg *Config) (*IPFS, error)

func (*IPFS) GetFile

func (ipfs *IPFS) GetFile(ctx context.Context, f *DirEntry) (files.File, error)

func (*IPFS) Put

func (ipfs *IPFS) Put(ctx context.Context, filename string) (*DirEntry, error)

func (*IPFS) ReadDir

func (ipfs *IPFS) ReadDir(ctx context.Context, f *DirEntry) ([]DirEntry, error)

func (*IPFS) Root

func (ipfs *IPFS) Root() *DirEntry

func (*IPFS) Walk

func (ipfs *IPFS) Walk(ctx context.Context, f *DirEntry, name string) (*DirEntry, error)

Jump to

Keyboard shortcuts

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