schema

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2022 License: Apache-2.0, MIT Imports: 17 Imported by: 0

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

View Source
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

View Source
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.

View Source
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.

View Source
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(
	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 = *_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) AsLink() (datamodel.Link, 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 (n Advertisement) LookupByNode(key datamodel.Node) (datamodel.Node, error)

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) 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) AsBool

func (Any) AsBool() (bool, error)

func (Any) AsBytes

func (Any) AsBytes() ([]byte, error)

func (Any) AsFloat

func (Any) AsFloat() (float64, error)

func (Any) AsInt

func (Any) AsInt() (int64, error)
func (Any) AsLink() (datamodel.Link, error)

func (Any) AsString

func (Any) AsString() (string, error)

func (Any) IsAbsent

func (Any) IsAbsent() bool

func (Any) IsNull

func (Any) IsNull() bool

func (Any) Kind

func (Any) Kind() datamodel.Kind

func (Any) Length

func (Any) Length() int64

func (Any) ListIterator

func (Any) ListIterator() datamodel.ListIterator

func (Any) LookupByIndex

func (Any) LookupByIndex(idx int64) (datamodel.Node, error)

func (Any) LookupByNode

func (n Any) LookupByNode(key datamodel.Node) (datamodel.Node, error)

func (Any) LookupBySegment

func (n Any) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (Any) LookupByString

func (n Any) LookupByString(key string) (datamodel.Node, error)

func (Any) MapIterator

func (n Any) MapIterator() datamodel.MapIterator

func (Any) Prototype

func (Any) Prototype() datamodel.NodePrototype

func (Any) Representation

func (n Any) Representation() datamodel.Node

func (Any) Type

func (Any) Type() schema.Type

type Bool

type Bool = *_Bool

Bool matches the IPLD Schema type "Bool". It has bool kind.

func (Bool) AsBool

func (n Bool) AsBool() (bool, error)

func (Bool) AsBytes

func (Bool) AsBytes() ([]byte, error)

func (Bool) AsFloat

func (Bool) AsFloat() (float64, error)

func (Bool) AsInt

func (Bool) AsInt() (int64, error)
func (Bool) AsLink() (datamodel.Link, error)

func (Bool) AsString

func (Bool) AsString() (string, error)

func (Bool) Bool

func (n Bool) Bool() bool

func (Bool) IsAbsent

func (Bool) IsAbsent() bool

func (Bool) IsNull

func (Bool) IsNull() bool

func (Bool) Kind

func (Bool) Kind() datamodel.Kind

func (Bool) Length

func (Bool) Length() int64

func (Bool) ListIterator

func (Bool) ListIterator() datamodel.ListIterator

func (Bool) LookupByIndex

func (Bool) LookupByIndex(idx int64) (datamodel.Node, error)

func (Bool) LookupByNode

func (Bool) LookupByNode(datamodel.Node) (datamodel.Node, error)

func (Bool) LookupBySegment

func (Bool) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (Bool) LookupByString

func (Bool) LookupByString(string) (datamodel.Node, error)

func (Bool) MapIterator

func (Bool) MapIterator() datamodel.MapIterator

func (Bool) Prototype

func (Bool) Prototype() datamodel.NodePrototype

func (Bool) Representation

func (n Bool) Representation() datamodel.Node

func (Bool) Type

func (Bool) Type() schema.Type

type Bytes

type Bytes = *_Bytes

Bytes matches the IPLD Schema type "Bytes". It has bytes kind.

func (Bytes) AsBool

func (Bytes) AsBool() (bool, error)

func (Bytes) AsBytes

func (n Bytes) AsBytes() ([]byte, error)

func (Bytes) AsFloat

func (Bytes) AsFloat() (float64, error)

func (Bytes) AsInt

func (Bytes) AsInt() (int64, error)
func (Bytes) AsLink() (datamodel.Link, error)

func (Bytes) AsString

func (Bytes) AsString() (string, error)

func (Bytes) Bytes

func (n Bytes) Bytes() []byte

func (Bytes) IsAbsent

func (Bytes) IsAbsent() bool

func (Bytes) IsNull

func (Bytes) IsNull() bool

func (Bytes) Kind

func (Bytes) Kind() datamodel.Kind

func (Bytes) Length

func (Bytes) Length() int64

func (Bytes) ListIterator

func (Bytes) ListIterator() datamodel.ListIterator

func (Bytes) LookupByIndex

func (Bytes) LookupByIndex(idx int64) (datamodel.Node, error)

func (Bytes) LookupByNode

func (Bytes) LookupByNode(datamodel.Node) (datamodel.Node, error)

func (Bytes) LookupBySegment

func (Bytes) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (Bytes) LookupByString

func (Bytes) LookupByString(string) (datamodel.Node, error)

func (Bytes) MapIterator

