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
Click to show internal directories.
Click to hide internal directories.