github.com/ipld/go-ipld-prime@v0.21.0/node/gendemo/ipldsch_types.go (about)

     1  package gendemo
     2  
     3  // Code generated by go-ipld-prime gengo.  DO NOT EDIT.
     4  
     5  import (
     6  	"github.com/ipld/go-ipld-prime/datamodel"
     7  )
     8  
     9  var _ datamodel.Node = nil // suppress errors when this dependency is not referenced
    10  // Type is a struct embeding a NodePrototype/Type for every Node implementation in this package.
    11  // One of its major uses is to start the construction of a value.
    12  // You can use it like this:
    13  //
    14  //	gendemo.Type.YourTypeName.NewBuilder().BeginMap() //...
    15  //
    16  // and:
    17  //
    18  //	gendemo.Type.OtherTypeName.NewBuilder().AssignString("x") // ...
    19  var Type typeSlab
    20  
    21  type typeSlab struct {
    22  	Bar                     _Bar__Prototype
    23  	Bar__Repr               _Bar__ReprPrototype
    24  	Baz                     _Baz__Prototype
    25  	Baz__Repr               _Baz__ReprPrototype
    26  	Foo                     _Foo__Prototype
    27  	Foo__Repr               _Foo__ReprPrototype
    28  	Int                     _Int__Prototype
    29  	Int__Repr               _Int__ReprPrototype
    30  	Map__String__Msg3       _Map__String__Msg3__Prototype
    31  	Map__String__Msg3__Repr _Map__String__Msg3__ReprPrototype
    32  	Msg3                    _Msg3__Prototype
    33  	Msg3__Repr              _Msg3__ReprPrototype
    34  	String                  _String__Prototype
    35  	String__Repr            _String__ReprPrototype
    36  	UnionKinded             _UnionKinded__Prototype
    37  	UnionKinded__Repr       _UnionKinded__ReprPrototype
    38  }
    39  
    40  // --- type definitions follow ---
    41  
    42  // Bar matches the IPLD Schema type "Bar".  It has bool kind.
    43  type Bar = *_Bar
    44  type _Bar struct{ x bool }
    45  
    46  // Baz matches the IPLD Schema type "Baz".  It has string kind.
    47  type Baz = *_Baz
    48  type _Baz struct{ x string }
    49  
    50  // Foo matches the IPLD Schema type "Foo".  It has int kind.
    51  type Foo = *_Foo
    52  type _Foo struct{ x int64 }
    53  
    54  // Int matches the IPLD Schema type "Int".  It has int kind.
    55  type Int = *_Int
    56  type _Int struct{ x int64 }
    57  
    58  // Map__String__Msg3 matches the IPLD Schema type "Map__String__Msg3".  It has map kind.
    59  type Map__String__Msg3 = *_Map__String__Msg3
    60  type _Map__String__Msg3 struct {
    61  	m map[_String]*_Msg3
    62  	t []_Map__String__Msg3__entry
    63  }
    64  type _Map__String__Msg3__entry struct {
    65  	k _String
    66  	v _Msg3
    67  }
    68  
    69  // Msg3 matches the IPLD Schema type "Msg3".  It has struct type-kind, and may be interrogated like map kind.
    70  type Msg3 = *_Msg3
    71  type _Msg3 struct {
    72  	whee _Int
    73  	woot _Int
    74  	waga _Int
    75  }
    76  
    77  // String matches the IPLD Schema type "String".  It has string kind.
    78  type String = *_String
    79  type _String struct{ x string }
    80  
    81  // UnionKinded matches the IPLD Schema type "UnionKinded".
    82  // UnionKinded has union typekind, which means its data model behaviors are that of a map kind.
    83  type UnionKinded = *_UnionKinded
    84  type _UnionKinded struct {
    85  	tag uint
    86  	x1  _Foo
    87  	x2  _Bar
    88  	x3  _Baz
    89  }
    90  type _UnionKinded__iface interface {
    91  	_UnionKinded__member()
    92  }
    93  
    94  func (_Foo) _UnionKinded__member() {}
    95  func (_Bar) _UnionKinded__member() {}
    96  func (_Baz) _UnionKinded__member() {}