func (Bytes) MapIterator() datamodel.MapIterator

func (Bytes) Prototype

func (Bytes) Prototype() datamodel.NodePrototype

func (Bytes) Representation

func (n Bytes) Representation() datamodel.Node

func (Bytes) Type

func (Bytes) Type() schema.Type

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) AsLink() (datamodel.Link, 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 (n EntryChunk) LookupByNode(key datamodel.Node) (datamodel.Node, error)

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) AsBool

func (Float) AsBool() (bool, error)

func (Float) AsBytes

func (Float) AsBytes() ([]byte, error)

func (Float) AsFloat

func (n Float) AsFloat() (float64, error)

func (Float) AsInt

func (Float) AsInt() (int64, error)
func (Float) AsLink() (datamodel.Link, error)

func (Float) AsString

func (Float) AsString() (string, error)

func (Float) Float

func (n Float) Float() float64

func (Float) IsAbsent

func (Float) IsAbsent() bool

func (Float) IsNull

func (Float) IsNull() bool

func (Float) Kind

func (Float) Kind() datamodel.Kind

func (Float) Length

func (Float) Length() int64

func (Float) ListIterator

func (Float) ListIterator() datamodel.ListIterator

func (Float) LookupByIndex

func (Float) LookupByIndex(idx int64) (datamodel.Node, error)

func (Float) LookupByNode

func (Float) LookupByNode(datamodel.Node) (datamodel.Node, error)

func (Float) LookupBySegment

func (Float) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (Float) LookupByString

func (Float) LookupByString(string) (datamodel.Node, error)

func (Float) MapIterator

func (Float) MapIterator() datamodel.MapIterator

func (Float) Prototype

func (Float) Prototype() datamodel.NodePrototype

func (Float) Representation

func (n Float) Representation() datamodel.Node

func (Float) Type

func (Float) Type() schema.Type

type Int

type Int = *_Int

Int matches the IPLD Schema type "Int". It has int kind.

func (Int) AsBool

func (Int) AsBool() (bool, error)

func (Int) AsBytes

func (Int) AsBytes() ([]byte, error)

func (Int) AsFloat

func (Int) AsFloat() (float64, error)

func (Int) AsInt

func (n Int) AsInt() (int64, error)
func (Int) AsLink() (datamodel.Link, error)

func (Int) AsString

func (Int) AsString() (string, error)

func (Int) Int

func (n Int) Int() int64

func (Int) IsAbsent

func (Int) IsAbsent() bool

func (Int) IsNull

func (Int) IsNull() bool

func (Int) Kind

func (Int) Kind() datamodel.Kind

func (Int) Length

func (Int) Length() int64

func (Int) ListIterator

func (Int) ListIterator() datamodel.ListIterator

func (Int) LookupByIndex

func (Int) LookupByIndex(idx int64) (datamodel.Node, error)

func (Int) LookupByNode

func (Int) LookupByNode(datamodel.Node) (datamodel.Node, error)

func (Int) LookupBySegment

func (Int) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (Int) LookupByString

func (Int) LookupByString(string) (datamodel.Node, error)

func (Int) MapIterator

func (Int) MapIterator() datamodel.MapIterator

func (Int) Prototype

func (Int) Prototype() datamodel.NodePrototype

func (Int) Representation

func (n Int) Representation() datamodel.Node

func (Int) Type

func (Int) Type() schema.Type
type Link = *_Link

Link matches the IPLD Schema type "Link". It has link kind.

func (Link) AsBool

func (Link) AsBool() (bool, error)

func (Link) AsBytes

func (Link) AsBytes() ([]byte, error)

func (Link) AsFloat

func (Link) AsFloat() (float64, error)

func (Link) AsInt

func (Link) AsInt() (int64, error)
func (n Link) AsLink() (datamodel.Link, error)

func (Link) AsString

func (Link) AsString() (string, error)

func (Link) IsAbsent

func (Link) IsAbsent() bool

func (Link) IsNull

func (Link) IsNull() bool

func (Link) Kind

func (Link) Kind() datamodel.Kind

func (Link) Length

func (Link) Length() int64
func (n Link) Link() datamodel.Link

func (Link) ListIterator

func (Link) ListIterator() datamodel.ListIterator

func (Link) LookupByIndex

func (Link) LookupByIndex(idx int64) (datamodel.Node, error)

func (Link) LookupByNode

func (Link) LookupByNode(datamodel.Node) (datamodel.Node, error)

func (Link) LookupBySegment

func (Link) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (Link) LookupByString

func (Link) LookupByString(string) (datamodel.Node, error)

func (Link) MapIterator

func (Link) MapIterator() datamodel.MapIterator

func (Link) Prototype

func (Link) Prototype() datamodel.NodePrototype

func (Link) Representation

func (n Link) Representation() datamodel.Node

