Documentation
¶
Overview ¶
package blocks contains the lowest level of ipfs data structures, the raw block with a checksum.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface {
Multihash() mh.Multihash
Data() []byte
Key() key.Key
String() string
Loggable() map[string]interface{}
}
type RawBlock ¶ added in v0.4.2
type RawBlock struct {
// contains filtered or unexported fields
}
Block is a singular block of data in ipfs
func NewBlock ¶
func NewBlock(data []byte) *RawBlock
NewBlock creates a Block object from opaque data. It will hash the data.
func NewBlockWithHash ¶
func NewBlockWithHash(data []byte, h mh.Multihash) (*RawBlock, error)
NewBlockWithHash creates a new block when the hash of the data is already known, this is used to save time in situations where we are able to be confident that the data is correct
Directories
¶
Path | Synopsis |
---|---|
package blockstore implements a thin wrapper over a datastore, giving a clean interface for Getting and Putting block objects.
|
package blockstore implements a thin wrapper over a datastore, giving a clean interface for Getting and Putting block objects. |
package bloom implements a simple bloom filter.
|
package bloom implements a simple bloom filter. |
package set contains various different types of 'BlockSet's
|
package set contains various different types of 'BlockSet's |
Click to show internal directories.
Click to hide internal directories.