···
cw := cbg.NewCborWriter(w)
6947
+
if t.Mentions == nil {
6951
+
if t.References == nil {
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
···
7056
+
// t.Mentions ([]string) (slice)
7057
+
if t.Mentions != nil {
7059
+
if len("mentions") > 1000000 {
7060
+
return xerrors.Errorf("Value in field \"mentions\" was too long")
7063
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("mentions"))); err != nil {
7066
+
if _, err := cw.WriteString(string("mentions")); err != nil {
7070
+
if len(t.Mentions) > 8192 {
7071
+
return xerrors.Errorf("Slice value in field t.Mentions was too long")
7074
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Mentions))); err != nil {
7077
+
for _, v := range t.Mentions {
7078
+
if len(v) > 1000000 {
7079
+
return xerrors.Errorf("Value in field v was too long")
7082
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
7085
+
if _, err := cw.WriteString(string(v)); err != nil {
// t.CreatedAt (string) (string)
if len("createdAt") > 1000000 {
return xerrors.Errorf("Value in field \"createdAt\" was too long")
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
7115
+
// t.References ([]string) (slice)
7116
+
if t.References != nil {
7118
+
if len("references") > 1000000 {
7119
+
return xerrors.Errorf("Value in field \"references\" was too long")
7122
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("references"))); err != nil {
7125
+
if _, err := cw.WriteString(string("references")); err != nil {
7129
+
if len(t.References) > 8192 {
7130
+
return xerrors.Errorf("Slice value in field t.References was too long")
7133
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.References))); err != nil {
7136
+
for _, v := range t.References {
7137
+
if len(v) > 1000000 {
7138
+
return xerrors.Errorf("Value in field v was too long")
7141
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
7144
+
if _, err := cw.WriteString(string(v)); err != nil {
···
7098
-
nameBuf := make([]byte, 9)
7178
+
nameBuf := make([]byte, 10)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
7248
+
// t.Mentions ([]string) (slice)
7251
+
maj, extra, err = cr.ReadHeader()
7257
+
return fmt.Errorf("t.Mentions: array too large (%d)", extra)
7260
+
if maj != cbg.MajArray {
7261
+
return fmt.Errorf("expected cbor array")
7265
+
t.Mentions = make([]string, extra)
7268
+
for i := 0; i < int(extra); i++ {
7278
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7283
+
t.Mentions[i] = string(sval)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
7299
+
// t.References ([]string) (slice)
7300
+
case "references":
7302
+
maj, extra, err = cr.ReadHeader()
7308
+
return fmt.Errorf("t.References: array too large (%d)", extra)
7311
+
if maj != cbg.MajArray {
7312
+
return fmt.Errorf("expected cbor array")
7316
+
t.References = make([]string, extra)
7319
+
for i := 0; i < int(extra); i++ {
7329
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7334
+
t.References[i] = string(sval)
// Field doesn't exist on this type, so ignore it
···
cw := cbg.NewCborWriter(w)
7359
+
if t.Mentions == nil {
7363
+
if t.References == nil {
···
7472
+
// t.Mentions ([]string) (slice)
7473
+
if t.Mentions != nil {
7475
+
if len("mentions") > 1000000 {
7476
+
return xerrors.Errorf("Value in field \"mentions\" was too long")
7479
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("mentions"))); err != nil {
7482
+
if _, err := cw.WriteString(string("mentions")); err != nil {
7486
+
if len(t.Mentions) > 8192 {
7487
+
return xerrors.Errorf("Slice value in field t.Mentions was too long")
7490
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Mentions))); err != nil {
7493
+
for _, v := range t.Mentions {
7494
+
if len(v) > 1000000 {
7495
+
return xerrors.Errorf("Value in field v was too long")
7498
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
7501
+
if _, err := cw.WriteString(string(v)); err != nil {
// t.CreatedAt (string) (string)
if len("createdAt") > 1000000 {
return xerrors.Errorf("Value in field \"createdAt\" was too long")
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
7531
+
// t.References ([]string) (slice)
7532
+
if t.References != nil {
7534
+
if len("references") > 1000000 {
7535
+
return xerrors.Errorf("Value in field \"references\" was too long")
7538
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("references"))); err != nil {
7541
+
if _, err := cw.WriteString(string("references")); err != nil {
7545
+
if len(t.References) > 8192 {
7546
+
return xerrors.Errorf("Slice value in field t.References was too long")
7549
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.References))); err != nil {
7552
+
for _, v := range t.References {
7553
+
if len(v) > 1000000 {
7554
+
return xerrors.Errorf("Value in field v was too long")
7557
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
7560
+
if _, err := cw.WriteString(string(v)); err != nil {
···
7354
-
nameBuf := make([]byte, 9)
7594
+
nameBuf := make([]byte, 10)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
t.ReplyTo = (*string)(&sval)
7664
+
// t.Mentions ([]string) (slice)
7667
+
maj, extra, err = cr.ReadHeader()
7673
+
return fmt.Errorf("t.Mentions: array too large (%d)", extra)
7676
+
if maj != cbg.MajArray {
7677
+
return fmt.Errorf("expected cbor array")
7681
+
t.Mentions = make([]string, extra)
7684
+
for i := 0; i < int(extra); i++ {
7694
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7699
+
t.Mentions[i] = string(sval)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
7715
+
// t.References ([]string) (slice)
7716
+
case "references":
7437
-
// Field doesn't exist on this type, so ignore it
7438
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
7718
+
maj, extra, err = cr.ReadHeader()
7446
-
func (t *RepoIssueState) MarshalCBOR(w io.Writer) error {
7448
-
_, err := w.Write(cbg.CborNull)
7724
+
return fmt.Errorf("t.References: array too large (%d)", extra)
7452
-
cw := cbg.NewCborWriter(w)
7727
+
if maj != cbg.MajArray {
7728
+
return fmt.Errorf("expected cbor array")
7454
-
if _, err := cw.Write([]byte{163}); err != nil {
7732
+
t.References = make([]string, extra)
7458
-
// t.LexiconTypeID (string) (string)
7459
-
if len("$type") > 1000000 {
7735
+
for i := 0; i < int(extra); i++ {
7745
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7750
+
t.References[i] = string(sval)
7757
+
// Field doesn't exist on this type, so ignore it
7758
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
7766
+
func (t *RepoIssueState) MarshalCBOR(w io.Writer) error {
7768
+
_, err := w.Write(cbg.CborNull)
7772
+
cw := cbg.NewCborWriter(w)
7774
+
if _, err := cw.Write([]byte{163}); err != nil {
7778
+
// t.LexiconTypeID (string) (string)
7779
+
if len("$type") > 1000000 {
return xerrors.Errorf("Value in field \"$type\" was too long")
···
cw := cbg.NewCborWriter(w)
7943
+
if t.Mentions == nil {
7947
+
if t.References == nil {
···
8091
+
// t.Mentions ([]string) (slice)
8092
+
if t.Mentions != nil {
8094
+
if len("mentions") > 1000000 {
8095
+
return xerrors.Errorf("Value in field \"mentions\" was too long")
8098
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("mentions"))); err != nil {
8101
+
if _, err := cw.WriteString(string("mentions")); err != nil {
8105
+
if len(t.Mentions) > 8192 {
8106
+
return xerrors.Errorf("Slice value in field t.Mentions was too long")
8109
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Mentions))); err != nil {
8112
+
for _, v := range t.Mentions {
8113
+
if len(v) > 1000000 {
8114
+
return xerrors.Errorf("Value in field v was too long")
8117
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
8120
+
if _, err := cw.WriteString(string(v)); err != nil {
// t.CreatedAt (string) (string)
if len("createdAt") > 1000000 {
return xerrors.Errorf("Value in field \"createdAt\" was too long")
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
8150
+
// t.References ([]string) (slice)
8151
+
if t.References != nil {
8153
+
if len("references") > 1000000 {
8154
+
return xerrors.Errorf("Value in field \"references\" was too long")
8157
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("references"))); err != nil {
8160
+
if _, err := cw.WriteString(string("references")); err != nil {
8164
+
if len(t.References) > 8192 {
8165
+
return xerrors.Errorf("Slice value in field t.References was too long")
8168
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.References))); err != nil {
8171
+
for _, v := range t.References {
8172
+
if len(v) > 1000000 {
8173
+
return xerrors.Errorf("Value in field v was too long")
8176
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
8179
+
if _, err := cw.WriteString(string(v)); err != nil {
···
7813
-
nameBuf := make([]byte, 9)
8213
+
nameBuf := make([]byte, 10)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
8323
+
// t.Mentions ([]string) (slice)
8326
+
maj, extra, err = cr.ReadHeader()
8332
+
return fmt.Errorf("t.Mentions: array too large (%d)", extra)
8335
+
if maj != cbg.MajArray {
8336
+
return fmt.Errorf("expected cbor array")
8340
+
t.Mentions = make([]string, extra)
8343
+
for i := 0; i < int(extra); i++ {
8353
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
8358
+
t.Mentions[i] = string(sval)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
8374
+
// t.References ([]string) (slice)
8375
+
case "references":
8377
+
maj, extra, err = cr.ReadHeader()
8383
+
return fmt.Errorf("t.References: array too large (%d)", extra)
8386
+
if maj != cbg.MajArray {
8387
+
return fmt.Errorf("expected cbor array")
8391
+
t.References = make([]string, extra)
8394
+
for i := 0; i < int(extra); i++ {
8404
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
8409
+
t.References[i] = string(sval)
// Field doesn't exist on this type, so ignore it
···
cw := cbg.NewCborWriter(w)
7953
-
if _, err := cw.Write([]byte{164}); err != nil {
8434
+
if t.Mentions == nil {
8438
+
if t.References == nil {
8442
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
···
8511
+
// t.Mentions ([]string) (slice)
8512
+
if t.Mentions != nil {
8514
+
if len("mentions") > 1000000 {
8515
+
return xerrors.Errorf("Value in field \"mentions\" was too long")
8518
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("mentions"))); err != nil {
8521
+
if _, err := cw.WriteString(string("mentions")); err != nil {
8525
+
if len(t.Mentions) > 8192 {
8526
+
return xerrors.Errorf("Slice value in field t.Mentions was too long")
8529
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Mentions))); err != nil {
8532
+
for _, v := range t.Mentions {
8533
+
if len(v) > 1000000 {
8534
+
return xerrors.Errorf("Value in field v was too long")
8537
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
8540
+
if _, err := cw.WriteString(string(v)); err != nil {
// t.CreatedAt (string) (string)
if len("createdAt") > 1000000 {
return xerrors.Errorf("Value in field \"createdAt\" was too long")
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
8570
+
// t.References ([]string) (slice)
8571
+
if t.References != nil {
8573
+
if len("references") > 1000000 {
8574
+
return xerrors.Errorf("Value in field \"references\" was too long")
8577
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("references"))); err != nil {
8580
+
if _, err := cw.WriteString(string("references")); err != nil {
8584
+
if len(t.References) > 8192 {
8585
+
return xerrors.Errorf("Slice value in field t.References was too long")
8588
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.References))); err != nil {
8591
+
for _, v := range t.References {
8592
+
if len(v) > 1000000 {
8593
+
return xerrors.Errorf("Value in field v was too long")
8596
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
8599
+
if _, err := cw.WriteString(string(v)); err != nil {
···
8072
-
nameBuf := make([]byte, 9)
8633
+
nameBuf := make([]byte, 10)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
t.LexiconTypeID = string(sval)
8682
+
// t.Mentions ([]string) (slice)
8685
+
maj, extra, err = cr.ReadHeader()
8691
+
return fmt.Errorf("t.Mentions: array too large (%d)", extra)
8694
+
if maj != cbg.MajArray {
8695
+
return fmt.Errorf("expected cbor array")
8699
+
t.Mentions = make([]string, extra)
8702
+
for i := 0; i < int(extra); i++ {
8712
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
8717
+
t.Mentions[i] = string(sval)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
8733
+
// t.References ([]string) (slice)
8734
+
case "references":
8736
+
maj, extra, err = cr.ReadHeader()
8742
+
return fmt.Errorf("t.References: array too large (%d)", extra)
8745
+
if maj != cbg.MajArray {
8746
+
return fmt.Errorf("expected cbor array")
8750
+
t.References = make([]string, extra)
8753
+
for i := 0; i < int(extra); i++ {
8763
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
8768
+
t.References[i] = string(sval)
// Field doesn't exist on this type, so ignore it