Documentation ¶
Index ¶
Constants ¶
View Source
const SchemaBitswap = "bitswap"
Deprecated: use the more versatile SchemaPeer instead. For more information, read IPIP-417.
View Source
const SchemaPeer = "peer"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitswapPayload ¶
type BitswapRecord
deprecated
type PeerRecord ¶
type PeerRecord struct { Schema string ID *peer.ID Addrs []Multiaddr Protocols []string // Extra contains extra fields that were included in the original JSON raw // message, except for the known ones represented by the remaining fields. Extra map[string]json.RawMessage }
func (*PeerRecord) GetSchema ¶
func (pr *PeerRecord) GetSchema() string
func (PeerRecord) MarshalJSON ¶
func (pr PeerRecord) MarshalJSON() ([]byte, error)
func (*PeerRecord) UnmarshalJSON ¶
func (pr *PeerRecord) UnmarshalJSON(b []byte) error
type UnknownRecord ¶
type UnknownRecord struct { Schema string // Bytes contains the raw JSON bytes that were used to unmarshal this record. // This value can be used, for example, to unmarshal de record into a different // type if Schema is of a known value. Bytes []byte }
func (*UnknownRecord) GetSchema ¶
func (ur *UnknownRecord) GetSchema() string
func (UnknownRecord) MarshalJSON ¶
func (ur UnknownRecord) MarshalJSON() ([]byte, error)
func (*UnknownRecord) UnmarshalJSON ¶
func (ur *UnknownRecord) UnmarshalJSON(b []byte) error
type WriteBitswapRecord
deprecated
type WriteBitswapRecord struct { Schema string Protocol string Signature string // this content must be untouched because it is signed and we need to verify it RawPayload json.RawMessage `json:"Payload"` Payload BitswapPayload `json:"-"` }
Deprecated: protocol-agnostic provide is being worked on in IPIP-378:
func (*WriteBitswapRecord) GetSchema ¶
func (wr *WriteBitswapRecord) GetSchema() string
func (*WriteBitswapRecord) IsSigned ¶
func (p *WriteBitswapRecord) IsSigned() bool
func (*WriteBitswapRecord) UnmarshalJSON ¶
func (p *WriteBitswapRecord) UnmarshalJSON(b []byte) error
func (*WriteBitswapRecord) Verify ¶
func (p *WriteBitswapRecord) Verify() error
type WriteBitswapRecordResponse
deprecated
Source Files ¶
Click to show internal directories.
Click to hide internal directories.