Documentation ¶
Overview ¶
Package schema defines the makeup of an advertisement. An advertisement is used to inform an indexer that there are updates to a provider's content. The IsRm and Entries fields determine how the indexer handles the advertisement. The following table describes this:
IsRm Entries Action
------+-----------+------------------------------------ false | NoEntries | Update metadata false | data | Update metadata and index entries true | NoEntries | Delete content with context ID true | data | Delete specific multihash indexes *
* Deleting entries still requires a context ID, because a multihash can map to multiple contextID/metadata values.
When removing content (IsRm true) the metadata is ignored.
All advertisements update the provider's addresses. To create an advertisement that only updates a provider's address, create an advertisement to remove content using a context ID that is not used.
Index ¶
- Constants
- Variables
- func GoToIpldStrings(strs []string) _List_String
- func IpldToGoStrings(listString List_String) ([]string, error)
- func NewAdvertisementWithFakeSig(lsys ipld.LinkSystem, signKey crypto.PrivKey, previousID Link_Advertisement, ...) (Advertisement, Link_Advertisement, error)
- func NewAdvertisementWithLink(lsys ipld.LinkSystem, signKey crypto.PrivKey, previousID Link_Advertisement, ...) (Advertisement, Link_Advertisement, error)
- func NewListOfMhs(lsys ipld.LinkSystem, mhs []multihash.Multihash) (ipld.Link, error)
- func SignAdvertisement(privkey crypto.PrivKey, ad Advertisement) ([]byte, error)
- func VerifyAdvertisement(ad Advertisement) (peer.ID, error)
- type Advertisement
- func (Advertisement) AsBool() (bool, error)
- func (Advertisement) AsBytes() ([]byte, error)
- func (Advertisement) AsFloat() (float64, error)
- func (Advertisement) AsInt() (int64, error)
- func (Advertisement) AsLink() (datamodel.Link, error)
- func (Advertisement) AsString() (string, error)
- func (Advertisement) IsAbsent() bool
- func (Advertisement) IsNull() bool
- func (Advertisement) Kind() datamodel.Kind
- func (Advertisement) Length() int64
- func (l Advertisement) LinkContext(ctx context.Context) ipld.LinkContext
- func (Advertisement) ListIterator() datamodel.ListIterator
- func (Advertisement) LookupByIndex(idx int64) (datamodel.Node, error)
- func (n Advertisement) LookupByNode(key datamodel.Node) (datamodel.Node, error)
- func (n Advertisement) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (n Advertisement) LookupByString(key string) (datamodel.Node, error)
- func (n Advertisement) MapIterator() datamodel.MapIterator
- func (Advertisement) Prototype() datamodel.NodePrototype
- func (n Advertisement) Representation() datamodel.Node
- func (Advertisement) Type() schema.Type
- type Any
- func (Any) AsBool() (bool, error)
- func (Any) AsBytes() ([]byte, error)
- func (Any) AsFloat() (float64, error)
- func (Any) AsInt() (int64, error)
- func (Any) AsLink() (datamodel.Link, error)
- func (Any) AsString() (string, error)
- func (Any) IsAbsent() bool
- func (Any) IsNull() bool
- func (Any) Kind() datamodel.Kind
- func (Any) Length() int64
- func (Any) ListIterator() datamodel.ListIterator
- func (Any) LookupByIndex(idx int64) (datamodel.Node, error)
- func (n Any) LookupByNode(key datamodel.Node) (datamodel.Node, error)
- func (n Any) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (n Any) LookupByString(key string) (datamodel.Node, error)
- func (n Any) MapIterator() datamodel.MapIterator
- func (Any) Prototype() datamodel.NodePrototype
- func (n Any) Representation() datamodel.Node
- func (Any) Type() schema.Type
- type Bool
- func (n Bool) AsBool() (bool, error)
- func (Bool) AsBytes() ([]byte, error)
- func (Bool) AsFloat() (float64, error)
- func (Bool) AsInt() (int64, error)
- func (Bool) AsLink() (datamodel.Link, error)
- func (Bool) AsString() (string, error)
- func (n Bool) Bool() bool
- func (Bool) IsAbsent() bool
- func (Bool) IsNull() bool
- func (Bool) Kind() datamodel.Kind
- func (Bool) Length() int64
- func (Bool) ListIterator() datamodel.ListIterator
- func (Bool) LookupByIndex(idx int64) (datamodel.Node, error)
- func (Bool) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (Bool) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (Bool) LookupByString(string) (datamodel.Node, error)
- func (Bool) MapIterator() datamodel.MapIterator
- func (Bool) Prototype() datamodel.NodePrototype
- func (n Bool) Representation() datamodel.Node
- func (Bool) Type() schema.Type
- type Bytes
- func (Bytes) AsBool() (bool, error)
- func (n Bytes) AsBytes() ([]byte, error)
- func (Bytes) AsFloat() (float64, error)
- func (Bytes) AsInt() (int64, error)
- func (Bytes) AsLink() (datamodel.Link, error)
- func (Bytes) AsString() (string, error)
- func (n Bytes) Bytes() []byte
- func (Bytes) IsAbsent() bool
- func (Bytes) IsNull() bool
- func (Bytes) Kind() datamodel.Kind
- func (Bytes) Length() int64
- func (Bytes) ListIterator() datamodel.ListIterator
- func (Bytes) LookupByIndex(idx int64) (datamodel.Node, error)
- func (Bytes) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (Bytes) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (Bytes) LookupByString(string) (datamodel.Node, error)
- func (Bytes) MapIterator() datamodel.MapIterator
- func (Bytes) Prototype() datamodel.NodePrototype
- func (n Bytes) Representation() datamodel.Node
- func (Bytes) Type() schema.Type
- type EntryChunk
- func (EntryChunk) AsBool() (bool, error)
- func (EntryChunk) AsBytes() ([]byte, error)
- func (EntryChunk) AsFloat() (float64, error)
- func (EntryChunk) AsInt() (int64, error)
- func (EntryChunk) AsLink() (datamodel.Link, error)
- func (EntryChunk) AsString() (string, error)
- func (EntryChunk) IsAbsent() bool
- func (EntryChunk) IsNull() bool
- func (EntryChunk) Kind() datamodel.Kind
- func (EntryChunk) Length() int64
- func (EntryChunk) ListIterator() datamodel.ListIterator
- func (EntryChunk) LookupByIndex(idx int64) (datamodel.Node, error)
- func (n EntryChunk) LookupByNode(key datamodel.Node) (datamodel.Node, error)
- func (n EntryChunk) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (n EntryChunk) LookupByString(key string) (datamodel.Node, error)
- func (n EntryChunk) MapIterator() datamodel.MapIterator
- func (EntryChunk) Prototype() datamodel.NodePrototype
- func (n EntryChunk) Representation() datamodel.Node
- func (EntryChunk) Type() schema.Type
- type Float
- func (Float) AsBool() (bool, error)
- func (Float) AsBytes() ([]byte, error)
- func (n Float) AsFloat() (float64, error)
- func (Float) AsInt() (int64, error)
- func (Float) AsLink() (datamodel.Link, error)
- func (Float) AsString() (string, error)
- func (n Float) Float() float64
- func (Float) IsAbsent() bool
- func (Float) IsNull() bool
- func (Float) Kind() datamodel.Kind
- func (Float) Length() int64
- func (Float) ListIterator() datamodel.ListIterator
- func (Float) LookupByIndex(idx int64) (datamodel.Node, error)
- func (Float) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (Float) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (Float) LookupByString(string) (datamodel.Node, error)
- func (Float) MapIterator() datamodel.MapIterator
- func (Float) Prototype() datamodel.NodePrototype
- func (n Float) Representation() datamodel.Node
- func (Float) Type() schema.Type
- type Int
- func (Int) AsBool() (bool, error)
- func (Int) AsBytes() ([]byte, error)
- func (Int) AsFloat() (float64, error)
- func (n Int) AsInt() (int64, error)
- func (Int) AsLink() (datamodel.Link, error)
- func (Int) AsString() (string, error)
- func (n Int) Int() int64
- func (Int) IsAbsent() bool
- func (Int) IsNull() bool
- func (Int) Kind() datamodel.Kind
- func (Int) Length() int64
- func (Int) ListIterator() datamodel.ListIterator
- func (Int) LookupByIndex(idx int64) (datamodel.Node, error)
- func (Int) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (Int) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (Int) LookupByString(string) (datamodel.Node, error)
- func (Int) MapIterator() datamodel.MapIterator
- func (Int) Prototype() datamodel.NodePrototype
- func (n Int) Representation() datamodel.Node
- func (Int) Type() schema.Type
- type Link
- func (Link) AsBool() (bool, error)
- func (Link) AsBytes() ([]byte, error)
- func (Link) AsFloat() (float64, error)
- func (Link) AsInt() (int64, error)
- func (n Link) AsLink() (datamodel.Link, error)
- func (Link) AsString() (string, error)
- func (Link) IsAbsent() bool
- func (Link) IsNull() bool
- func (Link) Kind() datamodel.Kind
- func (Link) Length() int64
- func (n Link) Link() datamodel.Link
- func (Link) ListIterator() datamodel.ListIterator
- func (Link) LookupByIndex(idx int64) (datamodel.Node, error)
- func (Link) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (Link) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (Link) LookupByString(string) (datamodel.Node, error)
- func (Link) MapIterator() datamodel.MapIterator
- func (Link) Prototype() datamodel.NodePrototype
- func (n Link) Representation() datamodel.Node
- func (Link) Type() schema.Type
- type LinkContextKey
- type LinkContextValue
- type Link_Advertisement
- func (Link_Advertisement) AsBool() (bool, error)
- func (Link_Advertisement) AsBytes() ([]byte, error)
- func (Link_Advertisement) AsFloat() (float64, error)
- func (Link_Advertisement) AsInt() (int64, error)
- func (n Link_Advertisement) AsLink() (datamodel.Link, error)
- func (Link_Advertisement) AsString() (string, error)
- func (Link_Advertisement) IsAbsent() bool
- func (Link_Advertisement) IsNull() bool
- func (Link_Advertisement) Kind() datamodel.Kind
- func (Link_Advertisement) Length() int64
- func (n Link_Advertisement) Link() datamodel.Link
- func (Link_Advertisement) LinkTargetNodePrototype() datamodel.NodePrototype
- func (Link_Advertisement) ListIterator() datamodel.ListIterator
- func (Link_Advertisement) LookupByIndex(idx int64) (datamodel.Node, error)
- func (Link_Advertisement) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (Link_Advertisement) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (Link_Advertisement) LookupByString(string) (datamodel.Node, error)
- func (Link_Advertisement) MapIterator() datamodel.MapIterator
- func (Link_Advertisement) Prototype() datamodel.NodePrototype
- func (n Link_Advertisement) Representation() datamodel.Node
- func (l Link_Advertisement) ToCid() cid.Cid
- func (Link_Advertisement) Type() schema.Type
- type Link_EntryChunk
- func (Link_EntryChunk) AsBool() (bool, error)
- func (Link_EntryChunk) AsBytes() ([]byte, error)
- func (Link_EntryChunk) AsFloat() (float64, error)
- func (Link_EntryChunk) AsInt() (int64, error)
- func (n Link_EntryChunk) AsLink() (datamodel.Link, error)
- func (Link_EntryChunk) AsString() (string, error)
- func (Link_EntryChunk) IsAbsent() bool
- func (Link_EntryChunk) IsNull() bool
- func (Link_EntryChunk) Kind() datamodel.Kind
- func (Link_EntryChunk) Length() int64
- func (n Link_EntryChunk) Link() datamodel.Link
- func (Link_EntryChunk) LinkTargetNodePrototype() datamodel.NodePrototype
- func (Link_EntryChunk) ListIterator() datamodel.ListIterator
- func (Link_EntryChunk) LookupByIndex(idx int64) (datamodel.Node, error)
- func (Link_EntryChunk) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (Link_EntryChunk) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (Link_EntryChunk) LookupByString(string) (datamodel.Node, error)
- func (Link_EntryChunk) MapIterator() datamodel.MapIterator
- func (Link_EntryChunk) Prototype() datamodel.NodePrototype
- func (n Link_EntryChunk) Representation() datamodel.Node
- func (Link_EntryChunk) Type() schema.Type
- type List
- func (List) AsBool() (bool, error)
- func (List) AsBytes() ([]byte, error)
- func (List) AsFloat() (float64, error)
- func (List) AsInt() (int64, error)
- func (List) AsLink() (datamodel.Link, error)
- func (List) AsString() (string, error)
- func (List) IsAbsent() bool
- func (List) IsNull() bool
- func (n List) Iterator() *List__Itr
- func (List) Kind() datamodel.Kind
- func (n List) Length() int64
- func (n List) ListIterator() datamodel.ListIterator
- func (n List) LookupByIndex(idx int64) (datamodel.Node, error)
- func (n List) LookupByNode(k datamodel.Node) (datamodel.Node, error)
- func (n List) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (List) LookupByString(string) (datamodel.Node, error)
- func (List) MapIterator() datamodel.MapIterator
- func (List) Prototype() datamodel.NodePrototype
- func (n List) Representation() datamodel.Node
- func (List) Type() schema.Type
- type List_Bytes
- func (List_Bytes) AsBool() (bool, error)
- func (List_Bytes) AsBytes() ([]byte, error)
- func (List_Bytes) AsFloat() (float64, error)
- func (List_Bytes) AsInt() (int64, error)
- func (List_Bytes) AsLink() (datamodel.Link, error)
- func (List_Bytes) AsString() (string, error)
- func (List_Bytes) IsAbsent() bool
- func (List_Bytes) IsNull() bool
- func (n List_Bytes) Iterator() *List_Bytes__Itr
- func (List_Bytes) Kind() datamodel.Kind
- func (n List_Bytes) Length() int64
- func (n List_Bytes) ListIterator() datamodel.ListIterator
- func (n List_Bytes) LookupByIndex(idx int64) (datamodel.Node, error)
- func (n List_Bytes) LookupByNode(k datamodel.Node) (datamodel.Node, error)
- func (n List_Bytes) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (List_Bytes) LookupByString(string) (datamodel.Node, error)
- func (List_Bytes) MapIterator() datamodel.MapIterator
- func (List_Bytes) Prototype() datamodel.NodePrototype
- func (n List_Bytes) Representation() datamodel.Node
- func (List_Bytes) Type() schema.Type
- type List_Bytes__Itr
- type List_String
- func (List_String) AsBool() (bool, error)
- func (List_String) AsBytes() ([]byte, error)
- func (List_String) AsFloat() (float64, error)
- func (List_String) AsInt() (int64, error)
- func (List_String) AsLink() (datamodel.Link, error)
- func (List_String) AsString() (string, error)
- func (List_String) IsAbsent() bool
- func (List_String) IsNull() bool
- func (n List_String) Iterator() *List_String__Itr
- func (List_String) Kind() datamodel.Kind
- func (n List_String) Length() int64
- func (n List_String) ListIterator() datamodel.ListIterator
- func (n List_String) LookupByIndex(idx int64) (datamodel.Node, error)
- func (n List_String) LookupByNode(k datamodel.Node) (datamodel.Node, error)
- func (n List_String) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (List_String) LookupByString(string) (datamodel.Node, error)
- func (List_String) MapIterator() datamodel.MapIterator
- func (List_String) Prototype() datamodel.NodePrototype
- func (n List_String) Representation() datamodel.Node
- func (List_String) Type() schema.Type
- type List_String__Itr
- type List__Itr
- type Map
- func (Map) AsBool() (bool, error)
- func (Map) AsBytes() ([]byte, error)
- func (Map) AsFloat() (float64, error)
- func (Map) AsInt() (int64, error)
- func (Map) AsLink() (datamodel.Link, error)
- func (Map) AsString() (string, error)
- func (Map) IsAbsent() bool
- func (Map) IsNull() bool
- func (n Map) Iterator() *Map__Itr
- func (Map) Kind() datamodel.Kind
- func (n Map) Length() int64
- func (Map) ListIterator() datamodel.ListIterator
- func (Map) LookupByIndex(idx int64) (datamodel.Node, error)
- func (n Map) LookupByNode(k datamodel.Node) (datamodel.Node, error)
- func (n Map) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (n Map) LookupByString(k string) (datamodel.Node, error)
- func (n Map) MapIterator() datamodel.MapIterator
- func (Map) Prototype() datamodel.NodePrototype
- func (n Map) Representation() datamodel.Node
- func (Map) Type() schema.Type
- type Map__Itr
- type MaybeAdvertisement
- type MaybeAny
- type MaybeBool
- type MaybeBytes
- type MaybeEntryChunk
- type MaybeFloat
- type MaybeInt
- type MaybeLink
- type MaybeLink_Advertisement
- type MaybeLink_EntryChunk
- type MaybeList
- type MaybeList_Bytes
- type MaybeList_String
- type MaybeMap
- type MaybeString
- type String
- func (String) AsBool() (bool, error)
- func (String) AsBytes() ([]byte, error)
- func (String) AsFloat() (float64, error)
- func (String) AsInt() (int64, error)
- func (String) AsLink() (datamodel.Link, error)
- func (n String) AsString() (string, error)
- func (String) IsAbsent() bool
- func (String) IsNull() bool
- func (String) Kind() datamodel.Kind
- func (String) Length() int64
- func (String) ListIterator() datamodel.ListIterator
- func (String) LookupByIndex(idx int64) (datamodel.Node, error)
- func (String) LookupByNode(datamodel.Node) (datamodel.Node, error)
- func (String) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
- func (String) LookupByString(string) (datamodel.Node, error)
- func (String) MapIterator() datamodel.MapIterator
- func (String) Prototype() datamodel.NodePrototype
- func (n String) Representation() datamodel.Node
- func (n String) String() string
- func (String) Type() schema.Type
Constants ¶
const ( // IsAdKey is a LinkContextValue that determines the schema type the // link belongs to. This is used to understand what callback to trigger // in the linksystem when we come across a specific linkType. IsAdKey = LinkContextKey("isAdLink") // ContextID must not exceed this number of bytes. MaxContextIDLen = 64 )
Variables ¶
var Linkproto = cidlink.LinkPrototype{ Prefix: cid.Prefix{ Version: 1, Codec: uint64(multicodec.DagJson), MhType: uint64(multicodec.Sha2_256), MhLength: 16, }, }
Linkproto is the ipld.LinkProtocol used for the ingestion protocol. Refer to it if you have encoding questions.
var NoEntries cidlink.Link
NoEntries is a special value used to explicitly indicate that an advertisement does not have any entries. When isRm is true it and serves to remove content by context ID, and when isRm is false it serves to update metadata only.
var Type typeSlab
Type is a struct embeding a NodePrototype/Type for every Node implementation in this package. One of its major uses is to start the construction of a value. You can use it like this:
schema.Type.YourTypeName.NewBuilder().BeginMap() //...
and:
schema.Type.OtherTypeName.NewBuilder().AssignString("x") // ...
Functions ¶
func GoToIpldStrings ¶
func GoToIpldStrings(strs []string) _List_String
func IpldToGoStrings ¶
func IpldToGoStrings(listString List_String) ([]string, error)
func NewAdvertisementWithFakeSig ¶
func NewAdvertisementWithFakeSig( lsys ipld.LinkSystem, signKey crypto.PrivKey, previousID Link_Advertisement, entries ipld.Link, contextID []byte, metadata v0.Metadata, isRm bool, provider string, addrs []string) (Advertisement, Link_Advertisement, error)
NewAdvertisementWithFakeSig creates a new advertisement from an index with its corresponsing link.
func NewAdvertisementWithLink ¶
func NewAdvertisementWithLink( lsys ipld.LinkSystem, signKey crypto.PrivKey, previousID Link_Advertisement, entries ipld.Link, contextID []byte, metadata v0.Metadata, isRm bool, provider string, addrs []string) (Advertisement, Link_Advertisement, error)
NewAdvertisementWithLink creates a new advertisement from an index with its corresponsing link.
func NewListOfMhs ¶
func NewListOfMhs(lsys ipld.LinkSystem, mhs []multihash.Multihash) (ipld.Link, error)
NewListOfMhs is a convenient method to create a new list of bytes from a list of multihashes that may be consumed by a linksystem.
func SignAdvertisement ¶ added in v0.3.2
func SignAdvertisement(privkey crypto.PrivKey, ad Advertisement) ([]byte, error)
SignAdvertisement signs an advertisement using the given private key.
func VerifyAdvertisement ¶
func VerifyAdvertisement(ad Advertisement) (peer.ID, error)
VerifyAdvertisement verifies that the advertisement has been signed and generated correctly. Returns the peer ID of the signer.
Types ¶
type Advertisement ¶
type Advertisement = *_Advertisement
Advertisement matches the IPLD Schema type "Advertisement". It has struct type-kind, and may be interrogated like map kind.
func NewAdvertisement ¶
func NewAdvertisement( signKey crypto.PrivKey, previousID Link_Advertisement, entries ipld.Link, contextID []byte, metadata v0.Metadata, isRm bool, provider string, addrs []string) (Advertisement, error)
NewAdvertisement creates a new advertisement without link to let developerse choose the linking strategy they want to follow
func (Advertisement) AsBool ¶
func (Advertisement) AsBool() (bool, error)
func (Advertisement) AsBytes ¶
func (Advertisement) AsBytes() ([]byte, error)
func (Advertisement) AsFloat ¶
func (Advertisement) AsFloat() (float64, error)
func (Advertisement) AsInt ¶
func (Advertisement) AsInt() (int64, error)
func (Advertisement) AsString ¶
func (Advertisement) AsString() (string, error)
func (Advertisement) IsAbsent ¶
func (Advertisement) IsAbsent() bool
func (Advertisement) IsNull ¶
func (Advertisement) IsNull() bool
func (Advertisement) Kind ¶
func (Advertisement) Kind() datamodel.Kind
func (Advertisement) Length ¶
func (Advertisement) Length() int64
func (Advertisement) LinkContext ¶
func (l Advertisement) LinkContext(ctx context.Context) ipld.LinkContext
LinkContext returns a linkContext for the type of link
func (Advertisement) ListIterator ¶
func (Advertisement) ListIterator() datamodel.ListIterator
func (Advertisement) LookupByIndex ¶
func (Advertisement) LookupByIndex(idx int64) (datamodel.Node, error)
func (Advertisement) LookupByNode ¶
func (Advertisement) LookupBySegment ¶
func (n Advertisement) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
func (Advertisement) LookupByString ¶
func (n Advertisement) LookupByString(key string) (datamodel.Node, error)
func (Advertisement) MapIterator ¶
func (n Advertisement) MapIterator() datamodel.MapIterator
func (Advertisement) Prototype ¶
func (Advertisement) Prototype() datamodel.NodePrototype
func (Advertisement) Representation ¶
func (n Advertisement) Representation() datamodel.Node
func (Advertisement) Type ¶
func (Advertisement) Type() schema.Type
type Any ¶
type Any = *_Any
Any matches the IPLD Schema type "Any". Any has union typekind, which means its data model behaviors are that of a map kind.
func (Any) ListIterator ¶
func (Any) ListIterator() datamodel.ListIterator
func (Any) LookupBySegment ¶
func (Any) MapIterator ¶
func (n Any) MapIterator() datamodel.MapIterator
func (Any) Prototype ¶
func (Any) Prototype() datamodel.NodePrototype
func (Any) Representation ¶
type Bool ¶
type Bool = *_Bool
Bool matches the IPLD Schema type "Bool". It has bool kind.
func (Bool) ListIterator ¶
func (Bool) ListIterator() datamodel.ListIterator
func (Bool) LookupBySegment ¶
func (Bool) MapIterator ¶
func (Bool) MapIterator() datamodel.MapIterator
func (Bool) Prototype ¶
func (Bool) Prototype() datamodel.NodePrototype
func (Bool) Representation ¶
type Bytes ¶
type Bytes = *_Bytes
Bytes matches the IPLD Schema type "Bytes". It has bytes kind.
func (Bytes) ListIterator ¶
func (Bytes) ListIterator() datamodel.ListIterator
func (Bytes) LookupBySegment ¶
func (Bytes) MapIterator ¶
func (Bytes) MapIterator() datamodel.MapIterator
func (Bytes) Prototype ¶
func (Bytes) Prototype() datamodel.NodePrototype
func (Bytes) Representation ¶
type EntryChunk ¶
type EntryChunk = *_EntryChunk
EntryChunk matches the IPLD Schema type "EntryChunk". It has struct type-kind, and may be interrogated like map kind.
func NewLinkedListOfMhs ¶
func NewLinkedListOfMhs(lsys ipld.LinkSystem, mhs []multihash.Multihash, next ipld.Link) (ipld.Link, EntryChunk, error)
NewLinkedListOfMhs creates a new element of a linked list that can be used to paginate large lists.
func (EntryChunk) AsBool ¶
func (EntryChunk) AsBool() (bool, error)
func (EntryChunk) AsBytes ¶
func (EntryChunk) AsBytes() ([]byte, error)
func (EntryChunk) AsFloat ¶
func (EntryChunk) AsFloat() (float64, error)
func (EntryChunk) AsInt ¶
func (EntryChunk) AsInt() (int64, error)
func (EntryChunk) AsString ¶
func (EntryChunk) AsString() (string, error)
func (EntryChunk) IsAbsent ¶
func (EntryChunk) IsAbsent() bool
func (EntryChunk) IsNull ¶
func (EntryChunk) IsNull() bool
func (EntryChunk) Kind ¶
func (EntryChunk) Kind() datamodel.Kind
func (EntryChunk) Length ¶
func (EntryChunk) Length() int64
func (EntryChunk) ListIterator ¶
func (EntryChunk) ListIterator() datamodel.ListIterator
func (EntryChunk) LookupByIndex ¶
func (EntryChunk) LookupByIndex(idx int64) (datamodel.Node, error)
func (EntryChunk) LookupByNode ¶
func (EntryChunk) LookupBySegment ¶
func (n EntryChunk) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
func (EntryChunk) LookupByString ¶
func (n EntryChunk) LookupByString(key string) (datamodel.Node, error)
func (EntryChunk) MapIterator ¶
func (n EntryChunk) MapIterator() datamodel.MapIterator
func (EntryChunk) Prototype ¶
func (EntryChunk) Prototype() datamodel.NodePrototype
func (EntryChunk) Representation ¶
func (n EntryChunk) Representation() datamodel.Node
func (EntryChunk) Type ¶
func (EntryChunk) Type() schema.Type
type Float ¶
type Float = *_Float
Float matches the IPLD Schema type "Float". It has float kind.
func (Float) ListIterator ¶
func (Float) ListIterator() datamodel.ListIterator
func (Float) LookupBySegment ¶
func (Float) MapIterator ¶
func (Float) MapIterator() datamodel.MapIterator
func (Float) Prototype ¶
func (Float) Prototype() datamodel.NodePrototype
func (Float) Representation ¶
type Int ¶
type Int = *_Int
Int matches the IPLD Schema type "Int". It has int kind.
func (Int) ListIterator ¶
func (Int) ListIterator() datamodel.ListIterator
func (Int) LookupBySegment ¶
func (Int) MapIterator ¶
func (Int) MapIterator() datamodel.MapIterator
func (Int) Prototype ¶
func (Int) Prototype() datamodel.NodePrototype
func (Int) Representation ¶
type Link ¶
type Link = *_Link
Link matches the IPLD Schema type "Link". It has link kind.
func (Link) ListIterator ¶
func (Link) ListIterator() datamodel.ListIterator
func (Link) LookupBySegment ¶
func (Link) MapIterator ¶
func (Link) MapIterator() datamodel.MapIterator
func (Link) Prototype ¶
func (Link) Prototype() datamodel.NodePrototype
func (Link) Representation ¶
type LinkContextKey ¶
type LinkContextKey string
LinkContextKey used to propagate link info through the linkSystem context
type LinkContextValue ¶
type LinkContextValue bool
LinkContextValue used to propagate link info through the linkSystem context
type Link_Advertisement ¶
type Link_Advertisement = *_Link_Advertisement
Link_Advertisement matches the IPLD Schema type "Link_Advertisement". It has link kind.
func AdvertisementLink ¶
func AdvertisementLink(lsys ipld.LinkSystem, adv Advertisement) (Link_Advertisement, error)
AdvertisementLink generates a new link from an advertisemenet using a specific linkSystem
func LinkAdvFromCid ¶
func LinkAdvFromCid(c cid.Cid) Link_Advertisement
LinkAdvFromCid creates a link advertisement from a CID
func (Link_Advertisement) AsBool ¶
func (Link_Advertisement) AsBool() (bool, error)
func (Link_Advertisement) AsBytes ¶
func (Link_Advertisement) AsBytes() ([]byte, error)
func (Link_Advertisement) AsFloat ¶
func (Link_Advertisement) AsFloat() (float64, error)
func (Link_Advertisement) AsInt ¶
func (Link_Advertisement) AsInt() (int64, error)
func (Link_Advertisement) AsString ¶
func (Link_Advertisement) AsString() (string, error)
func (Link_Advertisement) IsAbsent ¶
func (Link_Advertisement) IsAbsent() bool
func (Link_Advertisement) IsNull ¶
func (Link_Advertisement) IsNull() bool
func (Link_Advertisement) Kind ¶
func (Link_Advertisement) Kind() datamodel.Kind
func (Link_Advertisement) Length ¶
func (Link_Advertisement) Length() int64
func (Link_Advertisement) Link ¶
func (n Link_Advertisement) Link() datamodel.Link
func (Link_Advertisement) LinkTargetNodePrototype ¶
func (Link_Advertisement) LinkTargetNodePrototype() datamodel.NodePrototype
func (Link_Advertisement) ListIterator ¶
func (Link_Advertisement) ListIterator() datamodel.ListIterator
func (Link_Advertisement) LookupByIndex ¶
func (Link_Advertisement) LookupByIndex(idx int64) (datamodel.Node, error)
func (Link_Advertisement) LookupByNode ¶
func (Link_Advertisement) LookupBySegment ¶
func (Link_Advertisement) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
func (Link_Advertisement) LookupByString ¶
func (Link_Advertisement) LookupByString(string) (datamodel.Node, error)
func (Link_Advertisement) MapIterator ¶
func (Link_Advertisement) MapIterator() datamodel.MapIterator
func (Link_Advertisement) Prototype ¶
func (Link_Advertisement) Prototype() datamodel.NodePrototype
func (Link_Advertisement) Representation ¶
func (n Link_Advertisement) Representation() datamodel.Node
func (Link_Advertisement) ToCid ¶
func (l Link_Advertisement) ToCid() cid.Cid
ToCid converts a link to CID
func (Link_Advertisement) Type ¶
func (Link_Advertisement) Type() schema.Type
type Link_EntryChunk ¶
type Link_EntryChunk = *_Link_EntryChunk
Link_EntryChunk matches the IPLD Schema type "Link_EntryChunk". It has link kind.
func (Link_EntryChunk) AsBool ¶
func (Link_EntryChunk) AsBool() (bool, error)
func (Link_EntryChunk) AsBytes ¶
func (Link_EntryChunk) AsBytes() ([]byte, error)
func (Link_EntryChunk) AsFloat ¶
func (Link_EntryChunk) AsFloat() (float64, error)
func (Link_EntryChunk) AsInt ¶
func (Link_EntryChunk) AsInt() (int64, error)
func (Link_EntryChunk) AsString ¶
func (Link_EntryChunk) AsString() (string, error)
func (Link_EntryChunk) IsAbsent ¶
func (Link_EntryChunk) IsAbsent() bool
func (Link_EntryChunk) IsNull ¶
func (Link_EntryChunk) IsNull() bool
func (Link_EntryChunk) Kind ¶
func (Link_EntryChunk) Kind() datamodel.Kind
func (Link_EntryChunk) Length ¶
func (Link_EntryChunk) Length() int64
func (Link_EntryChunk) Link ¶
func (n Link_EntryChunk) Link() datamodel.Link
func (Link_EntryChunk) LinkTargetNodePrototype ¶
func (Link_EntryChunk) LinkTargetNodePrototype() datamodel.NodePrototype
func (Link_EntryChunk) ListIterator ¶
func (Link_EntryChunk) ListIterator() datamodel.ListIterator
func (Link_EntryChunk) LookupByIndex ¶
func (Link_EntryChunk) LookupByIndex(idx int64) (datamodel.Node, error)
func (Link_EntryChunk) LookupByNode ¶
func (Link_EntryChunk) LookupBySegment ¶
func (Link_EntryChunk) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
func (Link_EntryChunk) LookupByString ¶
func (Link_EntryChunk) LookupByString(string) (datamodel.Node, error)
func (Link_EntryChunk) MapIterator ¶
func (Link_EntryChunk) MapIterator() datamodel.MapIterator
func (Link_EntryChunk) Prototype ¶
func (Link_EntryChunk) Prototype() datamodel.NodePrototype
func (Link_EntryChunk) Representation ¶
func (n Link_EntryChunk) Representation() datamodel.Node
func (Link_EntryChunk) Type ¶
func (Link_EntryChunk) Type() schema.Type
type List ¶
type List = *_List
List matches the IPLD Schema type "List". It has list kind.
func (List) ListIterator ¶
func (n List) ListIterator() datamodel.ListIterator
func (List) LookupBySegment ¶
func (List) MapIterator ¶
func (List) MapIterator() datamodel.MapIterator
func (List) Prototype ¶
func (List) Prototype() datamodel.NodePrototype
func (List) Representation ¶
type List_Bytes ¶
type List_Bytes = *_List_Bytes
List_Bytes matches the IPLD Schema type "List_Bytes". It has list kind.
func NewListBytesFromMhs ¶
func NewListBytesFromMhs(mhs []multihash.Multihash) List_Bytes
NewListBytesFromMhs converts multihashes to a list of bytes
func (List_Bytes) AsBool ¶
func (List_Bytes) AsBool() (bool, error)
func (List_Bytes) AsBytes ¶
func (List_Bytes) AsBytes() ([]byte, error)
func (List_Bytes) AsFloat ¶
func (List_Bytes) AsFloat() (float64, error)
func (List_Bytes) AsInt ¶
func (List_Bytes) AsInt() (int64, error)
func (List_Bytes) AsString ¶
func (List_Bytes) AsString() (string, error)
func (List_Bytes) IsAbsent ¶
func (List_Bytes) IsAbsent() bool
func (List_Bytes) IsNull ¶
func (List_Bytes) IsNull() bool
func (List_Bytes) Iterator ¶
func (n List_Bytes) Iterator() *List_Bytes__Itr
func (List_Bytes) Kind ¶
func (List_Bytes) Kind() datamodel.Kind
func (List_Bytes) Length ¶
func (n List_Bytes) Length() int64
func (List_Bytes) ListIterator ¶
func (n List_Bytes) ListIterator() datamodel.ListIterator
func (List_Bytes) LookupByIndex ¶
func (n List_Bytes) LookupByIndex(idx int64) (datamodel.Node, error)
func (List_Bytes) LookupByNode ¶
func (List_Bytes) LookupBySegment ¶
func (n List_Bytes) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
func (List_Bytes) LookupByString ¶
func (List_Bytes) LookupByString(string) (datamodel.Node, error)
func (List_Bytes) MapIterator ¶
func (List_Bytes) MapIterator() datamodel.MapIterator
func (List_Bytes) Prototype ¶
func (List_Bytes) Prototype() datamodel.NodePrototype
func (List_Bytes) Representation ¶
func (n List_Bytes) Representation() datamodel.Node
func (List_Bytes) Type ¶
func (List_Bytes) Type() schema.Type
type List_Bytes__Itr ¶
type List_Bytes__Itr struct {
// contains filtered or unexported fields
}
func (*List_Bytes__Itr) Done ¶
func (itr *List_Bytes__Itr) Done() bool
func (*List_Bytes__Itr) Next ¶
func (itr *List_Bytes__Itr) Next() (idx int64, v Bytes)
type List_String ¶
type List_String = *_List_String
List_String matches the IPLD Schema type "List_String". It has list kind.
func (List_String) AsBool ¶
func (List_String) AsBool() (bool, error)
func (List_String) AsBytes ¶
func (List_String) AsBytes() ([]byte, error)
func (List_String) AsFloat ¶
func (List_String) AsFloat() (float64, error)
func (List_String) AsInt ¶
func (List_String) AsInt() (int64, error)
func (List_String) AsString ¶
func (List_String) AsString() (string, error)
func (List_String) IsAbsent ¶
func (List_String) IsAbsent() bool
func (List_String) IsNull ¶
func (List_String) IsNull() bool
func (List_String) Iterator ¶
func (n List_String) Iterator() *List_String__Itr
func (List_String) Kind ¶
func (List_String) Kind() datamodel.Kind
func (List_String) Length ¶
func (n List_String) Length() int64
func (List_String) ListIterator ¶
func (n List_String) ListIterator() datamodel.ListIterator
func (List_String) LookupByIndex ¶
func (n List_String) LookupByIndex(idx int64) (datamodel.Node, error)
func (List_String) LookupByNode ¶
func (List_String) LookupBySegment ¶
func (n List_String) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
func (List_String) LookupByString ¶
func (List_String) LookupByString(string) (datamodel.Node, error)
func (List_String) MapIterator ¶
func (List_String) MapIterator() datamodel.MapIterator
func (List_String) Prototype ¶
func (List_String) Prototype() datamodel.NodePrototype
func (List_String) Representation ¶
func (n List_String) Representation() datamodel.Node
func (List_String) Type ¶
func (List_String) Type() schema.Type
type List_String__Itr ¶
type List_String__Itr struct {
// contains filtered or unexported fields
}
func (*List_String__Itr) Done ¶
func (itr *List_String__Itr) Done() bool
func (*List_String__Itr) Next ¶
func (itr *List_String__Itr) Next() (idx int64, v String)
type Map ¶
type Map = *_Map
Map matches the IPLD Schema type "Map". It has map kind.
func (Map) ListIterator ¶
func (Map) ListIterator() datamodel.ListIterator
func (Map) LookupBySegment ¶
func (Map) MapIterator ¶
func (n Map) MapIterator() datamodel.MapIterator
func (Map) Prototype ¶
func (Map) Prototype() datamodel.NodePrototype
func (Map) Representation ¶
type MaybeAdvertisement ¶
type MaybeAdvertisement = *_Advertisement__Maybe
func (MaybeAdvertisement) AsNode ¶
func (m MaybeAdvertisement) AsNode() datamodel.Node
func (MaybeAdvertisement) Exists ¶
func (m MaybeAdvertisement) Exists() bool
func (MaybeAdvertisement) IsAbsent ¶
func (m MaybeAdvertisement) IsAbsent() bool
func (MaybeAdvertisement) IsNull ¶
func (m MaybeAdvertisement) IsNull() bool
func (MaybeAdvertisement) Must ¶
func (m MaybeAdvertisement) Must() Advertisement
type MaybeBytes ¶
type MaybeBytes = *_Bytes__Maybe
func (MaybeBytes) AsNode ¶
func (m MaybeBytes) AsNode() datamodel.Node
func (MaybeBytes) Exists ¶
func (m MaybeBytes) Exists() bool
func (MaybeBytes) IsAbsent ¶
func (m MaybeBytes) IsAbsent() bool
func (MaybeBytes) IsNull ¶
func (m MaybeBytes) IsNull() bool
func (MaybeBytes) Must ¶
func (m MaybeBytes) Must() Bytes
type MaybeEntryChunk ¶
type MaybeEntryChunk = *_EntryChunk__Maybe
func (MaybeEntryChunk) AsNode ¶
func (m MaybeEntryChunk) AsNode() datamodel.Node
func (MaybeEntryChunk) Exists ¶
func (m MaybeEntryChunk) Exists() bool
func (MaybeEntryChunk) IsAbsent ¶
func (m MaybeEntryChunk) IsAbsent() bool
func (MaybeEntryChunk) IsNull ¶
func (m MaybeEntryChunk) IsNull() bool
func (MaybeEntryChunk) Must ¶
func (m MaybeEntryChunk) Must() EntryChunk
type MaybeFloat ¶
type MaybeFloat = *_Float__Maybe
func (MaybeFloat) AsNode ¶
func (m MaybeFloat) AsNode() datamodel.Node
func (MaybeFloat) Exists ¶
func (m MaybeFloat) Exists() bool
func (MaybeFloat) IsAbsent ¶
func (m MaybeFloat) IsAbsent() bool
func (MaybeFloat) IsNull ¶
func (m MaybeFloat) IsNull() bool
func (MaybeFloat) Must ¶
func (m MaybeFloat) Must() Float
type MaybeLink_Advertisement ¶
type MaybeLink_Advertisement = *_Link_Advertisement__Maybe
func (MaybeLink_Advertisement) AsNode ¶
func (m MaybeLink_Advertisement) AsNode() datamodel.Node
func (MaybeLink_Advertisement) Exists ¶
func (m MaybeLink_Advertisement) Exists() bool
func (MaybeLink_Advertisement) IsAbsent ¶
func (m MaybeLink_Advertisement) IsAbsent() bool
func (MaybeLink_Advertisement) IsNull ¶
func (m MaybeLink_Advertisement) IsNull() bool
func (MaybeLink_Advertisement) Must ¶
func (m MaybeLink_Advertisement) Must() Link_Advertisement
type MaybeLink_EntryChunk ¶
type MaybeLink_EntryChunk = *_Link_EntryChunk__Maybe
func (MaybeLink_EntryChunk) AsNode ¶
func (m MaybeLink_EntryChunk) AsNode() datamodel.Node
func (MaybeLink_EntryChunk) Exists ¶
func (m MaybeLink_EntryChunk) Exists() bool
func (MaybeLink_EntryChunk) IsAbsent ¶
func (m MaybeLink_EntryChunk) IsAbsent() bool
func (MaybeLink_EntryChunk) IsNull ¶
func (m MaybeLink_EntryChunk) IsNull() bool
func (MaybeLink_EntryChunk) Must ¶
func (m MaybeLink_EntryChunk) Must() Link_EntryChunk
type MaybeList_Bytes ¶
type MaybeList_Bytes = *_List_Bytes__Maybe
func (MaybeList_Bytes) AsNode ¶
func (m MaybeList_Bytes) AsNode() datamodel.Node
func (MaybeList_Bytes) Exists ¶
func (m MaybeList_Bytes) Exists() bool
func (MaybeList_Bytes) IsAbsent ¶
func (m MaybeList_Bytes) IsAbsent() bool
func (MaybeList_Bytes) IsNull ¶
func (m MaybeList_Bytes) IsNull() bool
func (MaybeList_Bytes) Must ¶
func (m MaybeList_Bytes) Must() List_Bytes
type MaybeList_String ¶
type MaybeList_String = *_List_String__Maybe
func (MaybeList_String) AsNode ¶
func (m MaybeList_String) AsNode() datamodel.Node
func (MaybeList_String) Exists ¶
func (m MaybeList_String) Exists() bool
func (MaybeList_String) IsAbsent ¶
func (m MaybeList_String) IsAbsent() bool
func (MaybeList_String) IsNull ¶
func (m MaybeList_String) IsNull() bool
func (MaybeList_String) Must ¶
func (m MaybeList_String) Must() List_String
type MaybeString ¶
type MaybeString = *_String__Maybe
func (MaybeString) AsNode ¶
func (m MaybeString) AsNode() datamodel.Node
func (MaybeString) Exists ¶
func (m MaybeString) Exists() bool
func (MaybeString) IsAbsent ¶
func (m MaybeString) IsAbsent() bool
func (MaybeString) IsNull ¶
func (m MaybeString) IsNull() bool
func (MaybeString) Must ¶
func (m MaybeString) Must() String
type String ¶
type String = *_String
String matches the IPLD Schema type "String". It has string kind.
func (String) ListIterator ¶
func (String) ListIterator() datamodel.ListIterator
func (String) LookupBySegment ¶
func (String) MapIterator ¶
func (String) MapIterator() datamodel.MapIterator
func (String) Prototype ¶
func (String) Prototype() datamodel.NodePrototype