Documentation ¶
Overview ¶
Package format implements a data format for files in the ipfs filesystem It is not the only format in ipfs, but it is the one that the filesystem assumes
Index ¶
- Variables
- func BytesForMetadata(m *Metadata) ([]byte, error)
- func DataSize(data []byte) (uint64, error)
- func FilePBData(data []byte, totalsize uint64) []byte
- func FolderPBData() []byte
- func FromBytes(data []byte) (*pb.Data, error)
- func UnwrapData(data []byte) ([]byte, error)
- func WrapData(b []byte) []byte
- type Metadata
- type MultiBlock
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidDirLocation = errors.New("found directory node in unexpected place")
View Source
var ErrMalformedFileFormat = errors.New("malformed data in file format")
View Source
var ErrUnrecognizedType = errors.New("unrecognized node type")
Functions ¶
func BytesForMetadata ¶
func FilePBData ¶
func UnwrapData ¶
Types ¶
type Metadata ¶
func MetadataFromBytes ¶
type MultiBlock ¶
type MultiBlock struct { Data []byte // contains filtered or unexported fields }
func (*MultiBlock) AddBlockSize ¶
func (mb *MultiBlock) AddBlockSize(s uint64)
func (*MultiBlock) FileSize ¶
func (mb *MultiBlock) FileSize() uint64
func (*MultiBlock) GetBytes ¶
func (mb *MultiBlock) GetBytes() ([]byte, error)
func (*MultiBlock) NumChildren ¶
func (mb *MultiBlock) NumChildren() int
Directories ¶
Path | Synopsis |
---|---|
package unixfs/io implements convenience objects for working with the ipfs unixfs data format.
|
package unixfs/io implements convenience objects for working with the ipfs unixfs data format. |
Package unixfs_pb is a generated protocol buffer package.
|
Package unixfs_pb is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.