Documentation
¶
Index ¶
- func AddBytesReaderToIpfs(ctx context.Context, app *App, src io.Reader) (ipfsPath.Resolved, error)
- func AddBytesToIpfs(ctx context.Context, app *App, src []byte) (ipfsPath.Resolved, error)
- func AddFileToIpfs(ctx context.Context, app *App, inputPath string) (ipfsPath.Resolved, error)
- func AddFilesToIpfs(ctx context.Context, app *App, path string) error
- func ConnectToPeers(ctx context.Context, ipfs icore.CoreAPI, peers []string) error
- func CreateNode(ctx context.Context, repoPath string) (*core.IpfsNode, error)
- func CreateRepo(path *string) (string, error)
- func GetFileFromIpfs(ctx context.Context, app *App, cid string) ([]byte, error)
- func GetUnixfsNode(path string) (files.Node, error)
- func SetupPlugins(externalPluginsPath string) error
- func SpawnIpfsNode(ctx context.Context, pathToRepo *string) (icore.CoreAPI, *core.IpfsNode, error)
- func TryImportCollections(pbApp *pocketbase.PocketBase, path string)
- type App
- type LaunchFunc
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBytesReaderToIpfs ¶
Add a file or a directory to IPFS
func AddBytesToIpfs ¶
Add a file or a directory to IPFS
func AddFileToIpfs ¶
Add a file or a directory to IPFS
func AddFilesToIpfs ¶
Recursively add all files in the path to IPFS
func ConnectToPeers ¶
func CreateNode ¶
Creates an IPFS node and returns its coreAPI
func CreateRepo ¶
func GetFileFromIpfs ¶
Get the file that was added once to IPFS
func SetupPlugins ¶
func SpawnIpfsNode ¶
Parses flags and spawns IPFS node
func TryImportCollections ¶
func TryImportCollections(pbApp *pocketbase.PocketBase, path string)
Types ¶
type App ¶
type App struct { IpfsApi iface.CoreAPI IpfsNode *kuboCore.IpfsNode // contains filtered or unexported fields }
func (*App) AddService ¶
func (app *App) AddService(name string, service LaunchFunc)
Add a named service with launch function
func (*App) LaunchServices ¶
func (app *App) LaunchServices()
Launch all services with sync.WaitGroup
type LaunchFunc ¶
Click to show internal directories.
Click to hide internal directories.