server

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIdentity

func NewIdentity() (*config.Identity, error)

* 创建新的身份

func Start

func Start()

* 启动ipfs的节点

Types

type IpfsPeer

type IpfsPeer struct {
	Context  context.Context
	RepoPath string
	IpfsNode *core.IpfsNode
	CoreAPI  icore.CoreAPI
}

func GetIpfsPeer added in v0.0.2

func GetIpfsPeer() *IpfsPeer

func (*IpfsPeer) AddDirectory added in v0.0.2

func (ipfsPeer *IpfsPeer) AddDirectory(path string) string

func (*IpfsPeer) AddFile added in v0.0.2

func (ipfsPeer *IpfsPeer) AddFile(filename string) string

func (*IpfsPeer) Connect added in v0.0.2

func (ipfsPeer *IpfsPeer) Connect()

func (*IpfsPeer) GetDirectory added in v0.0.2

func (ipfsPeer *IpfsPeer) GetDirectory(cid string, path string) (string, error)

func (*IpfsPeer) GetFile added in v0.0.2

func (ipfsPeer *IpfsPeer) GetFile(cid string, path string) (string, error)

Jump to

Keyboard shortcuts

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