···
1205
-
func (t *GitRefUpdate_Meta) MarshalCBOR(w io.Writer) error {
1207
-
_, err := w.Write(cbg.CborNull)
1211
-
cw := cbg.NewCborWriter(w)
1214
-
if t.LangBreakdown == nil {
1218
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
1222
-
// t.CommitCount (tangled.GitRefUpdate_Meta_CommitCount) (struct)
1223
-
if len("commitCount") > 1000000 {
1224
-
return xerrors.Errorf("Value in field \"commitCount\" was too long")
1227
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commitCount"))); err != nil {
1230
-
if _, err := cw.WriteString(string("commitCount")); err != nil {
1234
-
if err := t.CommitCount.MarshalCBOR(cw); err != nil {
1238
-
// t.IsDefaultRef (bool) (bool)
1239
-
if len("isDefaultRef") > 1000000 {
1240
-
return xerrors.Errorf("Value in field \"isDefaultRef\" was too long")
1243
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("isDefaultRef"))); err != nil {
1246
-
if _, err := cw.WriteString(string("isDefaultRef")); err != nil {
1250
-
if err := cbg.WriteBool(w, t.IsDefaultRef); err != nil {
1254
-
// t.LangBreakdown (tangled.GitRefUpdate_Meta_LangBreakdown) (struct)
1255
-
if t.LangBreakdown != nil {
1257
-
if len("langBreakdown") > 1000000 {
1258
-
return xerrors.Errorf("Value in field \"langBreakdown\" was too long")
1261
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("langBreakdown"))); err != nil {
1264
-
if _, err := cw.WriteString(string("langBreakdown")); err != nil {
1268
-
if err := t.LangBreakdown.MarshalCBOR(cw); err != nil {
1275
-
func (t *GitRefUpdate_Meta) UnmarshalCBOR(r io.Reader) (err error) {
1276
-
*t = GitRefUpdate_Meta{}
1278
-
cr := cbg.NewCborReader(r)
1280
-
maj, extra, err := cr.ReadHeader()
1285
-
if err == io.EOF {
1286
-
err = io.ErrUnexpectedEOF
1290
-
if maj != cbg.MajMap {
1291
-
return fmt.Errorf("cbor input should be of type map")
1294
-
if extra > cbg.MaxLength {
1295
-
return fmt.Errorf("GitRefUpdate_Meta: map struct too large (%d)", extra)
1300
-
nameBuf := make([]byte, 13)
1301
-
for i := uint64(0); i < n; i++ {
1302
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1308
-
// Field doesn't exist on this type, so ignore it
1309
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1315
-
switch string(nameBuf[:nameLen]) {
1316
-
// t.CommitCount (tangled.GitRefUpdate_Meta_CommitCount) (struct)
1317
-
case "commitCount":
1321
-
b, err := cr.ReadByte()
1325
-
if b != cbg.CborNull[0] {
1326
-
if err := cr.UnreadByte(); err != nil {
1329
-
t.CommitCount = new(GitRefUpdate_Meta_CommitCount)
1330
-
if err := t.CommitCount.UnmarshalCBOR(cr); err != nil {
1331
-
return xerrors.Errorf("unmarshaling t.CommitCount pointer: %w", err)
1336
-
// t.IsDefaultRef (bool) (bool)
1337
-
case "isDefaultRef":
1339
-
maj, extra, err = cr.ReadHeader()
1343
-
if maj != cbg.MajOther {
1344
-
return fmt.Errorf("booleans must be major type 7")
1348
-
t.IsDefaultRef = false
1350
-
t.IsDefaultRef = true
1352
-
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
1354
-
// t.LangBreakdown (tangled.GitRefUpdate_Meta_LangBreakdown) (struct)
1355
-
case "langBreakdown":
1359
-
b, err := cr.ReadByte()
1363
-
if b != cbg.CborNull[0] {
1364
-
if err := cr.UnreadByte(); err != nil {
1367
-
t.LangBreakdown = new(GitRefUpdate_Meta_LangBreakdown)
1368
-
if err := t.LangBreakdown.UnmarshalCBOR(cr); err != nil {
1369
-
return xerrors.Errorf("unmarshaling t.LangBreakdown pointer: %w", err)
1376
-
// Field doesn't exist on this type, so ignore it
1377
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1385
-
func (t *GitRefUpdate_Meta_CommitCount) MarshalCBOR(w io.Writer) error {
1205
+
func (t *GitRefUpdate_CommitCountBreakdown) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
1402
-
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
1222
+
// t.ByEmail ([]*tangled.GitRefUpdate_IndividualEmailCommitCount) (slice)
if len("byEmail") > 1000000 {
···
1433
-
func (t *GitRefUpdate_Meta_CommitCount) UnmarshalCBOR(r io.Reader) (err error) {
1434
-
*t = GitRefUpdate_Meta_CommitCount{}
1253
+
func (t *GitRefUpdate_CommitCountBreakdown) UnmarshalCBOR(r io.Reader) (err error) {
1254
+
*t = GitRefUpdate_CommitCountBreakdown{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1453
-
return fmt.Errorf("GitRefUpdate_Meta_CommitCount: map struct too large (%d)", extra)
1273
+
return fmt.Errorf("GitRefUpdate_CommitCountBreakdown: map struct too large (%d)", extra)
···
switch string(nameBuf[:nameLen]) {
1474
-
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
1294
+
// t.ByEmail ([]*tangled.GitRefUpdate_IndividualEmailCommitCount) (slice)
maj, extra, err = cr.ReadHeader()
···
1491
-
t.ByEmail = make([]*GitRefUpdate_Meta_CommitCount_ByEmail_Elem, extra)
1311
+
t.ByEmail = make([]*GitRefUpdate_IndividualEmailCommitCount, extra)
for i := 0; i < int(extra); i++ {
···
if err := cr.UnreadByte(); err != nil {
1513
-
t.ByEmail[i] = new(GitRefUpdate_Meta_CommitCount_ByEmail_Elem)
1333
+
t.ByEmail[i] = new(GitRefUpdate_IndividualEmailCommitCount)
if err := t.ByEmail[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.ByEmail[i] pointer: %w", err)
···
1534
-
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) MarshalCBOR(w io.Writer) error {
1354
+
func (t *GitRefUpdate_IndividualEmailCommitCount) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
1593
-
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) UnmarshalCBOR(r io.Reader) (err error) {
1594
-
*t = GitRefUpdate_Meta_CommitCount_ByEmail_Elem{}
1413
+
func (t *GitRefUpdate_IndividualEmailCommitCount) UnmarshalCBOR(r io.Reader) (err error) {
1414
+
*t = GitRefUpdate_IndividualEmailCommitCount{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1613
-
return fmt.Errorf("GitRefUpdate_Meta_CommitCount_ByEmail_Elem: map struct too large (%d)", extra)
1433
+
return fmt.Errorf("GitRefUpdate_IndividualEmailCommitCount: map struct too large (%d)", extra)
···
1682
-
func (t *GitRefUpdate_Meta_LangBreakdown) MarshalCBOR(w io.Writer) error {
1502
+
func (t *GitRefUpdate_LangBreakdown) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
1699
-
// t.Inputs ([]*tangled.GitRefUpdate_Pair) (slice)
1519
+
// t.Inputs ([]*tangled.GitRefUpdate_IndividualLanguageSize) (slice)
if len("inputs") > 1000000 {
···
1730
-
func (t *GitRefUpdate_Meta_LangBreakdown) UnmarshalCBOR(r io.Reader) (err error) {
1731
-
*t = GitRefUpdate_Meta_LangBreakdown{}
1550
+
func (t *GitRefUpdate_LangBreakdown) UnmarshalCBOR(r io.Reader) (err error) {
1551
+
*t = GitRefUpdate_LangBreakdown{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1750
-
return fmt.Errorf("GitRefUpdate_Meta_LangBreakdown: map struct too large (%d)", extra)
1570
+
return fmt.Errorf("GitRefUpdate_LangBreakdown: map struct too large (%d)", extra)
···
switch string(nameBuf[:nameLen]) {
1771
-
// t.Inputs ([]*tangled.GitRefUpdate_Pair) (slice)
1591
+
// t.Inputs ([]*tangled.GitRefUpdate_IndividualLanguageSize) (slice)
maj, extra, err = cr.ReadHeader()
···
1788
-
t.Inputs = make([]*GitRefUpdate_Pair, extra)
1608
+
t.Inputs = make([]*GitRefUpdate_IndividualLanguageSize, extra)
for i := 0; i < int(extra); i++ {
···
if err := cr.UnreadByte(); err != nil {
1810
-
t.Inputs[i] = new(GitRefUpdate_Pair)
1630
+
t.Inputs[i] = new(GitRefUpdate_IndividualLanguageSize)
if err := t.Inputs[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Inputs[i] pointer: %w", err)
···
1831
-
func (t *GitRefUpdate_Pair) MarshalCBOR(w io.Writer) error {
1651
+
func (t *GitRefUpdate_IndividualLanguageSize) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
1891
-
func (t *GitRefUpdate_Pair) UnmarshalCBOR(r io.Reader) (err error) {
1892
-
*t = GitRefUpdate_Pair{}
1711
+
func (t *GitRefUpdate_IndividualLanguageSize) UnmarshalCBOR(r io.Reader) (err error) {
1712
+
*t = GitRefUpdate_IndividualLanguageSize{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1911
-
return fmt.Errorf("GitRefUpdate_Pair: map struct too large (%d)", extra)
1731
+
return fmt.Errorf("GitRefUpdate_IndividualLanguageSize: map struct too large (%d)", extra)
···
1791
+
// Field doesn't exist on this type, so ignore it
1792
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1800
+
func (t *GitRefUpdate_Meta) MarshalCBOR(w io.Writer) error {
1802
+
_, err := w.Write(cbg.CborNull)
1806
+
cw := cbg.NewCborWriter(w)
1809
+
if t.LangBreakdown == nil {
1813
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
1817
+
// t.CommitCount (tangled.GitRefUpdate_CommitCountBreakdown) (struct)
1818
+
if len("commitCount") > 1000000 {
1819
+
return xerrors.Errorf("Value in field \"commitCount\" was too long")
1822
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commitCount"))); err != nil {
1825
+
if _, err := cw.WriteString(string("commitCount")); err != nil {
1829
+
if err := t.CommitCount.MarshalCBOR(cw); err != nil {
1833
+
// t.IsDefaultRef (bool) (bool)
1834
+
if len("isDefaultRef") > 1000000 {
1835
+
return xerrors.Errorf("Value in field \"isDefaultRef\" was too long")
1838
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("isDefaultRef"))); err != nil {
1841
+
if _, err := cw.WriteString(string("isDefaultRef")); err != nil {
1845
+
if err := cbg.WriteBool(w, t.IsDefaultRef); err != nil {
1849
+
// t.LangBreakdown (tangled.GitRefUpdate_LangBreakdown) (struct)
1850
+
if t.LangBreakdown != nil {
1852
+
if len("langBreakdown") > 1000000 {
1853
+
return xerrors.Errorf("Value in field \"langBreakdown\" was too long")
1856
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("langBreakdown"))); err != nil {
1859
+
if _, err := cw.WriteString(string("langBreakdown")); err != nil {
1863
+
if err := t.LangBreakdown.MarshalCBOR(cw); err != nil {
1870
+
func (t *GitRefUpdate_Meta) UnmarshalCBOR(r io.Reader) (err error) {
1871
+
*t = GitRefUpdate_Meta{}
1873
+
cr := cbg.NewCborReader(r)
1875
+
maj, extra, err := cr.ReadHeader()
1880
+
if err == io.EOF {
1881
+
err = io.ErrUnexpectedEOF
1885
+
if maj != cbg.MajMap {
1886
+
return fmt.Errorf("cbor input should be of type map")
1889
+
if extra > cbg.MaxLength {
1890
+
return fmt.Errorf("GitRefUpdate_Meta: map struct too large (%d)", extra)
1895
+
nameBuf := make([]byte, 13)
1896
+
for i := uint64(0); i < n; i++ {
1897
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1903
+
// Field doesn't exist on this type, so ignore it
1904
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1910
+
switch string(nameBuf[:nameLen]) {
1911
+
// t.CommitCount (tangled.GitRefUpdate_CommitCountBreakdown) (struct)
1912
+
case "commitCount":
1916
+
b, err := cr.ReadByte()
1920
+
if b != cbg.CborNull[0] {
1921
+
if err := cr.UnreadByte(); err != nil {
1924
+
t.CommitCount = new(GitRefUpdate_CommitCountBreakdown)
1925
+
if err := t.CommitCount.UnmarshalCBOR(cr); err != nil {
1926
+
return xerrors.Errorf("unmarshaling t.CommitCount pointer: %w", err)
1931
+
// t.IsDefaultRef (bool) (bool)
1932
+
case "isDefaultRef":
1934
+
maj, extra, err = cr.ReadHeader()
1938
+
if maj != cbg.MajOther {
1939
+
return fmt.Errorf("booleans must be major type 7")
1943
+
t.IsDefaultRef = false
1945
+
t.IsDefaultRef = true
1947
+
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
1949
+
// t.LangBreakdown (tangled.GitRefUpdate_LangBreakdown) (struct)
1950
+
case "langBreakdown":
1954
+
b, err := cr.ReadByte()
1958
+
if b != cbg.CborNull[0] {
1959
+
if err := cr.UnreadByte(); err != nil {
1962
+
t.LangBreakdown = new(GitRefUpdate_LangBreakdown)
1963
+
if err := t.LangBreakdown.UnmarshalCBOR(cr); err != nil {
1964
+
return xerrors.Errorf("unmarshaling t.LangBreakdown pointer: %w", err)
···
6525
-
func (t *RepoPull_Target) MarshalCBOR(w io.Writer) error {
6527
-
_, err := w.Write(cbg.CborNull)
6531
-
cw := cbg.NewCborWriter(w)
6533
-
if _, err := cw.Write([]byte{162}); err != nil {
6537
-
// t.Repo (string) (string)
6538
-
if len("repo") > 1000000 {
6539
-
return xerrors.Errorf("Value in field \"repo\" was too long")
6542
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
6545
-
if _, err := cw.WriteString(string("repo")); err != nil {
6549
-
if len(t.Repo) > 1000000 {
6550
-
return xerrors.Errorf("Value in field t.Repo was too long")
6553
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
6556
-
if _, err := cw.WriteString(string(t.Repo)); err != nil {
6560
-
// t.Branch (string) (string)
6561
-
if len("branch") > 1000000 {
6562
-
return xerrors.Errorf("Value in field \"branch\" was too long")
6565
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("branch"))); err != nil {
6568
-
if _, err := cw.WriteString(string("branch")); err != nil {
6572
-
if len(t.Branch) > 1000000 {
6573
-
return xerrors.Errorf("Value in field t.Branch was too long")
6576
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Branch))); err != nil {
6579
-
if _, err := cw.WriteString(string(t.Branch)); err != nil {
6585
-
func (t *RepoPull_Target) UnmarshalCBOR(r io.Reader) (err error) {
6586
-
*t = RepoPull_Target{}
6588
-
cr := cbg.NewCborReader(r)
6590
-
maj, extra, err := cr.ReadHeader()
6595
-
if err == io.EOF {
6596
-
err = io.ErrUnexpectedEOF
6600
-
if maj != cbg.MajMap {
6601
-
return fmt.Errorf("cbor input should be of type map")
6604
-
if extra > cbg.MaxLength {
6605
-
return fmt.Errorf("RepoPull_Target: map struct too large (%d)", extra)
6610
-
nameBuf := make([]byte, 6)
6611
-
for i := uint64(0); i < n; i++ {
6612
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
6618
-
// Field doesn't exist on this type, so ignore it
6619
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
6625
-
switch string(nameBuf[:nameLen]) {
6626
-
// t.Repo (string) (string)
6630
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6635
-
t.Repo = string(sval)
6637
-
// t.Branch (string) (string)
6641
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6646
-
t.Branch = string(sval)
6650
-
// Field doesn't exist on this type, so ignore it
6651
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *RepoPull) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
7405
+
// Field doesn't exist on this type, so ignore it
7406
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
7414
+
func (t *RepoPull_Target) MarshalCBOR(w io.Writer) error {
7416
+
_, err := w.Write(cbg.CborNull)
7420
+
cw := cbg.NewCborWriter(w)
7422
+
if _, err := cw.Write([]byte{162}); err != nil {
7426
+
// t.Repo (string) (string)
7427
+
if len("repo") > 1000000 {
7428
+
return xerrors.Errorf("Value in field \"repo\" was too long")
7431
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
7434
+
if _, err := cw.WriteString(string("repo")); err != nil {
7438
+
if len(t.Repo) > 1000000 {
7439
+
return xerrors.Errorf("Value in field t.Repo was too long")
7442
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
7445
+
if _, err := cw.WriteString(string(t.Repo)); err != nil {
7449
+
// t.Branch (string) (string)
7450
+
if len("branch") > 1000000 {
7451
+
return xerrors.Errorf("Value in field \"branch\" was too long")
7454
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("branch"))); err != nil {
7457
+
if _, err := cw.WriteString(string("branch")); err != nil {
7461
+
if len(t.Branch) > 1000000 {
7462
+
return xerrors.Errorf("Value in field t.Branch was too long")
7465
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Branch))); err != nil {
7468
+
if _, err := cw.WriteString(string(t.Branch)); err != nil {
7474
+
func (t *RepoPull_Target) UnmarshalCBOR(r io.Reader) (err error) {
7475
+
*t = RepoPull_Target{}
7477
+
cr := cbg.NewCborReader(r)
7479
+
maj, extra, err := cr.ReadHeader()
7484
+
if err == io.EOF {
7485
+
err = io.ErrUnexpectedEOF
7489
+
if maj != cbg.MajMap {
7490
+
return fmt.Errorf("cbor input should be of type map")
7493
+
if extra > cbg.MaxLength {
7494
+
return fmt.Errorf("RepoPull_Target: map struct too large (%d)", extra)
7499
+
nameBuf := make([]byte, 6)
7500
+
for i := uint64(0); i < n; i++ {
7501
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
7507
+
// Field doesn't exist on this type, so ignore it
7508
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
7514
+
switch string(nameBuf[:nameLen]) {
7515
+
// t.Repo (string) (string)
7519
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7524
+
t.Repo = string(sval)
7526
+
// t.Branch (string) (string)
7530
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7535
+
t.Branch = string(sval)