Documentation ¶
Overview ¶
Package cid - provides methods for ContentID struct.
ContentID is wrapper over cid of a file stored in the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentID ¶
type ContentID struct {
// contains filtered or unexported fields
}
ContentID represents a CID.
func NewContentID ¶
NewContentID creates a ContentID object from a cid string.
func NewContentIDFromFile ¶
NewContentIDFromFile creates a ContentID object from a given file.
func NewRandomContentID ¶
func NewRandomContentID() *ContentID
NewRandomContentID creates a random ContentID object.
func (ContentID) CalculateHash ¶
CalculateHash hashes the values of a ContentID.
func (ContentID) Equals ¶
func (n ContentID) Equals(other merkletree.Content) (bool, error)
Equals tests for equality of two ContentIDs.
func (*ContentID) GetHashID ¶
GetHashID gets a 32 bytes hash of this cid string in hex string format
Click to show internal directories.
Click to hide internal directories.