github.com/ipld/go-ipld-prime@v0.21.0/node/basicnode/prototypes.go (about)

     1  package basicnode
     2  
     3  // Prototype embeds a NodePrototype for every kind of Node implementation in this package.
     4  // You can use it like this:
     5  //
     6  //	basicnode.Prototype.Map.NewBuilder().BeginMap() //...
     7  //
     8  // and:
     9  //
    10  //	basicnode.Prototype.String.NewBuilder().AssignString("x") // ...
    11  //
    12  // Most of the prototypes are for one particular Kind of node (e.g. string, int, etc);
    13  // you can use the "Any" style if you want a builder that can accept any kind of data.
    14  var Prototype prototype
    15  
    16  type prototype struct {
    17  	Any    Prototype__Any
    18  	Map    Prototype__Map
    19  	List   Prototype__List
    20  	Bool   Prototype__Bool
    21  	Int    Prototype__Int
    22  	Float  Prototype__Float
    23  	String Prototype__String
    24  	Bytes  Prototype__Bytes
    25  	Link   Prototype__Link
    26  }