func (Link) Type

func (Link) Type() schema.Type

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 = *_Link_Advertisement

Link_Advertisement matches the IPLD Schema type "Link_Advertisement". It has link kind.

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() (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) Length() int64
func (Link_Advertisement) LinkTargetNodePrototype() datamodel.NodePrototype
func (Link_Advertisement) ListIterator() datamodel.ListIterator
func (Link_Advertisement) LookupByIndex(idx int64) (datamodel.Node, error)
func (Link_Advertisement) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)
func (Link_Advertisement) LookupByString(string) (datamodel.Node, error)
func (n Link_Advertisement) Representation() datamodel.Node
func (l Link_Advertisement) ToCid() cid.Cid

ToCid converts a link to CID

type Link_EntryChunk = *_Link_EntryChunk

Link_EntryChunk matches the IPLD Schema type "Link_EntryChunk". It has link kind.

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) 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 (n Link_EntryChunk) Representation() datamodel.Node
func (Link_EntryChunk) Type() schema.Type

type List

type List = *_List

List matches the IPLD Schema type "List". It has list kind.

func (List) AsBool

func (List) AsBool() (bool, error)

func (List) AsBytes

func (List) AsBytes() ([]byte, error)

func (List) AsFloat

func (List) AsFloat() (float64, error)

func (List) AsInt

func (List) AsInt() (int64, error)
func (List) AsLink() (datamodel.Link, error)

func (List) AsString

func (List) AsString() (string, error)

func (List) IsAbsent

func (List) IsAbsent() bool

func (List) IsNull

func (List) IsNull() bool

func (List) Iterator

func (n List) Iterator() *List__Itr

func (List) Kind

func (List) Kind() datamodel.Kind

func (List) Length

func (n List) Length() int64

func (List) ListIterator

func (n List) ListIterator() datamodel.ListIterator

func (List) LookupByIndex

func (n List) LookupByIndex(idx int64) (datamodel.Node, error)

func (List) LookupByNode

func (n List) LookupByNode(k datamodel.Node) (datamodel.Node, error)

func (List) LookupBySegment

func (n List) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (List) LookupByString

func (List) LookupByString(string) (datamodel.Node, error)

func (List) MapIterator

func (List) MapIterator() datamodel.MapIterator

func (List) Prototype

func (List) Prototype() datamodel.NodePrototype

func (List) Representation

func (n List) Representation() datamodel.Node

func (List) Type

