ipfs

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddResult

type AddResult struct {
	Cid     string   `json:"cid"`
	Objects []Object `json:"Objects"`
}

AddResult ...

type Client

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

Client IPFS client

func NewClient

func NewClient(host string) (*Client, error)

NewClient create new IPFS client

func (*Client) Add

func (c *Client) Add(srcs ...*File) (*AddResult, error)

Add add files

func (*Client) Cat

func (c *Client) Cat(cid string) ([]byte, error)

Cat cat file

func (*Client) CatStream

func (c *Client) CatStream(path string) (io.ReadCloser, error)

Cat cat file using stream

func (*Client) Ping

func (c *Client) Ping() error

Ping test network

type File

type File struct {
	Reader io.Reader
	Name   string
}

File ipfs file to upload

type Object

type Object struct {
	Bytes string
	Hash  string
	Name  string
	Size  string
}

Object ...

Jump to

Keyboard shortcuts

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