filesharego

package module
v0.0.0-...-51c0092 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: GPL-3.0 Imports: 24 Imported by: 2

README

filesharego

GO package used by KISS file sharing P2P program found here: https://github.com/ofman/fsgui

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToPeers

func ConnectToPeers(ctx context.Context, ipfs icore.CoreAPI, peers []string) error

for the future file sharing

func CreateNode

func CreateNode(ctx context.Context, repoPath string) (*core.IpfsNode, error)

Creates an IPFS node and returns its coreAPI.

func CreateTempRepo

func CreateTempRepo() (string, error)

func DownloadFromCid

func DownloadFromCid(cidStr string, isCli bool) (outputPath string, err error, progress int64)

func ErrorCheck

func ErrorCheck(err error, isCli bool) error

func ForeverSpin

func ForeverSpin()

func GetCidStrFromString

func GetCidStrFromString(str string) (cidStr string)

func GetUnixfsNode

func GetUnixfsNode(path string) (files.Node, error)

func SetupPlugins

func SetupPlugins(externalPluginsPath string) error

func SpawnEphemeral

func SpawnEphemeral(ctx context.Context) (icore.CoreAPI, *core.IpfsNode, error)

Spawns a node to be used just for this run (i.e. creates a tmp repo).

func UploadFiles

func UploadFiles(flagFilePath string, isCli bool) (cidStr string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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