Documentation ¶
Index ¶
- Variables
- func CIDVerify(bytes interface{}) bool
- func MultibaseDecodeString(data string) (bytes []byte, err error)
- func UnmarshalBase64UrlJSON(data []byte) ([]byte, error)
- type CID
- func CIDFromBytes(bytes []byte) (*CID, error)
- func CIDFromHash(bytes interface{}, size uint64, cidType types.CIDType, hashType types.HashType) (*CID, error)
- func CIDFromRegistry(bytes []byte) (*CID, error)
- func CIDFromRegistryPublicKey(pubkey interface{}) (*CID, error)
- func CIDFromString(cid string) (*CID, error)
- func NewCID(Type types.CIDType, Hash Multihash, Size uint64) *CID
- func (cid *CID) CopyWith(newType int, newSize uint64) (*CID, error)
- func (cid *CID) DecodeMsgpack(dec *msgpack.Decoder) error
- func (cid CID) EncodeMsgpack(enc *msgpack.Encoder) error
- func (cid *CID) Equals(other *CID) bool
- func (cid *CID) HashCode() int
- func (b CID) MarshalJSON() ([]byte, error)
- func (cid *CID) ToBytes() []byte
- func (cid *CID) ToRegistryCID() ([]byte, error)
- func (cid *CID) ToRegistryEntry() []byte
- func (cid *CID) ToString() (string, error)
- func (cid *CID) UnmarshalJSON(data []byte) error
- type Encoder
- type EncryptedCID
- func (c *EncryptedCID) ChunkSize() int
- func (c *EncryptedCID) DecodeMsgpack(dec *msgpack.Decoder) error
- func (c EncryptedCID) EncodeMsgpack(enc *msgpack.Encoder) error
- func (c EncryptedCID) MarshalJSON() ([]byte, error)
- func (c *EncryptedCID) ToBytes() []byte
- func (c *EncryptedCID) UnmarshalJSON(data []byte) error
- type Multibase
- type Multihash
- func (m *Multihash) Equals(other *Multihash) bool
- func (m *Multihash) FullBytes() []byte
- func (m *Multihash) FunctionType() types.HashType
- func (m *Multihash) HashBytes() []byte
- func (m *Multihash) HashCode() MultihashCode
- func (b Multihash) MarshalJSON() ([]byte, error)
- func (m *Multihash) ToBase32() (string, error)
- func (m *Multihash) ToBase64Url() (string, error)
- func (m *Multihash) ToString() (string, error)
- func (b *Multihash) UnmarshalJSON(data []byte) error
- type MultihashCode
- type NodeId
- type NodeIdCode
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMultibaseEncodingNotSupported = errors.New("multibase encoding not supported")
)
Functions ¶
func MultibaseDecodeString ¶
func UnmarshalBase64UrlJSON ¶
Types ¶
type CID ¶
func CIDFromBytes ¶
func CIDFromHash ¶
func CIDFromRegistry ¶
func CIDFromString ¶
func (*CID) DecodeMsgpack ¶
func (CID) EncodeMsgpack ¶
func (CID) MarshalJSON ¶
func (*CID) ToRegistryCID ¶
func (*CID) ToRegistryEntry ¶
func (*CID) UnmarshalJSON ¶
type EncryptedCID ¶
func DecodeEncryptedCID ¶
func DecodeEncryptedCID(cid string) (*EncryptedCID, error)
func EncryptedCIDFromBytes ¶
func EncryptedCIDFromBytes(data []byte) (*EncryptedCID, error)
func NewEncryptedCID ¶
func (*EncryptedCID) ChunkSize ¶
func (c *EncryptedCID) ChunkSize() int
func (*EncryptedCID) DecodeMsgpack ¶
func (c *EncryptedCID) DecodeMsgpack(dec *msgpack.Decoder) error
func (EncryptedCID) EncodeMsgpack ¶
func (c EncryptedCID) EncodeMsgpack(enc *msgpack.Encoder) error
func (EncryptedCID) MarshalJSON ¶
func (c EncryptedCID) MarshalJSON() ([]byte, error)
func (*EncryptedCID) ToBytes ¶
func (c *EncryptedCID) ToBytes() []byte
func (*EncryptedCID) UnmarshalJSON ¶
func (c *EncryptedCID) UnmarshalJSON(data []byte) error
type Multibase ¶
type Multibase interface { ToHex() (string, error) ToBase32() (string, error) ToBase64Url() (string, error) ToBase58() (string, error) ToString() (string, error) }
func NewMultibase ¶
type Multihash ¶
type Multihash struct {
// contains filtered or unexported fields
}
func MultihashFromBase64Url ¶
func NewMultihash ¶
func (*Multihash) FunctionType ¶
func (*Multihash) HashCode ¶
func (m *Multihash) HashCode() MultihashCode
func (Multihash) MarshalJSON ¶
func (*Multihash) ToBase64Url ¶
func (*Multihash) UnmarshalJSON ¶
type MultihashCode ¶
type MultihashCode = int
type NodeIdCode ¶
type NodeIdCode = int
Click to show internal directories.
Click to hide internal directories.