fileservice

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.commonfile.fileservice"
View Source
const (
	ChunkSize = 1 << 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileService

type FileService interface {
	// GetFile gets file from ipfs storage
	GetFile(ctx context.Context, c cid.Cid) (ufsio.ReadSeekCloser, error)
	// AddFile adds file to ipfs storage
	AddFile(ctx context.Context, r io.Reader) (ipld.Node, error)
	// DAGService returns ipld.DAGService object
	DAGService() ipld.DAGService
	// HasCid checks is CID exists
	HasCid(ctx context.Context, c cid.Cid) (exists bool, err error)
	app.Component
}

func New

func New() FileService

Jump to

Keyboard shortcuts

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