func (List) Type() schema.Type

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) AsLink() (datamodel.Link, 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 (n List_Bytes) LookupByNode(k datamodel.Node) (datamodel.Node, error)

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) AsLink() (datamodel.Link, 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 (n List_String) LookupByNode(k datamodel.Node) (datamodel.Node, error)

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 List__Itr

type List__Itr struct {
	// contains filtered or unexported fields
}

func (*List__Itr) Done

func (itr *List__Itr) Done() bool

func (*List__Itr) Next

func (itr *List__Itr) Next() (idx int64, v MaybeAny)

type Map

type Map = *_Map

Map matches the IPLD Schema type "Map". It has map kind.

func (Map) AsBool

func (Map) AsBool() (bool, error)

func (Map) AsBytes

func (Map) AsBytes() ([]byte, error)

func (Map) AsFloat

func (Map) AsFloat() (float64, error)

func (Map) AsInt

func (Map) AsInt() (int64, error)
func (Map) AsLink() (datamodel.Link, error)

func (Map) AsString

func (Map) AsString() (string, error)

func (Map) IsAbsent

func (Map) IsAbsent() bool

func (Map) IsNull

func (Map) IsNull() bool

func (Map) Iterator

func (n Map) Iterator() *Map__Itr

func (Map) Kind

func (Map) Kind() datamodel.Kind

func (Map) Length

func (n Map) Length() int64

func (Map) ListIterator

func (Map) ListIterator() datamodel.ListIterator

func (Map) LookupByIndex

func (Map) LookupByIndex(idx int64) (datamodel.Node, error)

func (Map) LookupByNode

func (n Map) LookupByNode(k datamodel.Node) (datamodel.Node, error)

func (Map) LookupBySegment

func (n Map) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (Map) LookupByString

func (n Map) LookupByString(k string) (datamodel.Node, error)

func (Map) MapIterator

func (n Map) MapIterator() datamodel.MapIterator

func (Map) Prototype

func (Map) Prototype() datamodel.NodePrototype

func (Map) Representation

func (n Map) Representation() datamodel.Node

func (Map) Type

func (Map) Type() schema.Type

type Map__Itr

type Map__Itr struct {
	// contains filtered or unexported fields
}

func (*Map__Itr) Done

func (itr *Map__Itr) Done() bool

func (*Map__Itr) Next

func (itr *Map__Itr) Next() (k String, v MaybeAny)

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

type MaybeAny

type MaybeAny = *_Any__Maybe

func (MaybeAny) AsNode

func (m MaybeAny) AsNode() datamodel.Node

func (MaybeAny) Exists

func (m MaybeAny) Exists() bool

func (MaybeAny) IsAbsent

func (m MaybeAny) IsAbsent() bool

func (MaybeAny) IsNull

func (m MaybeAny) IsNull() bool

func (MaybeAny) Must

func (m MaybeAny) Must() Any

type MaybeBool

type MaybeBool = *_Bool__Maybe

func (MaybeBool) AsNode

func (m MaybeBool) AsNode() datamodel.Node

func (MaybeBool) Exists

func (m MaybeBool) Exists() bool

func (MaybeBool) IsAbsent

func (m MaybeBool) IsAbsent() bool

func (MaybeBool) IsNull

func (m MaybeBool) IsNull() bool

func (MaybeBool) Must

func (m MaybeBool) Must() Bool

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 MaybeInt

type MaybeInt = *_Int__Maybe

func (MaybeInt) AsNode

func (m MaybeInt) AsNode() datamodel.Node

func (MaybeInt) Exists

func (m MaybeInt) Exists() bool

func (MaybeInt) IsAbsent

func (m MaybeInt) IsAbsent() bool

func (MaybeInt) IsNull

func (m MaybeInt) IsNull() bool

func (MaybeInt) Must

func (m MaybeInt) Must() Int
type MaybeLink = *_Link__Maybe

func (MaybeLink) AsNode

func (m MaybeLink) AsNode() datamodel.Node

func (MaybeLink) Exists

func (m MaybeLink) Exists() bool

func (MaybeLink) IsAbsent

func (m MaybeLink) IsAbsent() bool

func (MaybeLink) IsNull

func (m MaybeLink) IsNull() bool

func (MaybeLink) Must

func (m MaybeLink) Must() Link
type MaybeLink_Advertisement = *_Link_Advertisement__Maybe
func (m MaybeLink_Advertisement) Exists() bool
func (m MaybeLink_Advertisement) IsAbsent() bool
func (m MaybeLink_Advertisement) IsNull() bool
type MaybeLink_EntryChunk = *_Link_EntryChunk__Maybe
func (m MaybeLink_EntryChunk) AsNode() datamodel.Node
func (m MaybeLink_EntryChunk) Exists() bool
func (m MaybeLink_EntryChunk) IsAbsent() bool
func (m MaybeLink_EntryChunk) IsNull() bool

type MaybeList

type MaybeList = *_List__Maybe

func (MaybeList) AsNode

func (m MaybeList) AsNode() datamodel.Node

func (MaybeList) Exists

func (m MaybeList) Exists() bool

func (MaybeList) IsAbsent

func (m MaybeList) IsAbsent() bool

func (MaybeList) IsNull

func (m MaybeList) IsNull() bool

func (MaybeList) Must

func (m MaybeList) Must() List

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 MaybeMap

type MaybeMap = *_Map__Maybe

func (MaybeMap) AsNode

func (m MaybeMap) AsNode() datamodel.Node

func (MaybeMap) Exists

func (m MaybeMap) Exists() bool

func (MaybeMap) IsAbsent

func (m MaybeMap) IsAbsent() bool

func (MaybeMap) IsNull

func (m MaybeMap) IsNull() bool

func (MaybeMap) Must

func (m MaybeMap) Must() Map

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) AsBool

func (String) AsBool() (bool, error)

func (String) AsBytes

func (String) AsBytes() ([]byte, error)

func (String) AsFloat

func (String) AsFloat() (float64, error)

func (String) AsInt

func (String) AsInt() (int64, error)
func (String) AsLink() (datamodel.Link, error)

func (String) AsString

func (n String) AsString() (string, error)

func (String) IsAbsent

func (String) IsAbsent() bool

func (String) IsNull

func (String) IsNull() bool

func (String) Kind

func (String) Kind() datamodel.Kind

func (String) Length

func (String) Length() int64

func (String) ListIterator

func (String) ListIterator() datamodel.ListIterator

func (String) LookupByIndex

func (String) LookupByIndex(idx int64) (datamodel.Node, error)

func (String) LookupByNode

func (String) LookupByNode(datamodel.Node) (datamodel.Node, error)

func (String) LookupBySegment

func (String) LookupBySegment(seg datamodel.PathSegment) (datamodel.Node, error)

func (String) LookupByString

func (String) LookupByString(string) (datamodel.Node, error)

func (String) MapIterator

func (String) MapIterator() datamodel.MapIterator

func (String) Prototype

func (String) Prototype() datamodel.NodePrototype

func (String) Representation

func (n String) Representation() datamodel.Node

func (String) String

func (n String) String() string

func (String) Type

func (String) Type() schema.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL