···
22
+
func (t *ActorProfile) MarshalCBOR(w io.Writer) error {
24
+
_, err := w.Write(cbg.CborNull)
28
+
cw := cbg.NewCborWriter(w)
31
+
if t.Description == nil {
39
+
if t.Location == nil {
43
+
if t.PinnedRepositories == nil {
51
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
55
+
// t.LexiconTypeID (string) (string)
56
+
if len("$type") > 1000000 {
57
+
return xerrors.Errorf("Value in field \"$type\" was too long")
60
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
63
+
if _, err := cw.WriteString(string("$type")); err != nil {
67
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.actor.profile"))); err != nil {
70
+
if _, err := cw.WriteString(string("sh.tangled.actor.profile")); err != nil {
74
+
// t.Links ([]string) (slice)
77
+
if len("links") > 1000000 {
78
+
return xerrors.Errorf("Value in field \"links\" was too long")
81
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("links"))); err != nil {
84
+
if _, err := cw.WriteString(string("links")); err != nil {
88
+
if len(t.Links) > 8192 {
89
+
return xerrors.Errorf("Slice value in field t.Links was too long")
92
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Links))); err != nil {
95
+
for _, v := range t.Links {
96
+
if len(v) > 1000000 {
97
+
return xerrors.Errorf("Value in field v was too long")
100
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
103
+
if _, err := cw.WriteString(string(v)); err != nil {
110
+
// t.Stats ([]string) (slice)
111
+
if t.Stats != nil {
113
+
if len("stats") > 1000000 {
114
+
return xerrors.Errorf("Value in field \"stats\" was too long")
117
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("stats"))); err != nil {
120
+
if _, err := cw.WriteString(string("stats")); err != nil {
124
+
if len(t.Stats) > 8192 {
125
+
return xerrors.Errorf("Slice value in field t.Stats was too long")
128
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Stats))); err != nil {
131
+
for _, v := range t.Stats {
132
+
if len(v) > 1000000 {
133
+
return xerrors.Errorf("Value in field v was too long")
136
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
139
+
if _, err := cw.WriteString(string(v)); err != nil {
146
+
// t.Bluesky (bool) (bool)
147
+
if len("bluesky") > 1000000 {
148
+
return xerrors.Errorf("Value in field \"bluesky\" was too long")
151
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("bluesky"))); err != nil {
154
+
if _, err := cw.WriteString(string("bluesky")); err != nil {
158
+
if err := cbg.WriteBool(w, t.Bluesky); err != nil {
162
+
// t.Location (string) (string)
163
+
if t.Location != nil {
165
+
if len("location") > 1000000 {
166
+
return xerrors.Errorf("Value in field \"location\" was too long")
169
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("location"))); err != nil {
172
+
if _, err := cw.WriteString(string("location")); err != nil {
176
+
if t.Location == nil {
177
+
if _, err := cw.Write(cbg.CborNull); err != nil {
181
+
if len(*t.Location) > 1000000 {
182
+
return xerrors.Errorf("Value in field t.Location was too long")
185
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Location))); err != nil {
188
+
if _, err := cw.WriteString(string(*t.Location)); err != nil {
194
+
// t.Description (string) (string)
195
+
if t.Description != nil {
197
+
if len("description") > 1000000 {
198
+
return xerrors.Errorf("Value in field \"description\" was too long")
201
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("description"))); err != nil {
204
+
if _, err := cw.WriteString(string("description")); err != nil {
208
+
if t.Description == nil {
209
+
if _, err := cw.Write(cbg.CborNull); err != nil {
213
+
if len(*t.Description) > 1000000 {
214
+
return xerrors.Errorf("Value in field t.Description was too long")
217
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Description))); err != nil {
220
+
if _, err := cw.WriteString(string(*t.Description)); err != nil {
226
+
// t.PinnedRepositories ([]string) (slice)
227
+
if t.PinnedRepositories != nil {
229
+
if len("pinnedRepositories") > 1000000 {
230
+
return xerrors.Errorf("Value in field \"pinnedRepositories\" was too long")
233
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pinnedRepositories"))); err != nil {
236
+
if _, err := cw.WriteString(string("pinnedRepositories")); err != nil {
240
+
if len(t.PinnedRepositories) > 8192 {
241
+
return xerrors.Errorf("Slice value in field t.PinnedRepositories was too long")
244
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.PinnedRepositories))); err != nil {
247
+
for _, v := range t.PinnedRepositories {
248
+
if len(v) > 1000000 {
249
+
return xerrors.Errorf("Value in field v was too long")
252
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
255
+
if _, err := cw.WriteString(string(v)); err != nil {
264
+
func (t *ActorProfile) UnmarshalCBOR(r io.Reader) (err error) {
265
+
*t = ActorProfile{}
267
+
cr := cbg.NewCborReader(r)
269
+
maj, extra, err := cr.ReadHeader()
275
+
err = io.ErrUnexpectedEOF
279
+
if maj != cbg.MajMap {
280
+
return fmt.Errorf("cbor input should be of type map")
283
+
if extra > cbg.MaxLength {
284
+
return fmt.Errorf("ActorProfile: map struct too large (%d)", extra)
289
+
nameBuf := make([]byte, 18)
290
+
for i := uint64(0); i < n; i++ {
291
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
297
+
// Field doesn't exist on this type, so ignore it
298
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
304
+
switch string(nameBuf[:nameLen]) {
305
+
// t.LexiconTypeID (string) (string)
309
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
314
+
t.LexiconTypeID = string(sval)
316
+
// t.Links ([]string) (slice)
319
+
maj, extra, err = cr.ReadHeader()
325
+
return fmt.Errorf("t.Links: array too large (%d)", extra)
328
+
if maj != cbg.MajArray {
329
+
return fmt.Errorf("expected cbor array")
333
+
t.Links = make([]string, extra)
336
+
for i := 0; i < int(extra); i++ {
346
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
351
+
t.Links[i] = string(sval)
356
+
// t.Stats ([]string) (slice)
359
+
maj, extra, err = cr.ReadHeader()
365
+
return fmt.Errorf("t.Stats: array too large (%d)", extra)
368
+
if maj != cbg.MajArray {
369
+
return fmt.Errorf("expected cbor array")
373
+
t.Stats = make([]string, extra)
376
+
for i := 0; i < int(extra); i++ {
386
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
391
+
t.Stats[i] = string(sval)
396
+
// t.Bluesky (bool) (bool)
399
+
maj, extra, err = cr.ReadHeader()
403
+
if maj != cbg.MajOther {
404
+
return fmt.Errorf("booleans must be major type 7")
412
+
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
414
+
// t.Location (string) (string)
418
+
b, err := cr.ReadByte()
422
+
if b != cbg.CborNull[0] {
423
+
if err := cr.UnreadByte(); err != nil {
427
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
432
+
t.Location = (*string)(&sval)
435
+
// t.Description (string) (string)
436
+
case "description":
439
+
b, err := cr.ReadByte()
443
+
if b != cbg.CborNull[0] {
444
+
if err := cr.UnreadByte(); err != nil {
448
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
453
+
t.Description = (*string)(&sval)
456
+
// t.PinnedRepositories ([]string) (slice)
457
+
case "pinnedRepositories":
459
+
maj, extra, err = cr.ReadHeader()
465
+
return fmt.Errorf("t.PinnedRepositories: array too large (%d)", extra)
468
+
if maj != cbg.MajArray {
469
+
return fmt.Errorf("expected cbor array")
473
+
t.PinnedRepositories = make([]string, extra)
476
+
for i := 0; i < int(extra); i++ {
486
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
491
+
t.PinnedRepositories[i] = string(sval)
498
+
// Field doesn't exist on this type, so ignore it
499
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *FeedStar) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
671
+
func (t *GitRefUpdate) MarshalCBOR(w io.Writer) error {
673
+
_, err := w.Write(cbg.CborNull)
677
+
cw := cbg.NewCborWriter(w)
679
+
if _, err := cw.Write([]byte{167}); err != nil {
683
+
// t.Ref (string) (string)
684
+
if len("ref") > 1000000 {
685
+
return xerrors.Errorf("Value in field \"ref\" was too long")
688
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
691
+
if _, err := cw.WriteString(string("ref")); err != nil {
695
+
if len(t.Ref) > 1000000 {
696
+
return xerrors.Errorf("Value in field t.Ref was too long")
699
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
702
+
if _, err := cw.WriteString(string(t.Ref)); err != nil {
706
+
// t.LexiconTypeID (string) (string)
707
+
if len("$type") > 1000000 {
708
+
return xerrors.Errorf("Value in field \"$type\" was too long")
711
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
714
+
if _, err := cw.WriteString(string("$type")); err != nil {
718
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.git.refUpdate"))); err != nil {
721
+
if _, err := cw.WriteString(string("sh.tangled.git.refUpdate")); err != nil {
725
+
// t.NewSha (string) (string)
726
+
if len("newSha") > 1000000 {
727
+
return xerrors.Errorf("Value in field \"newSha\" was too long")
730
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
733
+
if _, err := cw.WriteString(string("newSha")); err != nil {
737
+
if len(t.NewSha) > 1000000 {
738
+
return xerrors.Errorf("Value in field t.NewSha was too long")
741
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
744
+
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
748
+
// t.OldSha (string) (string)
749
+
if len("oldSha") > 1000000 {
750
+
return xerrors.Errorf("Value in field \"oldSha\" was too long")
753
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
756
+
if _, err := cw.WriteString(string("oldSha")); err != nil {
760
+
if len(t.OldSha) > 1000000 {
761
+
return xerrors.Errorf("Value in field t.OldSha was too long")
764
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
767
+
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
771
+
// t.RepoDid (string) (string)
772
+
if len("repoDid") > 1000000 {
773
+
return xerrors.Errorf("Value in field \"repoDid\" was too long")
776
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoDid"))); err != nil {
779
+
if _, err := cw.WriteString(string("repoDid")); err != nil {
783
+
if len(t.RepoDid) > 1000000 {
784
+
return xerrors.Errorf("Value in field t.RepoDid was too long")
787
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoDid))); err != nil {
790
+
if _, err := cw.WriteString(string(t.RepoDid)); err != nil {
794
+
// t.RepoName (string) (string)
795
+
if len("repoName") > 1000000 {
796
+
return xerrors.Errorf("Value in field \"repoName\" was too long")
799
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoName"))); err != nil {
802
+
if _, err := cw.WriteString(string("repoName")); err != nil {
806
+
if len(t.RepoName) > 1000000 {
807
+
return xerrors.Errorf("Value in field t.RepoName was too long")
810
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoName))); err != nil {
813
+
if _, err := cw.WriteString(string(t.RepoName)); err != nil {
817
+
// t.CommitterDid (string) (string)
818
+
if len("committerDid") > 1000000 {
819
+
return xerrors.Errorf("Value in field \"committerDid\" was too long")
822
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("committerDid"))); err != nil {
825
+
if _, err := cw.WriteString(string("committerDid")); err != nil {
829
+
if len(t.CommitterDid) > 1000000 {
830
+
return xerrors.Errorf("Value in field t.CommitterDid was too long")
833
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CommitterDid))); err != nil {
836
+
if _, err := cw.WriteString(string(t.CommitterDid)); err != nil {
842
+
func (t *GitRefUpdate) UnmarshalCBOR(r io.Reader) (err error) {
843
+
*t = GitRefUpdate{}
845
+
cr := cbg.NewCborReader(r)
847
+
maj, extra, err := cr.ReadHeader()
853
+
err = io.ErrUnexpectedEOF
857
+
if maj != cbg.MajMap {
858
+
return fmt.Errorf("cbor input should be of type map")
861
+
if extra > cbg.MaxLength {
862
+
return fmt.Errorf("GitRefUpdate: map struct too large (%d)", extra)
867
+
nameBuf := make([]byte, 12)
868
+
for i := uint64(0); i < n; i++ {
869
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
875
+
// Field doesn't exist on this type, so ignore it
876
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
882
+
switch string(nameBuf[:nameLen]) {
883
+
// t.Ref (string) (string)
887
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
892
+
t.Ref = string(sval)
894
+
// t.LexiconTypeID (string) (string)
898
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
903
+
t.LexiconTypeID = string(sval)
905
+
// t.NewSha (string) (string)
909
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
914
+
t.NewSha = string(sval)
916
+
// t.OldSha (string) (string)
920
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
925
+
t.OldSha = string(sval)
927
+
// t.RepoDid (string) (string)
931
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
936
+
t.RepoDid = string(sval)
938
+
// t.RepoName (string) (string)
942
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
947
+
t.RepoName = string(sval)
949
+
// t.CommitterDid (string) (string)
950
+
case "committerDid":
953
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
958
+
t.CommitterDid = string(sval)
962
+
// Field doesn't exist on this type, so ignore it
963
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *GraphFollow) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
548
-
func (t *PublicKey) MarshalCBOR(w io.Writer) error {
1333
+
func (t *Pipeline) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
556
-
if _, err := cw.Write([]byte{164}); err != nil {
1341
+
if _, err := cw.Write([]byte{163}); err != nil {
1345
+
// t.LexiconTypeID (string) (string)
1346
+
if len("$type") > 1000000 {
1347
+
return xerrors.Errorf("Value in field \"$type\" was too long")
1350
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
1353
+
if _, err := cw.WriteString(string("$type")); err != nil {
1357
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline"))); err != nil {
1360
+
if _, err := cw.WriteString(string("sh.tangled.pipeline")); err != nil {
560
-
// t.Key (string) (string)
561
-
if len("key") > 1000000 {
562
-
return xerrors.Errorf("Value in field \"key\" was too long")
1364
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
1365
+
if len("workflows") > 1000000 {
1366
+
return xerrors.Errorf("Value in field \"workflows\" was too long")
565
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
1369
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflows"))); err != nil {
1372
+
if _, err := cw.WriteString(string("workflows")); err != nil {
568
-
if _, err := cw.WriteString(string("key")); err != nil {
1376
+
if len(t.Workflows) > 8192 {
1377
+
return xerrors.Errorf("Slice value in field t.Workflows was too long")
1380
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Workflows))); err != nil {
1383
+
for _, v := range t.Workflows {
1384
+
if err := v.MarshalCBOR(cw); err != nil {
572
-
if len(t.Key) > 1000000 {
573
-
return xerrors.Errorf("Value in field t.Key was too long")
1390
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
1391
+
if len("triggerMetadata") > 1000000 {
1392
+
return xerrors.Errorf("Value in field \"triggerMetadata\" was too long")
1395
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("triggerMetadata"))); err != nil {
1398
+
if _, err := cw.WriteString(string("triggerMetadata")); err != nil {
576
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
1402
+
if err := t.TriggerMetadata.MarshalCBOR(cw); err != nil {
579
-
if _, err := cw.WriteString(string(t.Key)); err != nil {
1408
+
func (t *Pipeline) UnmarshalCBOR(r io.Reader) (err error) {
1411
+
cr := cbg.NewCborReader(r)
1413
+
maj, extra, err := cr.ReadHeader()
1418
+
if err == io.EOF {
1419
+
err = io.ErrUnexpectedEOF
1423
+
if maj != cbg.MajMap {
1424
+
return fmt.Errorf("cbor input should be of type map")
1427
+
if extra > cbg.MaxLength {
1428
+
return fmt.Errorf("Pipeline: map struct too large (%d)", extra)
1433
+
nameBuf := make([]byte, 15)
1434
+
for i := uint64(0); i < n; i++ {
1435
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1441
+
// Field doesn't exist on this type, so ignore it
1442
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1448
+
switch string(nameBuf[:nameLen]) {
1449
+
// t.LexiconTypeID (string) (string)
1453
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1458
+
t.LexiconTypeID = string(sval)
1460
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
1463
+
maj, extra, err = cr.ReadHeader()
1469
+
return fmt.Errorf("t.Workflows: array too large (%d)", extra)
1472
+
if maj != cbg.MajArray {
1473
+
return fmt.Errorf("expected cbor array")
1477
+
t.Workflows = make([]*Pipeline_Workflow, extra)
1480
+
for i := 0; i < int(extra); i++ {
1491
+
b, err := cr.ReadByte()
1495
+
if b != cbg.CborNull[0] {
1496
+
if err := cr.UnreadByte(); err != nil {
1499
+
t.Workflows[i] = new(Pipeline_Workflow)
1500
+
if err := t.Workflows[i].UnmarshalCBOR(cr); err != nil {
1501
+
return xerrors.Errorf("unmarshaling t.Workflows[i] pointer: %w", err)
1509
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
1510
+
case "triggerMetadata":
1514
+
b, err := cr.ReadByte()
1518
+
if b != cbg.CborNull[0] {
1519
+
if err := cr.UnreadByte(); err != nil {
1522
+
t.TriggerMetadata = new(Pipeline_TriggerMetadata)
1523
+
if err := t.TriggerMetadata.UnmarshalCBOR(cr); err != nil {
1524
+
return xerrors.Errorf("unmarshaling t.TriggerMetadata pointer: %w", err)
1531
+
// Field doesn't exist on this type, so ignore it
1532
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1540
+
func (t *Pipeline_CloneOpts) MarshalCBOR(w io.Writer) error {
1542
+
_, err := w.Write(cbg.CborNull)
1546
+
cw := cbg.NewCborWriter(w)
1548
+
if _, err := cw.Write([]byte{163}); err != nil {
1552
+
// t.Skip (bool) (bool)
1553
+
if len("skip") > 1000000 {
1554
+
return xerrors.Errorf("Value in field \"skip\" was too long")
1557
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("skip"))); err != nil {
1560
+
if _, err := cw.WriteString(string("skip")); err != nil {
1564
+
if err := cbg.WriteBool(w, t.Skip); err != nil {
1568
+
// t.Depth (int64) (int64)
1569
+
if len("depth") > 1000000 {
1570
+
return xerrors.Errorf("Value in field \"depth\" was too long")
1573
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("depth"))); err != nil {
1576
+
if _, err := cw.WriteString(string("depth")); err != nil {
1581
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Depth)); err != nil {
1585
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Depth-1)); err != nil {
1590
+
// t.Submodules (bool) (bool)
1591
+
if len("submodules") > 1000000 {
1592
+
return xerrors.Errorf("Value in field \"submodules\" was too long")
1595
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("submodules"))); err != nil {
1598
+
if _, err := cw.WriteString(string("submodules")); err != nil {
1602
+
if err := cbg.WriteBool(w, t.Submodules); err != nil {
1608
+
func (t *Pipeline_CloneOpts) UnmarshalCBOR(r io.Reader) (err error) {
1609
+
*t = Pipeline_CloneOpts{}
1611
+
cr := cbg.NewCborReader(r)
1613
+
maj, extra, err := cr.ReadHeader()
1618
+
if err == io.EOF {
1619
+
err = io.ErrUnexpectedEOF
1623
+
if maj != cbg.MajMap {
1624
+
return fmt.Errorf("cbor input should be of type map")
1627
+
if extra > cbg.MaxLength {
1628
+
return fmt.Errorf("Pipeline_CloneOpts: map struct too large (%d)", extra)
1633
+
nameBuf := make([]byte, 10)
1634
+
for i := uint64(0); i < n; i++ {
1635
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1641
+
// Field doesn't exist on this type, so ignore it
1642
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1648
+
switch string(nameBuf[:nameLen]) {
1649
+
// t.Skip (bool) (bool)
1652
+
maj, extra, err = cr.ReadHeader()
1656
+
if maj != cbg.MajOther {
1657
+
return fmt.Errorf("booleans must be major type 7")
1665
+
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
1667
+
// t.Depth (int64) (int64)
1670
+
maj, extra, err := cr.ReadHeader()
1676
+
case cbg.MajUnsignedInt:
1677
+
extraI = int64(extra)
1679
+
return fmt.Errorf("int64 positive overflow")
1681
+
case cbg.MajNegativeInt:
1682
+
extraI = int64(extra)
1684
+
return fmt.Errorf("int64 negative overflow")
1686
+
extraI = -1 - extraI
1688
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
1691
+
t.Depth = int64(extraI)
1693
+
// t.Submodules (bool) (bool)
1694
+
case "submodules":
1696
+
maj, extra, err = cr.ReadHeader()
1700
+
if maj != cbg.MajOther {
1701
+
return fmt.Errorf("booleans must be major type 7")
1705
+
t.Submodules = false
1707
+
t.Submodules = true
1709
+
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
1713
+
// Field doesn't exist on this type, so ignore it
1714
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1722
+
func (t *Pipeline_Workflow) MarshalCBOR(w io.Writer) error {
1724
+
_, err := w.Write(cbg.CborNull)
1728
+
cw := cbg.NewCborWriter(w)
1730
+
if _, err := cw.Write([]byte{165}); err != nil {
···
606
-
// t.LexiconTypeID (string) (string)
607
-
if len("$type") > 1000000 {
608
-
return xerrors.Errorf("Value in field \"$type\" was too long")
1757
+
// t.Clone (tangled.Pipeline_CloneOpts) (struct)
1758
+
if len("clone") > 1000000 {
1759
+
return xerrors.Errorf("Value in field \"clone\" was too long")
611
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
1762
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("clone"))); err != nil {
1765
+
if _, err := cw.WriteString(string("clone")); err != nil {
614
-
if _, err := cw.WriteString(string("$type")); err != nil {
1769
+
if err := t.Clone.MarshalCBOR(cw); err != nil {
618
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.publicKey"))); err != nil {
1773
+
// t.Steps ([]*tangled.Pipeline_Step) (slice)
1774
+
if len("steps") > 1000000 {
1775
+
return xerrors.Errorf("Value in field \"steps\" was too long")
1778
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("steps"))); err != nil {
621
-
if _, err := cw.WriteString(string("sh.tangled.publicKey")); err != nil {
1781
+
if _, err := cw.WriteString(string("steps")); err != nil {
625
-
// t.CreatedAt (string) (string)
626
-
if len("createdAt") > 1000000 {
627
-
return xerrors.Errorf("Value in field \"createdAt\" was too long")
1785
+
if len(t.Steps) > 8192 {
1786
+
return xerrors.Errorf("Slice value in field t.Steps was too long")
630
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
1789
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Steps))); err != nil {
633
-
if _, err := cw.WriteString(string("createdAt")); err != nil {
1792
+
for _, v := range t.Steps {
1793
+
if err := v.MarshalCBOR(cw); err != nil {
1799
+
// t.Environment ([]*tangled.Pipeline_Workflow_Environment_Elem) (slice)
1800
+
if len("environment") > 1000000 {
1801
+
return xerrors.Errorf("Value in field \"environment\" was too long")
1804
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("environment"))); err != nil {
1807
+
if _, err := cw.WriteString(string("environment")); err != nil {
637
-
if len(t.CreatedAt) > 1000000 {
638
-
return xerrors.Errorf("Value in field t.CreatedAt was too long")
1811
+
if len(t.Environment) > 8192 {
1812
+
return xerrors.Errorf("Slice value in field t.Environment was too long")
641
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
1815
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Environment))); err != nil {
644
-
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
1818
+
for _, v := range t.Environment {
1819
+
if err := v.MarshalCBOR(cw); err != nil {
1825
+
// t.Dependencies ([]tangled.Pipeline_Dependencies_Elem) (slice)
1826
+
if len("dependencies") > 1000000 {
1827
+
return xerrors.Errorf("Value in field \"dependencies\" was too long")
1830
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("dependencies"))); err != nil {
1833
+
if _, err := cw.WriteString(string("dependencies")); err != nil {
1837
+
if len(t.Dependencies) > 8192 {
1838
+
return xerrors.Errorf("Slice value in field t.Dependencies was too long")
1841
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Dependencies))); err != nil {
1844
+
for _, v := range t.Dependencies {
1845
+
if err := v.MarshalCBOR(cw); err != nil {
650
-
func (t *PublicKey) UnmarshalCBOR(r io.Reader) (err error) {
1853
+
func (t *Pipeline_Workflow) UnmarshalCBOR(r io.Reader) (err error) {
1854
+
*t = Pipeline_Workflow{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
670
-
return fmt.Errorf("PublicKey: map struct too large (%d)", extra)
1873
+
return fmt.Errorf("Pipeline_Workflow: map struct too large (%d)", extra)
675
-
nameBuf := make([]byte, 9)
1878
+
nameBuf := make([]byte, 12)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
691
-
// t.Key (string) (string)
1894
+
// t.Name (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
700
-
t.Key = string(sval)
1903
+
t.Name = string(sval)
702
-
// t.Name (string) (string)
1905
+
// t.Clone (tangled.Pipeline_CloneOpts) (struct)
706
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1910
+
b, err := cr.ReadByte()
1914
+
if b != cbg.CborNull[0] {
1915
+
if err := cr.UnreadByte(); err != nil {
1918
+
t.Clone = new(Pipeline_CloneOpts)
1919
+
if err := t.Clone.UnmarshalCBOR(cr); err != nil {
1920
+
return xerrors.Errorf("unmarshaling t.Clone pointer: %w", err)
711
-
t.Name = string(sval)
1925
+
// t.Steps ([]*tangled.Pipeline_Step) (slice)
1928
+
maj, extra, err = cr.ReadHeader()
1934
+
return fmt.Errorf("t.Steps: array too large (%d)", extra)
1937
+
if maj != cbg.MajArray {
1938
+
return fmt.Errorf("expected cbor array")
713
-
// t.LexiconTypeID (string) (string)
1942
+
t.Steps = make([]*Pipeline_Step, extra)
1945
+
for i := 0; i < int(extra); i++ {
1956
+
b, err := cr.ReadByte()
1960
+
if b != cbg.CborNull[0] {
1961
+
if err := cr.UnreadByte(); err != nil {
1964
+
t.Steps[i] = new(Pipeline_Step)
1965
+
if err := t.Steps[i].UnmarshalCBOR(cr); err != nil {
1966
+
return xerrors.Errorf("unmarshaling t.Steps[i] pointer: %w", err)
717
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1974
+
// t.Environment ([]*tangled.Pipeline_Workflow_Environment_Elem) (slice)
1975
+
case "environment":
722
-
t.LexiconTypeID = string(sval)
1977
+
maj, extra, err = cr.ReadHeader()
724
-
// t.CreatedAt (string) (string)
728
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1983
+
return fmt.Errorf("t.Environment: array too large (%d)", extra)
1986
+
if maj != cbg.MajArray {
1987
+
return fmt.Errorf("expected cbor array")
1991
+
t.Environment = make([]*Pipeline_Workflow_Environment_Elem, extra)
1994
+
for i := 0; i < int(extra); i++ {
2005
+
b, err := cr.ReadByte()
2009
+
if b != cbg.CborNull[0] {
2010
+
if err := cr.UnreadByte(); err != nil {
2013
+
t.Environment[i] = new(Pipeline_Workflow_Environment_Elem)
2014
+
if err := t.Environment[i].UnmarshalCBOR(cr); err != nil {
2015
+
return xerrors.Errorf("unmarshaling t.Environment[i] pointer: %w", err)
2023
+
// t.Dependencies ([]tangled.Pipeline_Dependencies_Elem) (slice)
2024
+
case "dependencies":
733
-
t.CreatedAt = string(sval)
2026
+
maj, extra, err = cr.ReadHeader()
2032
+
return fmt.Errorf("t.Dependencies: array too large (%d)", extra)
2035
+
if maj != cbg.MajArray {
2036
+
return fmt.Errorf("expected cbor array")
2040
+
t.Dependencies = make([]Pipeline_Dependencies_Elem, extra)
2043
+
for i := 0; i < int(extra); i++ {
2054
+
if err := t.Dependencies[i].UnmarshalCBOR(cr); err != nil {
2055
+
return xerrors.Errorf("unmarshaling t.Dependencies[i]: %w", err)
···
746
-
func (t *RepoIssueComment) MarshalCBOR(w io.Writer) error {
2073
+
func (t *Pipeline_Workflow_Environment_Elem) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
2081
+
if _, err := cw.Write([]byte{162}); err != nil {
755
-
if t.CommentId == nil {
2085
+
// t.Key (string) (string)
2086
+
if len("key") > 1000000 {
2087
+
return xerrors.Errorf("Value in field \"key\" was too long")
759
-
if t.Owner == nil {
2090
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
2093
+
if _, err := cw.WriteString(string("key")); err != nil {
2097
+
if len(t.Key) > 1000000 {
2098
+
return xerrors.Errorf("Value in field t.Key was too long")
767
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
2101
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
2104
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
771
-
// t.Body (string) (string)
772
-
if len("body") > 1000000 {
773
-
return xerrors.Errorf("Value in field \"body\" was too long")
2108
+
// t.Value (string) (string)
2109
+
if len("value") > 1000000 {
2110
+
return xerrors.Errorf("Value in field \"value\" was too long")
776
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
2113
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
779
-
if _, err := cw.WriteString(string("body")); err != nil {
2116
+
if _, err := cw.WriteString(string("value")); err != nil {
783
-
if len(t.Body) > 1000000 {
784
-
return xerrors.Errorf("Value in field t.Body was too long")
2120
+
if len(t.Value) > 1000000 {
2121
+
return xerrors.Errorf("Value in field t.Value was too long")
787
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Body))); err != nil {
2124
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
790
-
if _, err := cw.WriteString(string(t.Body)); err != nil {
2127
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
794
-
// t.Repo (string) (string)
2133
+
func (t *Pipeline_Workflow_Environment_Elem) UnmarshalCBOR(r io.Reader) (err error) {
2134
+
*t = Pipeline_Workflow_Environment_Elem{}
2136
+
cr := cbg.NewCborReader(r)
797
-
if len("repo") > 1000000 {
798
-
return xerrors.Errorf("Value in field \"repo\" was too long")
2138
+
maj, extra, err := cr.ReadHeader()
2143
+
if err == io.EOF {
2144
+
err = io.ErrUnexpectedEOF
801
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
804
-
if _, err := cw.WriteString(string("repo")); err != nil {
2148
+
if maj != cbg.MajMap {
2149
+
return fmt.Errorf("cbor input should be of type map")
2152
+
if extra > cbg.MaxLength {
2153
+
return fmt.Errorf("Pipeline_Workflow_Environment_Elem: map struct too large (%d)", extra)
2158
+
nameBuf := make([]byte, 5)
2159
+
for i := uint64(0); i < n; i++ {
2160
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
809
-
if _, err := cw.Write(cbg.CborNull); err != nil {
2166
+
// Field doesn't exist on this type, so ignore it
2167
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
813
-
if len(*t.Repo) > 1000000 {
814
-
return xerrors.Errorf("Value in field t.Repo was too long")
2173
+
switch string(nameBuf[:nameLen]) {
2174
+
// t.Key (string) (string)
2178
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2183
+
t.Key = string(sval)
2185
+
// t.Value (string) (string)
817
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Repo))); err != nil {
2189
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2194
+
t.Value = string(sval)
820
-
if _, err := cw.WriteString(string(*t.Repo)); err != nil {
2198
+
// Field doesn't exist on this type, so ignore it
2199
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
826
-
// t.LexiconTypeID (string) (string)
827
-
if len("$type") > 1000000 {
828
-
return xerrors.Errorf("Value in field \"$type\" was too long")
2207
+
func (t *Pipeline_Dependencies_Elem) MarshalCBOR(w io.Writer) error {
2209
+
_, err := w.Write(cbg.CborNull)
831
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
2213
+
cw := cbg.NewCborWriter(w)
2215
+
if _, err := cw.Write([]byte{162}); err != nil {
834
-
if _, err := cw.WriteString(string("$type")); err != nil {
2219
+
// t.Packages ([]string) (slice)
2220
+
if len("packages") > 1000000 {
2221
+
return xerrors.Errorf("Value in field \"packages\" was too long")
2224
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("packages"))); err != nil {
2227
+
if _, err := cw.WriteString(string("packages")); err != nil {
838
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.comment"))); err != nil {
2231
+
if len(t.Packages) > 8192 {
2232
+
return xerrors.Errorf("Slice value in field t.Packages was too long")
2235
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Packages))); err != nil {
841
-
if _, err := cw.WriteString(string("sh.tangled.repo.issue.comment")); err != nil {
2238
+
for _, v := range t.Packages {
2239
+
if len(v) > 1000000 {
2240
+
return xerrors.Errorf("Value in field v was too long")
2243
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
2246
+
if _, err := cw.WriteString(string(v)); err != nil {
845
-
// t.Issue (string) (string)
846
-
if len("issue") > 1000000 {
847
-
return xerrors.Errorf("Value in field \"issue\" was too long")
2252
+
// t.Registry (string) (string)
2253
+
if len("registry") > 1000000 {
2254
+
return xerrors.Errorf("Value in field \"registry\" was too long")
850
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
2257
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("registry"))); err != nil {
853
-
if _, err := cw.WriteString(string("issue")); err != nil {
2260
+
if _, err := cw.WriteString(string("registry")); err != nil {
857
-
if len(t.Issue) > 1000000 {
858
-
return xerrors.Errorf("Value in field t.Issue was too long")
2264
+
if len(t.Registry) > 1000000 {
2265
+
return xerrors.Errorf("Value in field t.Registry was too long")
861
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
2268
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Registry))); err != nil {
864
-
if _, err := cw.WriteString(string(t.Issue)); err != nil {
2271
+
if _, err := cw.WriteString(string(t.Registry)); err != nil {
868
-
// t.Owner (string) (string)
869
-
if t.Owner != nil {
2277
+
func (t *Pipeline_Dependencies_Elem) UnmarshalCBOR(r io.Reader) (err error) {
2278
+
*t = Pipeline_Dependencies_Elem{}
2280
+
cr := cbg.NewCborReader(r)
871
-
if len("owner") > 1000000 {
872
-
return xerrors.Errorf("Value in field \"owner\" was too long")
2282
+
maj, extra, err := cr.ReadHeader()
2287
+
if err == io.EOF {
2288
+
err = io.ErrUnexpectedEOF
875
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
2292
+
if maj != cbg.MajMap {
2293
+
return fmt.Errorf("cbor input should be of type map")
2296
+
if extra > cbg.MaxLength {
2297
+
return fmt.Errorf("Pipeline_Dependencies_Elem: map struct too large (%d)", extra)
2302
+
nameBuf := make([]byte, 8)
2303
+
for i := uint64(0); i < n; i++ {
2304
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
878
-
if _, err := cw.WriteString(string("owner")); err != nil {
2310
+
// Field doesn't exist on this type, so ignore it
2311
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
882
-
if t.Owner == nil {
883
-
if _, err := cw.Write(cbg.CborNull); err != nil {
2317
+
switch string(nameBuf[:nameLen]) {
2318
+
// t.Packages ([]string) (slice)
2321
+
maj, extra, err = cr.ReadHeader()
887
-
if len(*t.Owner) > 1000000 {
888
-
return xerrors.Errorf("Value in field t.Owner was too long")
2327
+
return fmt.Errorf("t.Packages: array too large (%d)", extra)
2330
+
if maj != cbg.MajArray {
2331
+
return fmt.Errorf("expected cbor array")
891
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Owner))); err != nil {
2335
+
t.Packages = make([]string, extra)
894
-
if _, err := cw.WriteString(string(*t.Owner)); err != nil {
2338
+
for i := 0; i < int(extra); i++ {
2348
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2353
+
t.Packages[i] = string(sval)
2358
+
// t.Registry (string) (string)
2362
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2367
+
t.Registry = string(sval)
2371
+
// Field doesn't exist on this type, so ignore it
2372
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
900
-
// t.CommentId (int64) (int64)
901
-
if t.CommentId != nil {
2380
+
func (t *Pipeline_ManualTriggerData) MarshalCBOR(w io.Writer) error {
2382
+
_, err := w.Write(cbg.CborNull)
2386
+
cw := cbg.NewCborWriter(w)
2389
+
if t.Inputs == nil {
2393
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
2397
+
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2398
+
if t.Inputs != nil {
2400
+
if len("inputs") > 1000000 {
2401
+
return xerrors.Errorf("Value in field \"inputs\" was too long")
2404
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("inputs"))); err != nil {
2407
+
if _, err := cw.WriteString(string("inputs")); err != nil {
903
-
if len("commentId") > 1000000 {
904
-
return xerrors.Errorf("Value in field \"commentId\" was too long")
2411
+
if len(t.Inputs) > 8192 {
2412
+
return xerrors.Errorf("Slice value in field t.Inputs was too long")
907
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commentId"))); err != nil {
2415
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Inputs))); err != nil {
910
-
if _, err := cw.WriteString(string("commentId")); err != nil {
2418
+
for _, v := range t.Inputs {
2419
+
if err := v.MarshalCBOR(cw); err != nil {
2428
+
func (t *Pipeline_ManualTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
2429
+
*t = Pipeline_ManualTriggerData{}
2431
+
cr := cbg.NewCborReader(r)
2433
+
maj, extra, err := cr.ReadHeader()
2438
+
if err == io.EOF {
2439
+
err = io.ErrUnexpectedEOF
2443
+
if maj != cbg.MajMap {
2444
+
return fmt.Errorf("cbor input should be of type map")
2447
+
if extra > cbg.MaxLength {
2448
+
return fmt.Errorf("Pipeline_ManualTriggerData: map struct too large (%d)", extra)
2453
+
nameBuf := make([]byte, 6)
2454
+
for i := uint64(0); i < n; i++ {
2455
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
914
-
if t.CommentId == nil {
915
-
if _, err := cw.Write(cbg.CborNull); err != nil {
2461
+
// Field doesn't exist on this type, so ignore it
2462
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
919
-
if *t.CommentId >= 0 {
920
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.CommentId)); err != nil {
924
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-*t.CommentId-1)); err != nil {
2468
+
switch string(nameBuf[:nameLen]) {
2469
+
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2472
+
maj, extra, err = cr.ReadHeader()
2478
+
return fmt.Errorf("t.Inputs: array too large (%d)", extra)
2481
+
if maj != cbg.MajArray {
2482
+
return fmt.Errorf("expected cbor array")
2486
+
t.Inputs = make([]*Pipeline_ManualTriggerData_Inputs_Elem, extra)
2489
+
for i := 0; i < int(extra); i++ {
2500
+
b, err := cr.ReadByte()
2504
+
if b != cbg.CborNull[0] {
2505
+
if err := cr.UnreadByte(); err != nil {
2508
+
t.Inputs[i] = new(Pipeline_ManualTriggerData_Inputs_Elem)
2509
+
if err := t.Inputs[i].UnmarshalCBOR(cr); err != nil {
2510
+
return xerrors.Errorf("unmarshaling t.Inputs[i] pointer: %w", err)
2520
+
// Field doesn't exist on this type, so ignore it
2521
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
2529
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) MarshalCBOR(w io.Writer) error {
2531
+
_, err := w.Write(cbg.CborNull)
932
-
// t.CreatedAt (string) (string)
933
-
if len("createdAt") > 1000000 {
934
-
return xerrors.Errorf("Value in field \"createdAt\" was too long")
2535
+
cw := cbg.NewCborWriter(w)
2537
+
if _, err := cw.Write([]byte{162}); err != nil {
2541
+
// t.Key (string) (string)
2542
+
if len("key") > 1000000 {
2543
+
return xerrors.Errorf("Value in field \"key\" was too long")
2546
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
2549
+
if _, err := cw.WriteString(string("key")); err != nil {
2553
+
if len(t.Key) > 1000000 {
2554
+
return xerrors.Errorf("Value in field t.Key was too long")
937
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
2557
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
940
-
if _, err := cw.WriteString(string("createdAt")); err != nil {
2560
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
944
-
if len(t.CreatedAt) > 1000000 {
945
-
return xerrors.Errorf("Value in field t.CreatedAt was too long")
2564
+
// t.Value (string) (string)
2565
+
if len("value") > 1000000 {
2566
+
return xerrors.Errorf("Value in field \"value\" was too long")
948
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
2569
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
951
-
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
2572
+
if _, err := cw.WriteString(string("value")); err != nil {
2576
+
if len(t.Value) > 1000000 {
2577
+
return xerrors.Errorf("Value in field t.Value was too long")
2580
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
2583
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
957
-
func (t *RepoIssueComment) UnmarshalCBOR(r io.Reader) (err error) {
958
-
*t = RepoIssueComment{}
2589
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) UnmarshalCBOR(r io.Reader) (err error) {
2590
+
*t = Pipeline_ManualTriggerData_Inputs_Elem{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
977
-
return fmt.Errorf("RepoIssueComment: map struct too large (%d)", extra)
2609
+
return fmt.Errorf("Pipeline_ManualTriggerData_Inputs_Elem: map struct too large (%d)", extra)
982
-
nameBuf := make([]byte, 9)
2614
+
nameBuf := make([]byte, 5)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
998
-
// t.Body (string) (string)
2630
+
// t.Key (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1007
-
t.Body = string(sval)
2639
+
t.Key = string(sval)
1009
-
// t.Repo (string) (string)
2641
+
// t.Value (string) (string)
1013
-
b, err := cr.ReadByte()
2645
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1017
-
if b != cbg.CborNull[0] {
1018
-
if err := cr.UnreadByte(); err != nil {
1022
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2650
+
t.Value = string(sval)
1027
-
t.Repo = (*string)(&sval)
2654
+
// Field doesn't exist on this type, so ignore it
2655
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1030
-
// t.LexiconTypeID (string) (string)
1034
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2663
+
func (t *Pipeline_PullRequestTriggerData) MarshalCBOR(w io.Writer) error {
2665
+
_, err := w.Write(cbg.CborNull)
1039
-
t.LexiconTypeID = string(sval)
2669
+
cw := cbg.NewCborWriter(w)
2671
+
if _, err := cw.Write([]byte{164}); err != nil {
2675
+
// t.Action (string) (string)
2676
+
if len("action") > 1000000 {
2677
+
return xerrors.Errorf("Value in field \"action\" was too long")
2680
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("action"))); err != nil {
2683
+
if _, err := cw.WriteString(string("action")); err != nil {
2687
+
if len(t.Action) > 1000000 {
2688
+
return xerrors.Errorf("Value in field t.Action was too long")
2691
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Action))); err != nil {
2694
+
if _, err := cw.WriteString(string(t.Action)); err != nil {
2698
+
// t.SourceSha (string) (string)
2699
+
if len("sourceSha") > 1000000 {
2700
+
return xerrors.Errorf("Value in field \"sourceSha\" was too long")
2703
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sourceSha"))); err != nil {
2706
+
if _, err := cw.WriteString(string("sourceSha")); err != nil {
2710
+
if len(t.SourceSha) > 1000000 {
2711
+
return xerrors.Errorf("Value in field t.SourceSha was too long")
2714
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.SourceSha))); err != nil {
2717
+
if _, err := cw.WriteString(string(t.SourceSha)); err != nil {
2721
+
// t.SourceBranch (string) (string)
2722
+
if len("sourceBranch") > 1000000 {
2723
+
return xerrors.Errorf("Value in field \"sourceBranch\" was too long")
2726
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sourceBranch"))); err != nil {
2729
+
if _, err := cw.WriteString(string("sourceBranch")); err != nil {
2733
+
if len(t.SourceBranch) > 1000000 {
2734
+
return xerrors.Errorf("Value in field t.SourceBranch was too long")
2737
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.SourceBranch))); err != nil {
2740
+
if _, err := cw.WriteString(string(t.SourceBranch)); err != nil {
2744
+
// t.TargetBranch (string) (string)
2745
+
if len("targetBranch") > 1000000 {
2746
+
return xerrors.Errorf("Value in field \"targetBranch\" was too long")
2749
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetBranch"))); err != nil {
2752
+
if _, err := cw.WriteString(string("targetBranch")); err != nil {
2756
+
if len(t.TargetBranch) > 1000000 {
2757
+
return xerrors.Errorf("Value in field t.TargetBranch was too long")
2760
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetBranch))); err != nil {
2763
+
if _, err := cw.WriteString(string(t.TargetBranch)); err != nil {
2769
+
func (t *Pipeline_PullRequestTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
2770
+
*t = Pipeline_PullRequestTriggerData{}
2772
+
cr := cbg.NewCborReader(r)
2774
+
maj, extra, err := cr.ReadHeader()
2779
+
if err == io.EOF {
2780
+
err = io.ErrUnexpectedEOF
2784
+
if maj != cbg.MajMap {
2785
+
return fmt.Errorf("cbor input should be of type map")
2788
+
if extra > cbg.MaxLength {
2789
+
return fmt.Errorf("Pipeline_PullRequestTriggerData: map struct too large (%d)", extra)
2794
+
nameBuf := make([]byte, 12)
2795
+
for i := uint64(0); i < n; i++ {
2796
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
2802
+
// Field doesn't exist on this type, so ignore it
2803
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1041
-
// t.Issue (string) (string)
2809
+
switch string(nameBuf[:nameLen]) {
2810
+
// t.Action (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1050
-
t.Issue = string(sval)
2819
+
t.Action = string(sval)
1052
-
// t.Owner (string) (string)
2821
+
// t.SourceSha (string) (string)
1056
-
b, err := cr.ReadByte()
2825
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1060
-
if b != cbg.CborNull[0] {
1061
-
if err := cr.UnreadByte(); err != nil {
1065
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1070
-
t.Owner = (*string)(&sval)
2830
+
t.SourceSha = string(sval)
1073
-
// t.CommentId (int64) (int64)
2832
+
// t.SourceBranch (string) (string)
2833
+
case "sourceBranch":
1077
-
b, err := cr.ReadByte()
2836
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1081
-
if b != cbg.CborNull[0] {
1082
-
if err := cr.UnreadByte(); err != nil {
1085
-
maj, extra, err := cr.ReadHeader()
1091
-
case cbg.MajUnsignedInt:
1092
-
extraI = int64(extra)
1094
-
return fmt.Errorf("int64 positive overflow")
1096
-
case cbg.MajNegativeInt:
1097
-
extraI = int64(extra)
1099
-
return fmt.Errorf("int64 negative overflow")
1101
-
extraI = -1 - extraI
1103
-
return fmt.Errorf("wrong type for int64 field: %d", maj)
1106
-
t.CommentId = (*int64)(&extraI)
2841
+
t.SourceBranch = string(sval)
1109
-
// t.CreatedAt (string) (string)
2843
+
// t.TargetBranch (string) (string)
2844
+
case "targetBranch":
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1118
-
t.CreatedAt = string(sval)
2852
+
t.TargetBranch = string(sval)
···
1131
-
func (t *RepoIssueState) MarshalCBOR(w io.Writer) error {
2865
+
func (t *Pipeline_PushTriggerData) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
1143
-
// t.LexiconTypeID (string) (string)
1144
-
if len("$type") > 1000000 {
1145
-
return xerrors.Errorf("Value in field \"$type\" was too long")
2877
+
// t.Ref (string) (string)
2878
+
if len("ref") > 1000000 {
2879
+
return xerrors.Errorf("Value in field \"ref\" was too long")
1148
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
2882
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
1151
-
if _, err := cw.WriteString(string("$type")); err != nil {
2885
+
if _, err := cw.WriteString(string("ref")); err != nil {
1155
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.state"))); err != nil {
2889
+
if len(t.Ref) > 1000000 {
2890
+
return xerrors.Errorf("Value in field t.Ref was too long")
2893
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
1158
-
if _, err := cw.WriteString(string("sh.tangled.repo.issue.state")); err != nil {
2896
+
if _, err := cw.WriteString(string(t.Ref)); err != nil {
1162
-
// t.Issue (string) (string)
1163
-
if len("issue") > 1000000 {
1164
-
return xerrors.Errorf("Value in field \"issue\" was too long")
2900
+
// t.NewSha (string) (string)
2901
+
if len("newSha") > 1000000 {
2902
+
return xerrors.Errorf("Value in field \"newSha\" was too long")
1167
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
2905
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
1170
-
if _, err := cw.WriteString(string("issue")); err != nil {
2908
+
if _, err := cw.WriteString(string("newSha")); err != nil {
1174
-
if len(t.Issue) > 1000000 {
1175
-
return xerrors.Errorf("Value in field t.Issue was too long")
2912
+
if len(t.NewSha) > 1000000 {
2913
+
return xerrors.Errorf("Value in field t.NewSha was too long")
1178
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
2916
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
1181
-
if _, err := cw.WriteString(string(t.Issue)); err != nil {
2919
+
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
1185
-
// t.State (string) (string)
1186
-
if len("state") > 1000000 {
1187
-
return xerrors.Errorf("Value in field \"state\" was too long")
2923
+
// t.OldSha (string) (string)
2924
+
if len("oldSha") > 1000000 {
2925
+
return xerrors.Errorf("Value in field \"oldSha\" was too long")
1190
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("state"))); err != nil {
2928
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
1193
-
if _, err := cw.WriteString(string("state")); err != nil {
2931
+
if _, err := cw.WriteString(string("oldSha")); err != nil {
1197
-
if len(t.State) > 1000000 {
1198
-
return xerrors.Errorf("Value in field t.State was too long")
2935
+
if len(t.OldSha) > 1000000 {
2936
+
return xerrors.Errorf("Value in field t.OldSha was too long")
1201
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil {
2939
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
1204
-
if _, err := cw.WriteString(string(t.State)); err != nil {
2942
+
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
1210
-
func (t *RepoIssueState) UnmarshalCBOR(r io.Reader) (err error) {
1211
-
*t = RepoIssueState{}
2948
+
func (t *Pipeline_PushTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
2949
+
*t = Pipeline_PushTriggerData{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1230
-
return fmt.Errorf("RepoIssueState: map struct too large (%d)", extra)
2968
+
return fmt.Errorf("Pipeline_PushTriggerData: map struct too large (%d)", extra)
1235
-
nameBuf := make([]byte, 5)
2973
+
nameBuf := make([]byte, 6)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
1251
-
// t.LexiconTypeID (string) (string)
2989
+
// t.Ref (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1260
-
t.LexiconTypeID = string(sval)
2998
+
t.Ref = string(sval)
1262
-
// t.Issue (string) (string)
3000
+
// t.NewSha (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1271
-
t.Issue = string(sval)
3009
+
t.NewSha = string(sval)
1273
-
// t.State (string) (string)
3011
+
// t.OldSha (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1282
-
t.State = string(sval)
3020
+
t.OldSha = string(sval)
···
1295
-
func (t *RepoIssue) MarshalCBOR(w io.Writer) error {
3033
+
func (t *Pipeline_Step) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
1304
-
if t.Body == nil {
3041
+
if _, err := cw.Write([]byte{162}); err != nil {
1308
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
3045
+
// t.Name (string) (string)
3046
+
if len("name") > 1000000 {
3047
+
return xerrors.Errorf("Value in field \"name\" was too long")
3050
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
3053
+
if _, err := cw.WriteString(string("name")); err != nil {
1312
-
// t.Body (string) (string)
1313
-
if t.Body != nil {
3057
+
if len(t.Name) > 1000000 {
3058
+
return xerrors.Errorf("Value in field t.Name was too long")
1315
-
if len("body") > 1000000 {
1316
-
return xerrors.Errorf("Value in field \"body\" was too long")
3061
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
3064
+
if _, err := cw.WriteString(string(t.Name)); err != nil {
3068
+
// t.Command (string) (string)
3069
+
if len("command") > 1000000 {
3070
+
return xerrors.Errorf("Value in field \"command\" was too long")
3073
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("command"))); err != nil {
3076
+
if _, err := cw.WriteString(string("command")); err != nil {
3080
+
if len(t.Command) > 1000000 {
3081
+
return xerrors.Errorf("Value in field t.Command was too long")
3084
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Command))); err != nil {
3087
+
if _, err := cw.WriteString(string(t.Command)); err != nil {
3093
+
func (t *Pipeline_Step) UnmarshalCBOR(r io.Reader) (err error) {
3094
+
*t = Pipeline_Step{}
3096
+
cr := cbg.NewCborReader(r)
3098
+
maj, extra, err := cr.ReadHeader()
3103
+
if err == io.EOF {
3104
+
err = io.ErrUnexpectedEOF
1319
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
1322
-
if _, err := cw.WriteString(string("body")); err != nil {
3108
+
if maj != cbg.MajMap {
3109
+
return fmt.Errorf("cbor input should be of type map")
3112
+
if extra > cbg.MaxLength {
3113
+
return fmt.Errorf("Pipeline_Step: map struct too large (%d)", extra)
3118
+
nameBuf := make([]byte, 7)
3119
+
for i := uint64(0); i < n; i++ {
3120
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1326
-
if t.Body == nil {
1327
-
if _, err := cw.Write(cbg.CborNull); err != nil {
3126
+
// Field doesn't exist on this type, so ignore it
3127
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1331
-
if len(*t.Body) > 1000000 {
1332
-
return xerrors.Errorf("Value in field t.Body was too long")
3133
+
switch string(nameBuf[:nameLen]) {
3134
+
// t.Name (string) (string)
3138
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3143
+
t.Name = string(sval)
3145
+
// t.Command (string) (string)
1335
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Body))); err != nil {
3149
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3154
+
t.Command = string(sval)
1338
-
if _, err := cw.WriteString(string(*t.Body)); err != nil {
3158
+
// Field doesn't exist on this type, so ignore it
3159
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1344
-
// t.Repo (string) (string)
3167
+
func (t *Pipeline_TriggerMetadata) MarshalCBOR(w io.Writer) error {
3169
+
_, err := w.Write(cbg.CborNull)
3173
+
cw := cbg.NewCborWriter(w)
3176
+
if t.Manual == nil {
3180
+
if t.PullRequest == nil {
3184
+
if t.Push == nil {
3188
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
3192
+
// t.Kind (string) (string)
3193
+
if len("kind") > 1000000 {
3194
+
return xerrors.Errorf("Value in field \"kind\" was too long")
3197
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("kind"))); err != nil {
3200
+
if _, err := cw.WriteString(string("kind")); err != nil {
3204
+
if len(t.Kind) > 1000000 {
3205
+
return xerrors.Errorf("Value in field t.Kind was too long")
3208
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Kind))); err != nil {
3211
+
if _, err := cw.WriteString(string(t.Kind)); err != nil {
3215
+
// t.Push (tangled.Pipeline_PushTriggerData) (struct)
3216
+
if t.Push != nil {
3218
+
if len("push") > 1000000 {
3219
+
return xerrors.Errorf("Value in field \"push\" was too long")
3222
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("push"))); err != nil {
3225
+
if _, err := cw.WriteString(string("push")); err != nil {
3229
+
if err := t.Push.MarshalCBOR(cw); err != nil {
3234
+
// t.Repo (tangled.Pipeline_TriggerRepo) (struct)
if len("repo") > 1000000 {
return xerrors.Errorf("Value in field \"repo\" was too long")
···
1356
-
if len(t.Repo) > 1000000 {
1357
-
return xerrors.Errorf("Value in field t.Repo was too long")
3246
+
if err := t.Repo.MarshalCBOR(cw); err != nil {
1360
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
3250
+
// t.Manual (tangled.Pipeline_ManualTriggerData) (struct)
3251
+
if t.Manual != nil {
3253
+
if len("manual") > 1000000 {
3254
+
return xerrors.Errorf("Value in field \"manual\" was too long")
3257
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("manual"))); err != nil {
3260
+
if _, err := cw.WriteString(string("manual")); err != nil {
3264
+
if err := t.Manual.MarshalCBOR(cw); err != nil {
3269
+
// t.PullRequest (tangled.Pipeline_PullRequestTriggerData) (struct)
3270
+
if t.PullRequest != nil {
3272
+
if len("pullRequest") > 1000000 {
3273
+
return xerrors.Errorf("Value in field \"pullRequest\" was too long")
3276
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pullRequest"))); err != nil {
3279
+
if _, err := cw.WriteString(string("pullRequest")); err != nil {
3283
+
if err := t.PullRequest.MarshalCBOR(cw); err != nil {
1363
-
if _, err := cw.WriteString(string(t.Repo)); err != nil {
3290
+
func (t *Pipeline_TriggerMetadata) UnmarshalCBOR(r io.Reader) (err error) {
3291
+
*t = Pipeline_TriggerMetadata{}
3293
+
cr := cbg.NewCborReader(r)
3295
+
maj, extra, err := cr.ReadHeader()
3300
+
if err == io.EOF {
3301
+
err = io.ErrUnexpectedEOF
1367
-
// t.LexiconTypeID (string) (string)
1368
-
if len("$type") > 1000000 {
1369
-
return xerrors.Errorf("Value in field \"$type\" was too long")
3305
+
if maj != cbg.MajMap {
3306
+
return fmt.Errorf("cbor input should be of type map")
1372
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
3309
+
if extra > cbg.MaxLength {
3310
+
return fmt.Errorf("Pipeline_TriggerMetadata: map struct too large (%d)", extra)
1375
-
if _, err := cw.WriteString(string("$type")); err != nil {
3315
+
nameBuf := make([]byte, 11)
3316
+
for i := uint64(0); i < n; i++ {
3317
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
3323
+
// Field doesn't exist on this type, so ignore it
3324
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
3330
+
switch string(nameBuf[:nameLen]) {
3331
+
// t.Kind (string) (string)
3335
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3340
+
t.Kind = string(sval)
3342
+
// t.Push (tangled.Pipeline_PushTriggerData) (struct)
3347
+
b, err := cr.ReadByte()
3351
+
if b != cbg.CborNull[0] {
3352
+
if err := cr.UnreadByte(); err != nil {
3355
+
t.Push = new(Pipeline_PushTriggerData)
3356
+
if err := t.Push.UnmarshalCBOR(cr); err != nil {
3357
+
return xerrors.Errorf("unmarshaling t.Push pointer: %w", err)
3362
+
// t.Repo (tangled.Pipeline_TriggerRepo) (struct)
3367
+
b, err := cr.ReadByte()
3371
+
if b != cbg.CborNull[0] {
3372
+
if err := cr.UnreadByte(); err != nil {
3375
+
t.Repo = new(Pipeline_TriggerRepo)
3376
+
if err := t.Repo.UnmarshalCBOR(cr); err != nil {
3377
+
return xerrors.Errorf("unmarshaling t.Repo pointer: %w", err)
3382
+
// t.Manual (tangled.Pipeline_ManualTriggerData) (struct)
3387
+
b, err := cr.ReadByte()
3391
+
if b != cbg.CborNull[0] {
3392
+
if err := cr.UnreadByte(); err != nil {
3395
+
t.Manual = new(Pipeline_ManualTriggerData)
3396
+
if err := t.Manual.UnmarshalCBOR(cr); err != nil {
3397
+
return xerrors.Errorf("unmarshaling t.Manual pointer: %w", err)
3402
+
// t.PullRequest (tangled.Pipeline_PullRequestTriggerData) (struct)
3403
+
case "pullRequest":
3407
+
b, err := cr.ReadByte()
3411
+
if b != cbg.CborNull[0] {
3412
+
if err := cr.UnreadByte(); err != nil {
3415
+
t.PullRequest = new(Pipeline_PullRequestTriggerData)
3416
+
if err := t.PullRequest.UnmarshalCBOR(cr); err != nil {
3417
+
return xerrors.Errorf("unmarshaling t.PullRequest pointer: %w", err)
3424
+
// Field doesn't exist on this type, so ignore it
3425
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1379
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue"))); err != nil {
3433
+
func (t *Pipeline_TriggerRepo) MarshalCBOR(w io.Writer) error {
3435
+
_, err := w.Write(cbg.CborNull)
1382
-
if _, err := cw.WriteString(string("sh.tangled.repo.issue")); err != nil {
3439
+
cw := cbg.NewCborWriter(w)
3441
+
if _, err := cw.Write([]byte{164}); err != nil {
1386
-
// t.Owner (string) (string)
1387
-
if len("owner") > 1000000 {
1388
-
return xerrors.Errorf("Value in field \"owner\" was too long")
3445
+
// t.Did (string) (string)
3446
+
if len("did") > 1000000 {
3447
+
return xerrors.Errorf("Value in field \"did\" was too long")
1391
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
3450
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("did"))); err != nil {
1394
-
if _, err := cw.WriteString(string("owner")); err != nil {
3453
+
if _, err := cw.WriteString(string("did")); err != nil {
1398
-
if len(t.Owner) > 1000000 {
1399
-
return xerrors.Errorf("Value in field t.Owner was too long")
3457
+
if len(t.Did) > 1000000 {
3458
+
return xerrors.Errorf("Value in field t.Did was too long")
1402
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
3461
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Did))); err != nil {
1405
-
if _, err := cw.WriteString(string(t.Owner)); err != nil {
3464
+
if _, err := cw.WriteString(string(t.Did)); err != nil {
1409
-
// t.Title (string) (string)
1410
-
if len("title") > 1000000 {
1411
-
return xerrors.Errorf("Value in field \"title\" was too long")
3468
+
// t.Knot (string) (string)
3469
+
if len("knot") > 1000000 {
3470
+
return xerrors.Errorf("Value in field \"knot\" was too long")
1414
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("title"))); err != nil {
3473
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("knot"))); err != nil {
1417
-
if _, err := cw.WriteString(string("title")); err != nil {
3476
+
if _, err := cw.WriteString(string("knot")); err != nil {
1421
-
if len(t.Title) > 1000000 {
1422
-
return xerrors.Errorf("Value in field t.Title was too long")
3480
+
if len(t.Knot) > 1000000 {
3481
+
return xerrors.Errorf("Value in field t.Knot was too long")
1425
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Title))); err != nil {
3484
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Knot))); err != nil {
1428
-
if _, err := cw.WriteString(string(t.Title)); err != nil {
3487
+
if _, err := cw.WriteString(string(t.Knot)); err != nil {
1432
-
// t.IssueId (int64) (int64)
1433
-
if len("issueId") > 1000000 {
1434
-
return xerrors.Errorf("Value in field \"issueId\" was too long")
3491
+
// t.Repo (string) (string)
3492
+
if len("repo") > 1000000 {
3493
+
return xerrors.Errorf("Value in field \"repo\" was too long")
1437
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issueId"))); err != nil {
3496
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
1440
-
if _, err := cw.WriteString(string("issueId")); err != nil {
3499
+
if _, err := cw.WriteString(string("repo")); err != nil {
1444
-
if t.IssueId >= 0 {
1445
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.IssueId)); err != nil {
1449
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.IssueId-1)); err != nil {
3503
+
if len(t.Repo) > 1000000 {
3504
+
return xerrors.Errorf("Value in field t.Repo was too long")
1454
-
// t.CreatedAt (string) (string)
1455
-
if len("createdAt") > 1000000 {
1456
-
return xerrors.Errorf("Value in field \"createdAt\" was too long")
3507
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
3510
+
if _, err := cw.WriteString(string(t.Repo)); err != nil {
1459
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
3514
+
// t.DefaultBranch (string) (string)
3515
+
if len("defaultBranch") > 1000000 {
3516
+
return xerrors.Errorf("Value in field \"defaultBranch\" was too long")
3519
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("defaultBranch"))); err != nil {
1462
-
if _, err := cw.WriteString(string("createdAt")); err != nil {
3522
+
if _, err := cw.WriteString(string("defaultBranch")); err != nil {
1466
-
if len(t.CreatedAt) > 1000000 {
1467
-
return xerrors.Errorf("Value in field t.CreatedAt was too long")
3526
+
if len(t.DefaultBranch) > 1000000 {
3527
+
return xerrors.Errorf("Value in field t.DefaultBranch was too long")
1470
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
3530
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.DefaultBranch))); err != nil {
1473
-
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
3533
+
if _, err := cw.WriteString(string(t.DefaultBranch)); err != nil {
1479
-
func (t *RepoIssue) UnmarshalCBOR(r io.Reader) (err error) {
3539
+
func (t *Pipeline_TriggerRepo) UnmarshalCBOR(r io.Reader) (err error) {
3540
+
*t = Pipeline_TriggerRepo{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1499
-
return fmt.Errorf("RepoIssue: map struct too large (%d)", extra)
3559
+
return fmt.Errorf("Pipeline_TriggerRepo: map struct too large (%d)", extra)
1504
-
nameBuf := make([]byte, 9)
3564
+
nameBuf := make([]byte, 13)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
1520
-
// t.Body (string) (string)
3580
+
// t.Did (string) (string)
1524
-
b, err := cr.ReadByte()
3584
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1528
-
if b != cbg.CborNull[0] {
1529
-
if err := cr.UnreadByte(); err != nil {
1533
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3589
+
t.Did = string(sval)
3591
+
// t.Knot (string) (string)
1538
-
t.Body = (*string)(&sval)
3595
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3600
+
t.Knot = string(sval)
// t.Repo (string) (string)
···
1552
-
// t.LexiconTypeID (string) (string)
3613
+
// t.DefaultBranch (string) (string)
3614
+
case "defaultBranch":
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1561
-
t.LexiconTypeID = string(sval)
3622
+
t.DefaultBranch = string(sval)
1563
-
// t.Owner (string) (string)
3626
+
// Field doesn't exist on this type, so ignore it
3627
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
3635
+
func (t *PublicKey) MarshalCBOR(w io.Writer) error {
3637
+
_, err := w.Write(cbg.CborNull)
3641
+
cw := cbg.NewCborWriter(w)
3643
+
if _, err := cw.Write([]byte{164}); err != nil {
3647
+
// t.Key (string) (string)
3648
+
if len("key") > 1000000 {
3649
+
return xerrors.Errorf("Value in field \"key\" was too long")
3652
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
3655
+
if _, err := cw.WriteString(string("key")); err != nil {
3659
+
if len(t.Key) > 1000000 {
3660
+
return xerrors.Errorf("Value in field t.Key was too long")
3663
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
3666
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
3670
+
// t.Name (string) (string)
3671
+
if len("name") > 1000000 {
3672
+
return xerrors.Errorf("Value in field \"name\" was too long")
3675
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
3678
+
if _, err := cw.WriteString(string("name")); err != nil {
3682
+
if len(t.Name) > 1000000 {
3683
+
return xerrors.Errorf("Value in field t.Name was too long")
3686
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
3689
+
if _, err := cw.WriteString(string(t.Name)); err != nil {
3693
+
// t.LexiconTypeID (string) (string)
3694
+
if len("$type") > 1000000 {
3695
+
return xerrors.Errorf("Value in field \"$type\" was too long")
3698
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
3701
+
if _, err := cw.WriteString(string("$type")); err != nil {
3705
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.publicKey"))); err != nil {
3708
+
if _, err := cw.WriteString(string("sh.tangled.publicKey")); err != nil {
3712
+
// t.CreatedAt (string) (string)
3713
+
if len("createdAt") > 1000000 {
3714
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
3717
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
3720
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
3724
+
if len(t.CreatedAt) > 1000000 {
3725
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
3728
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
3731
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
3737
+
func (t *PublicKey) UnmarshalCBOR(r io.Reader) (err error) {
3740
+
cr := cbg.NewCborReader(r)
3742
+
maj, extra, err := cr.ReadHeader()
3747
+
if err == io.EOF {
3748
+
err = io.ErrUnexpectedEOF
3752
+
if maj != cbg.MajMap {
3753
+
return fmt.Errorf("cbor input should be of type map")
3756
+
if extra > cbg.MaxLength {
3757
+
return fmt.Errorf("PublicKey: map struct too large (%d)", extra)
3762
+
nameBuf := make([]byte, 9)
3763
+
for i := uint64(0); i < n; i++ {
3764
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
3770
+
// Field doesn't exist on this type, so ignore it
3771
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
3777
+
switch string(nameBuf[:nameLen]) {
3778
+
// t.Key (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1572
-
t.Owner = string(sval)
3787
+
t.Key = string(sval)
1574
-
// t.Title (string) (string)
3789
+
// t.Name (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1583
-
t.Title = string(sval)
3798
+
t.Name = string(sval)
1585
-
// t.IssueId (int64) (int64)
3800
+
// t.LexiconTypeID (string) (string)
1588
-
maj, extra, err := cr.ReadHeader()
3804
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1594
-
case cbg.MajUnsignedInt:
1595
-
extraI = int64(extra)
1597
-
return fmt.Errorf("int64 positive overflow")
1599
-
case cbg.MajNegativeInt:
1600
-
extraI = int64(extra)
1602
-
return fmt.Errorf("int64 negative overflow")
1604
-
extraI = -1 - extraI
1606
-
return fmt.Errorf("wrong type for int64 field: %d", maj)
1609
-
t.IssueId = int64(extraI)
3809
+
t.LexiconTypeID = string(sval)
// t.CreatedAt (string) (string)
···
1980
-
func (t *RepoPull) MarshalCBOR(w io.Writer) error {
4180
+
func (t *RepoArtifact) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
1989
-
if t.Body == nil {
1993
-
if t.Source == nil {
4193
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
4197
+
// t.Tag (util.LexBytes) (slice)
4200
+
if len("tag") > 1000000 {
4201
+
return xerrors.Errorf("Value in field \"tag\" was too long")
4204
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("tag"))); err != nil {
4207
+
if _, err := cw.WriteString(string("tag")); err != nil {
4211
+
if len(t.Tag) > 2097152 {
4212
+
return xerrors.Errorf("Byte array in field t.Tag was too long")
4215
+
if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Tag))); err != nil {
4219
+
if _, err := cw.Write(t.Tag); err != nil {
4225
+
// t.Name (string) (string)
4226
+
if len("name") > 1000000 {
4227
+
return xerrors.Errorf("Value in field \"name\" was too long")
4230
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
4233
+
if _, err := cw.WriteString(string("name")); err != nil {
4237
+
if len(t.Name) > 1000000 {
4238
+
return xerrors.Errorf("Value in field t.Name was too long")
4241
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
4244
+
if _, err := cw.WriteString(string(t.Name)); err != nil {
4248
+
// t.Repo (string) (string)
4249
+
if len("repo") > 1000000 {
4250
+
return xerrors.Errorf("Value in field \"repo\" was too long")
4253
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
4256
+
if _, err := cw.WriteString(string("repo")); err != nil {
4260
+
if len(t.Repo) > 1000000 {
4261
+
return xerrors.Errorf("Value in field t.Repo was too long")
4264
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
4267
+
if _, err := cw.WriteString(string(t.Repo)); err != nil {
4271
+
// t.LexiconTypeID (string) (string)
4272
+
if len("$type") > 1000000 {
4273
+
return xerrors.Errorf("Value in field \"$type\" was too long")
4276
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
4279
+
if _, err := cw.WriteString(string("$type")); err != nil {
4283
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.artifact"))); err != nil {
4286
+
if _, err := cw.WriteString(string("sh.tangled.repo.artifact")); err != nil {
4290
+
// t.Artifact (util.LexBlob) (struct)
4291
+
if len("artifact") > 1000000 {
4292
+
return xerrors.Errorf("Value in field \"artifact\" was too long")
4295
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("artifact"))); err != nil {
4298
+
if _, err := cw.WriteString(string("artifact")); err != nil {
4302
+
if err := t.Artifact.MarshalCBOR(cw); err != nil {
4306
+
// t.CreatedAt (string) (string)
4307
+
if len("createdAt") > 1000000 {
4308
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
4311
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
4314
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
4318
+
if len(t.CreatedAt) > 1000000 {
4319
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
4322
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
4325
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
4331
+
func (t *RepoArtifact) UnmarshalCBOR(r io.Reader) (err error) {
4332
+
*t = RepoArtifact{}
4334
+
cr := cbg.NewCborReader(r)
4336
+
maj, extra, err := cr.ReadHeader()
4341
+
if err == io.EOF {
4342
+
err = io.ErrUnexpectedEOF
4346
+
if maj != cbg.MajMap {
4347
+
return fmt.Errorf("cbor input should be of type map")
4350
+
if extra > cbg.MaxLength {
4351
+
return fmt.Errorf("RepoArtifact: map struct too large (%d)", extra)
4356
+
nameBuf := make([]byte, 9)
4357
+
for i := uint64(0); i < n; i++ {
4358
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
4364
+
// Field doesn't exist on this type, so ignore it
4365
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
4371
+
switch string(nameBuf[:nameLen]) {
4372
+
// t.Tag (util.LexBytes) (slice)
4375
+
maj, extra, err = cr.ReadHeader()
4380
+
if extra > 2097152 {
4381
+
return fmt.Errorf("t.Tag: byte array too large (%d)", extra)
4383
+
if maj != cbg.MajByteString {
4384
+
return fmt.Errorf("expected byte array")
4388
+
t.Tag = make([]uint8, extra)
4391
+
if _, err := io.ReadFull(cr, t.Tag); err != nil {
4395
+
// t.Name (string) (string)
4399
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4404
+
t.Name = string(sval)
4406
+
// t.Repo (string) (string)
4410
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4415
+
t.Repo = string(sval)
4417
+
// t.LexiconTypeID (string) (string)
4421
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4426
+
t.LexiconTypeID = string(sval)
4428
+
// t.Artifact (util.LexBlob) (struct)
4433
+
b, err := cr.ReadByte()
4437
+
if b != cbg.CborNull[0] {
4438
+
if err := cr.UnreadByte(); err != nil {
4441
+
t.Artifact = new(util.LexBlob)
4442
+
if err := t.Artifact.UnmarshalCBOR(cr); err != nil {
4443
+
return xerrors.Errorf("unmarshaling t.Artifact pointer: %w", err)
4448
+
// t.CreatedAt (string) (string)
4452
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4457
+
t.CreatedAt = string(sval)
4461
+
// Field doesn't exist on this type, so ignore it
4462
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
4470
+
func (t *RepoIssue) MarshalCBOR(w io.Writer) error {
4472
+
_, err := w.Write(cbg.CborNull)
4476
+
cw := cbg.NewCborWriter(w)
4479
+
if t.Body == nil {
···
4519
+
// t.Repo (string) (string)
4520
+
if len("repo") > 1000000 {
4521
+
return xerrors.Errorf("Value in field \"repo\" was too long")
4524
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
4527
+
if _, err := cw.WriteString(string("repo")); err != nil {
4531
+
if len(t.Repo) > 1000000 {
4532
+
return xerrors.Errorf("Value in field t.Repo was too long")
4535
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
4538
+
if _, err := cw.WriteString(string(t.Repo)); err != nil {
// t.LexiconTypeID (string) (string)
if len("$type") > 1000000 {
return xerrors.Errorf("Value in field \"$type\" was too long")
···
2045
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull"))); err != nil {
4554
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue"))); err != nil {
2048
-
if _, err := cw.WriteString(string("sh.tangled.repo.pull")); err != nil {
4557
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue")); err != nil {
2052
-
// t.Patch (string) (string)
2053
-
if len("patch") > 1000000 {
2054
-
return xerrors.Errorf("Value in field \"patch\" was too long")
4561
+
// t.Owner (string) (string)
4562
+
if len("owner") > 1000000 {
4563
+
return xerrors.Errorf("Value in field \"owner\" was too long")
2057
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("patch"))); err != nil {
4566
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
2060
-
if _, err := cw.WriteString(string("patch")); err != nil {
4569
+
if _, err := cw.WriteString(string("owner")); err != nil {
2064
-
if len(t.Patch) > 1000000 {
2065
-
return xerrors.Errorf("Value in field t.Patch was too long")
4573
+
if len(t.Owner) > 1000000 {
4574
+
return xerrors.Errorf("Value in field t.Owner was too long")
2068
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Patch))); err != nil {
4577
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
2071
-
if _, err := cw.WriteString(string(t.Patch)); err != nil {
4580
+
if _, err := cw.WriteString(string(t.Owner)); err != nil {
···
2098
-
// t.PullId (int64) (int64)
2099
-
if len("pullId") > 1000000 {
2100
-
return xerrors.Errorf("Value in field \"pullId\" was too long")
4607
+
// t.IssueId (int64) (int64)
4608
+
if len("issueId") > 1000000 {
4609
+
return xerrors.Errorf("Value in field \"issueId\" was too long")
2103
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pullId"))); err != nil {
4612
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issueId"))); err != nil {
2106
-
if _, err := cw.WriteString(string("pullId")); err != nil {
4615
+
if _, err := cw.WriteString(string("issueId")); err != nil {
2110
-
if t.PullId >= 0 {
2111
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PullId)); err != nil {
4619
+
if t.IssueId >= 0 {
4620
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.IssueId)); err != nil {
2115
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.PullId-1)); err != nil {
2120
-
// t.Source (tangled.RepoPull_Source) (struct)
2121
-
if t.Source != nil {
2123
-
if len("source") > 1000000 {
2124
-
return xerrors.Errorf("Value in field \"source\" was too long")
2127
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
2130
-
if _, err := cw.WriteString(string("source")); err != nil {
2134
-
if err := t.Source.MarshalCBOR(cw); err != nil {
4624
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.IssueId-1)); err != nil {
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
2162
-
// t.TargetRepo (string) (string)
2163
-
if len("targetRepo") > 1000000 {
2164
-
return xerrors.Errorf("Value in field \"targetRepo\" was too long")
2167
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetRepo"))); err != nil {
2170
-
if _, err := cw.WriteString(string("targetRepo")); err != nil {
2174
-
if len(t.TargetRepo) > 1000000 {
2175
-
return xerrors.Errorf("Value in field t.TargetRepo was too long")
2178
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetRepo))); err != nil {
2181
-
if _, err := cw.WriteString(string(t.TargetRepo)); err != nil {
2185
-
// t.TargetBranch (string) (string)
2186
-
if len("targetBranch") > 1000000 {
2187
-
return xerrors.Errorf("Value in field \"targetBranch\" was too long")
2190
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetBranch"))); err != nil {
2193
-
if _, err := cw.WriteString(string("targetBranch")); err != nil {
2197
-
if len(t.TargetBranch) > 1000000 {
2198
-
return xerrors.Errorf("Value in field t.TargetBranch was too long")
2201
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetBranch))); err != nil {
2204
-
if _, err := cw.WriteString(string(t.TargetBranch)); err != nil {
2210
-
func (t *RepoPull) UnmarshalCBOR(r io.Reader) (err error) {
4654
+
func (t *RepoIssue) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2230
-
return fmt.Errorf("RepoPull: map struct too large (%d)", extra)
4674
+
return fmt.Errorf("RepoIssue: map struct too large (%d)", extra)
2235
-
nameBuf := make([]byte, 12)
4679
+
nameBuf := make([]byte, 9)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
t.Body = (*string)(&sval)
4716
+
// t.Repo (string) (string)
4720
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4725
+
t.Repo = string(sval)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
2283
-
// t.Patch (string) (string)
4738
+
// t.Owner (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
2292
-
t.Patch = string(sval)
4747
+
t.Owner = string(sval)
// t.Title (string) (string)
···
2305
-
// t.PullId (int64) (int64)
4760
+
// t.IssueId (int64) (int64)
maj, extra, err := cr.ReadHeader()
···
return fmt.Errorf("wrong type for int64 field: %d", maj)
2329
-
t.PullId = int64(extraI)
2331
-
// t.Source (tangled.RepoPull_Source) (struct)
2336
-
b, err := cr.ReadByte()
2340
-
if b != cbg.CborNull[0] {
2341
-
if err := cr.UnreadByte(); err != nil {
2344
-
t.Source = new(RepoPull_Source)
2345
-
if err := t.Source.UnmarshalCBOR(cr); err != nil {
2346
-
return xerrors.Errorf("unmarshaling t.Source pointer: %w", err)
4784
+
t.IssueId = int64(extraI)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
2362
-
// t.TargetRepo (string) (string)
2363
-
case "targetRepo":
2366
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2371
-
t.TargetRepo = string(sval)
2373
-
// t.TargetBranch (string) (string)
2374
-
case "targetBranch":
2377
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2382
-
t.TargetBranch = string(sval)
// Field doesn't exist on this type, so ignore it
···
2395
-
func (t *RepoPull_Source) MarshalCBOR(w io.Writer) error {
4808
+
func (t *RepoIssueComment) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
4817
+
if t.CommentId == nil {
4821
+
if t.Owner == nil {
···
4833
+
// t.Body (string) (string)
4834
+
if len("body") > 1000000 {
4835
+
return xerrors.Errorf("Value in field \"body\" was too long")
4838
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
4841
+
if _, err := cw.WriteString(string("body")); err != nil {
4845
+
if len(t.Body) > 1000000 {
4846
+
return xerrors.Errorf("Value in field t.Body was too long")
4849
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Body))); err != nil {
4852
+
if _, err := cw.WriteString(string(t.Body)); err != nil {
// t.Repo (string) (string)
···
2444
-
// t.Branch (string) (string)
2445
-
if len("branch") > 1000000 {
2446
-
return xerrors.Errorf("Value in field \"branch\" was too long")
4888
+
// t.LexiconTypeID (string) (string)
4889
+
if len("$type") > 1000000 {
4890
+
return xerrors.Errorf("Value in field \"$type\" was too long")
4893
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
4896
+
if _, err := cw.WriteString(string("$type")); err != nil {
4900
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.comment"))); err != nil {
4903
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue.comment")); err != nil {
4907
+
// t.Issue (string) (string)
4908
+
if len("issue") > 1000000 {
4909
+
return xerrors.Errorf("Value in field \"issue\" was too long")
4912
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
4915
+
if _, err := cw.WriteString(string("issue")); err != nil {
4919
+
if len(t.Issue) > 1000000 {
4920
+
return xerrors.Errorf("Value in field t.Issue was too long")
4923
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
4926
+
if _, err := cw.WriteString(string(t.Issue)); err != nil {
4930
+
// t.Owner (string) (string)
4931
+
if t.Owner != nil {
4933
+
if len("owner") > 1000000 {
4934
+
return xerrors.Errorf("Value in field \"owner\" was too long")
4937
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
4940
+
if _, err := cw.WriteString(string("owner")); err != nil {
4944
+
if t.Owner == nil {
4945
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4949
+
if len(*t.Owner) > 1000000 {
4950
+
return xerrors.Errorf("Value in field t.Owner was too long")
4953
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Owner))); err != nil {
4956
+
if _, err := cw.WriteString(string(*t.Owner)); err != nil {
4962
+
// t.CommentId (int64) (int64)
4963
+
if t.CommentId != nil {
4965
+
if len("commentId") > 1000000 {
4966
+
return xerrors.Errorf("Value in field \"commentId\" was too long")
4969
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commentId"))); err != nil {
4972
+
if _, err := cw.WriteString(string("commentId")); err != nil {
4976
+
if t.CommentId == nil {
4977
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4981
+
if *t.CommentId >= 0 {
4982
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.CommentId)); err != nil {
4986
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-*t.CommentId-1)); err != nil {
4994
+
// t.CreatedAt (string) (string)
4995
+
if len("createdAt") > 1000000 {
4996
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
2449
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("branch"))); err != nil {
4999
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
2452
-
if _, err := cw.WriteString(string("branch")); err != nil {
5002
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
2456
-
if len(t.Branch) > 1000000 {
2457
-
return xerrors.Errorf("Value in field t.Branch was too long")
5006
+
if len(t.CreatedAt) > 1000000 {
5007
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
2460
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Branch))); err != nil {
5010
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
2463
-
if _, err := cw.WriteString(string(t.Branch)); err != nil {
5013
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
2469
-
func (t *RepoPull_Source) UnmarshalCBOR(r io.Reader) (err error) {
2470
-
*t = RepoPull_Source{}
5019
+
func (t *RepoIssueComment) UnmarshalCBOR(r io.Reader) (err error) {
5020
+
*t = RepoIssueComment{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2489
-
return fmt.Errorf("RepoPull_Source: map struct too large (%d)", extra)
5039
+
return fmt.Errorf("RepoIssueComment: map struct too large (%d)", extra)
2494
-
nameBuf := make([]byte, 6)
5044
+
nameBuf := make([]byte, 9)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
2510
-
// t.Repo (string) (string)
5060
+
// t.Body (string) (string)
5064
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5069
+
t.Body = string(sval)
5071
+
// t.Repo (string) (string)
···
t.Repo = (*string)(&sval)
2531
-
// t.Branch (string) (string)
5092
+
// t.LexiconTypeID (string) (string)
5096
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5101
+
t.LexiconTypeID = string(sval)
5103
+
// t.Issue (string) (string)
5107
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5112
+
t.Issue = string(sval)
5114
+
// t.Owner (string) (string)
5118
+
b, err := cr.ReadByte()
5122
+
if b != cbg.CborNull[0] {
5123
+
if err := cr.UnreadByte(); err != nil {
5127
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5132
+
t.Owner = (*string)(&sval)
5135
+
// t.CommentId (int64) (int64)
5139
+
b, err := cr.ReadByte()
5143
+
if b != cbg.CborNull[0] {
5144
+
if err := cr.UnreadByte(); err != nil {
5147
+
maj, extra, err := cr.ReadHeader()
5153
+
case cbg.MajUnsignedInt:
5154
+
extraI = int64(extra)
5156
+
return fmt.Errorf("int64 positive overflow")
5158
+
case cbg.MajNegativeInt:
5159
+
extraI = int64(extra)
5161
+
return fmt.Errorf("int64 negative overflow")
5163
+
extraI = -1 - extraI
5165
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
5168
+
t.CommentId = (*int64)(&extraI)
5171
+
// t.CreatedAt (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
2540
-
t.Branch = string(sval)
5180
+
t.CreatedAt = string(sval)
···
2553
-
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
5193
+
func (t *RepoIssueState) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
2565
-
// t.Pull (string) (string)
2566
-
if len("pull") > 1000000 {
2567
-
return xerrors.Errorf("Value in field \"pull\" was too long")
5205
+
// t.LexiconTypeID (string) (string)
5206
+
if len("$type") > 1000000 {
5207
+
return xerrors.Errorf("Value in field \"$type\" was too long")
5210
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
5213
+
if _, err := cw.WriteString(string("$type")); err != nil {
5217
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.state"))); err != nil {
5220
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue.state")); err != nil {
5224
+
// t.Issue (string) (string)
5225
+
if len("issue") > 1000000 {
5226
+
return xerrors.Errorf("Value in field \"issue\" was too long")
5229
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
5232
+
if _, err := cw.WriteString(string("issue")); err != nil {
5236
+
if len(t.Issue) > 1000000 {
5237
+
return xerrors.Errorf("Value in field t.Issue was too long")
2570
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
5240
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
2573
-
if _, err := cw.WriteString(string("pull")); err != nil {
5243
+
if _, err := cw.WriteString(string(t.Issue)); err != nil {
2577
-
if len(t.Pull) > 1000000 {
2578
-
return xerrors.Errorf("Value in field t.Pull was too long")
5247
+
// t.State (string) (string)
5248
+
if len("state") > 1000000 {
5249
+
return xerrors.Errorf("Value in field \"state\" was too long")
2581
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
5252
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("state"))); err != nil {
2584
-
if _, err := cw.WriteString(string(t.Pull)); err != nil {
5255
+
if _, err := cw.WriteString(string("state")); err != nil {
5259
+
if len(t.State) > 1000000 {
5260
+
return xerrors.Errorf("Value in field t.State was too long")
5263
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil {
5266
+
if _, err := cw.WriteString(string(t.State)); err != nil {
5272
+
func (t *RepoIssueState) UnmarshalCBOR(r io.Reader) (err error) {
5273
+
*t = RepoIssueState{}
5275
+
cr := cbg.NewCborReader(r)
5277
+
maj, extra, err := cr.ReadHeader()
5282
+
if err == io.EOF {
5283
+
err = io.ErrUnexpectedEOF
5287
+
if maj != cbg.MajMap {
5288
+
return fmt.Errorf("cbor input should be of type map")
5291
+
if extra > cbg.MaxLength {
5292
+
return fmt.Errorf("RepoIssueState: map struct too large (%d)", extra)
5297
+
nameBuf := make([]byte, 5)
5298
+
for i := uint64(0); i < n; i++ {
5299
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
5305
+
// Field doesn't exist on this type, so ignore it
5306
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
5312
+
switch string(nameBuf[:nameLen]) {
5313
+
// t.LexiconTypeID (string) (string)
5317
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5322
+
t.LexiconTypeID = string(sval)
5324
+
// t.Issue (string) (string)
5328
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5333
+
t.Issue = string(sval)
5335
+
// t.State (string) (string)
5339
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5344
+
t.State = string(sval)
5348
+
// Field doesn't exist on this type, so ignore it
5349
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
5357
+
func (t *RepoPull) MarshalCBOR(w io.Writer) error {
5359
+
_, err := w.Write(cbg.CborNull)
5363
+
cw := cbg.NewCborWriter(w)
5366
+
if t.Body == nil {
5370
+
if t.Source == nil {
5374
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
5378
+
// t.Body (string) (string)
5379
+
if t.Body != nil {
5381
+
if len("body") > 1000000 {
5382
+
return xerrors.Errorf("Value in field \"body\" was too long")
5385
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
5388
+
if _, err := cw.WriteString(string("body")); err != nil {
5392
+
if t.Body == nil {
5393
+
if _, err := cw.Write(cbg.CborNull); err != nil {
5397
+
if len(*t.Body) > 1000000 {
5398
+
return xerrors.Errorf("Value in field t.Body was too long")
5401
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Body))); err != nil {
5404
+
if _, err := cw.WriteString(string(*t.Body)); err != nil {
// t.LexiconTypeID (string) (string)
if len("$type") > 1000000 {
return xerrors.Errorf("Value in field \"$type\" was too long")
···
2600
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.status"))); err != nil {
5422
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull"))); err != nil {
2603
-
if _, err := cw.WriteString(string("sh.tangled.repo.pull.status")); err != nil {
5425
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull")); err != nil {
2607
-
// t.Status (string) (string)
2608
-
if len("status") > 1000000 {
2609
-
return xerrors.Errorf("Value in field \"status\" was too long")
5429
+
// t.Patch (string) (string)
5430
+
if len("patch") > 1000000 {
5431
+
return xerrors.Errorf("Value in field \"patch\" was too long")
5434
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("patch"))); err != nil {
5437
+
if _, err := cw.WriteString(string("patch")); err != nil {
5441
+
if len(t.Patch) > 1000000 {
5442
+
return xerrors.Errorf("Value in field t.Patch was too long")
5445
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Patch))); err != nil {
5448
+
if _, err := cw.WriteString(string(t.Patch)); err != nil {
5452
+
// t.Title (string) (string)
5453
+
if len("title") > 1000000 {
5454
+
return xerrors.Errorf("Value in field \"title\" was too long")
5457
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("title"))); err != nil {
5460
+
if _, err := cw.WriteString(string("title")); err != nil {
5464
+
if len(t.Title) > 1000000 {
5465
+
return xerrors.Errorf("Value in field t.Title was too long")
5468
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Title))); err != nil {
5471
+
if _, err := cw.WriteString(string(t.Title)); err != nil {
5475
+
// t.PullId (int64) (int64)
5476
+
if len("pullId") > 1000000 {
5477
+
return xerrors.Errorf("Value in field \"pullId\" was too long")
5480
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pullId"))); err != nil {
5483
+
if _, err := cw.WriteString(string("pullId")); err != nil {
5487
+
if t.PullId >= 0 {
5488
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PullId)); err != nil {
5492
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.PullId-1)); err != nil {
5497
+
// t.Source (tangled.RepoPull_Source) (struct)
5498
+
if t.Source != nil {
5500
+
if len("source") > 1000000 {
5501
+
return xerrors.Errorf("Value in field \"source\" was too long")
5504
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
5507
+
if _, err := cw.WriteString(string("source")); err != nil {
5511
+
if err := t.Source.MarshalCBOR(cw); err != nil {
5516
+
// t.CreatedAt (string) (string)
5517
+
if len("createdAt") > 1000000 {
5518
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
5521
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
5524
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
5528
+
if len(t.CreatedAt) > 1000000 {
5529
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
5532
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
5535
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
5539
+
// t.TargetRepo (string) (string)
5540
+
if len("targetRepo") > 1000000 {
5541
+
return xerrors.Errorf("Value in field \"targetRepo\" was too long")
5544
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetRepo"))); err != nil {
5547
+
if _, err := cw.WriteString(string("targetRepo")); err != nil {
5551
+
if len(t.TargetRepo) > 1000000 {
5552
+
return xerrors.Errorf("Value in field t.TargetRepo was too long")
5555
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetRepo))); err != nil {
5558
+
if _, err := cw.WriteString(string(t.TargetRepo)); err != nil {
5562
+
// t.TargetBranch (string) (string)
5563
+
if len("targetBranch") > 1000000 {
5564
+
return xerrors.Errorf("Value in field \"targetBranch\" was too long")
2612
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
5567
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetBranch"))); err != nil {
2615
-
if _, err := cw.WriteString(string("status")); err != nil {
5570
+
if _, err := cw.WriteString(string("targetBranch")); err != nil {
2619
-
if len(t.Status) > 1000000 {
2620
-
return xerrors.Errorf("Value in field t.Status was too long")
5574
+
if len(t.TargetBranch) > 1000000 {
5575
+
return xerrors.Errorf("Value in field t.TargetBranch was too long")
2623
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
5578
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetBranch))); err != nil {
2626
-
if _, err := cw.WriteString(string(t.Status)); err != nil {
5581
+
if _, err := cw.WriteString(string(t.TargetBranch)); err != nil {
2632
-
func (t *RepoPullStatus) UnmarshalCBOR(r io.Reader) (err error) {
2633
-
*t = RepoPullStatus{}
5587
+
func (t *RepoPull) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2652
-
return fmt.Errorf("RepoPullStatus: map struct too large (%d)", extra)
5607
+
return fmt.Errorf("RepoPull: map struct too large (%d)", extra)
2657
-
nameBuf := make([]byte, 6)
5612
+
nameBuf := make([]byte, 12)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
2673
-
// t.Pull (string) (string)
5628
+
// t.Body (string) (string)
2677
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5632
+
b, err := cr.ReadByte()
5636
+
if b != cbg.CborNull[0] {
5637
+
if err := cr.UnreadByte(); err != nil {
2682
-
t.Pull = string(sval)
5641
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5646
+
t.Body = (*string)(&sval)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
2695
-
// t.Status (string) (string)
5660
+
// t.Patch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
2704
-
t.Status = string(sval)
5669
+
t.Patch = string(sval)
5671
+
// t.Title (string) (string)
5675
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5680
+
t.Title = string(sval)
5682
+
// t.PullId (int64) (int64)
5685
+
maj, extra, err := cr.ReadHeader()
5691
+
case cbg.MajUnsignedInt:
5692
+
extraI = int64(extra)
5694
+
return fmt.Errorf("int64 positive overflow")
5696
+
case cbg.MajNegativeInt:
5697
+
extraI = int64(extra)
5699
+
return fmt.Errorf("int64 negative overflow")
5701
+
extraI = -1 - extraI
5703
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
5706
+
t.PullId = int64(extraI)
5708
+
// t.Source (tangled.RepoPull_Source) (struct)
5713
+
b, err := cr.ReadByte()
5717
+
if b != cbg.CborNull[0] {
5718
+
if err := cr.UnreadByte(); err != nil {
5721
+
t.Source = new(RepoPull_Source)
5722
+
if err := t.Source.UnmarshalCBOR(cr); err != nil {
5723
+
return xerrors.Errorf("unmarshaling t.Source pointer: %w", err)
5728
+
// t.CreatedAt (string) (string)
5732
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5737
+
t.CreatedAt = string(sval)
5739
+
// t.TargetRepo (string) (string)
5740
+
case "targetRepo":
5743
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5748
+
t.TargetRepo = string(sval)
5750
+
// t.TargetBranch (string) (string)
5751
+
case "targetBranch":
5754
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5759
+
t.TargetBranch = string(sval)
···
3102
-
func (t *RepoArtifact) MarshalCBOR(w io.Writer) error {
6157
+
func (t *RepoPull_Source) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
6166
+
if t.Repo == nil {
···
3119
-
// t.Tag (util.LexBytes) (slice)
6174
+
// t.Repo (string) (string)
6175
+
if t.Repo != nil {
3122
-
if len("tag") > 1000000 {
3123
-
return xerrors.Errorf("Value in field \"tag\" was too long")
6177
+
if len("repo") > 1000000 {
6178
+
return xerrors.Errorf("Value in field \"repo\" was too long")
3126
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("tag"))); err != nil {
6181
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
3129
-
if _, err := cw.WriteString(string("tag")); err != nil {
6184
+
if _, err := cw.WriteString(string("repo")); err != nil {
3133
-
if len(t.Tag) > 2097152 {
3134
-
return xerrors.Errorf("Byte array in field t.Tag was too long")
3137
-
if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Tag))); err != nil {
6188
+
if t.Repo == nil {
6189
+
if _, err := cw.Write(cbg.CborNull); err != nil {
6193
+
if len(*t.Repo) > 1000000 {
6194
+
return xerrors.Errorf("Value in field t.Repo was too long")
3141
-
if _, err := cw.Write(t.Tag); err != nil {
6197
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Repo))); err != nil {
6200
+
if _, err := cw.WriteString(string(*t.Repo)); err != nil {
3147
-
// t.Name (string) (string)
3148
-
if len("name") > 1000000 {
3149
-
return xerrors.Errorf("Value in field \"name\" was too long")
3152
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
3155
-
if _, err := cw.WriteString(string("name")); err != nil {
3159
-
if len(t.Name) > 1000000 {
3160
-
return xerrors.Errorf("Value in field t.Name was too long")
3163
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
3166
-
if _, err := cw.WriteString(string(t.Name)); err != nil {
3170
-
// t.Repo (string) (string)
3171
-
if len("repo") > 1000000 {
3172
-
return xerrors.Errorf("Value in field \"repo\" was too long")
6206
+
// t.Branch (string) (string)
6207
+
if len("branch") > 1000000 {
6208
+
return xerrors.Errorf("Value in field \"branch\" was too long")
3175
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
6211
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("branch"))); err != nil {
3178
-
if _, err := cw.WriteString(string("repo")); err != nil {
3182
-
if len(t.Repo) > 1000000 {
3183
-
return xerrors.Errorf("Value in field t.Repo was too long")
3186
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
3189
-
if _, err := cw.WriteString(string(t.Repo)); err != nil {
6214
+
if _, err := cw.WriteString(string("branch")); err != nil {
3193
-
// t.LexiconTypeID (string) (string)
3194
-
if len("$type") > 1000000 {
3195
-
return xerrors.Errorf("Value in field \"$type\" was too long")
6218
+
if len(t.Branch) > 1000000 {
6219
+
return xerrors.Errorf("Value in field t.Branch was too long")
3198
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
6222
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Branch))); err != nil {
3201
-
if _, err := cw.WriteString(string("$type")); err != nil {
3205
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.artifact"))); err != nil {
3208
-
if _, err := cw.WriteString(string("sh.tangled.repo.artifact")); err != nil {
3212
-
// t.Artifact (util.LexBlob) (struct)
3213
-
if len("artifact") > 1000000 {
3214
-
return xerrors.Errorf("Value in field \"artifact\" was too long")
3217
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("artifact"))); err != nil {
3220
-
if _, err := cw.WriteString(string("artifact")); err != nil {
3224
-
if err := t.Artifact.MarshalCBOR(cw); err != nil {
3228
-
// t.CreatedAt (string) (string)
3229
-
if len("createdAt") > 1000000 {
3230
-
return xerrors.Errorf("Value in field \"createdAt\" was too long")
3233
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
3236
-
if _, err := cw.WriteString(string("createdAt")); err != nil {
3240
-
if len(t.CreatedAt) > 1000000 {
3241
-
return xerrors.Errorf("Value in field t.CreatedAt was too long")
3244
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
3247
-
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
6225
+
if _, err := cw.WriteString(string(t.Branch)); err != nil {
3253
-
func (t *RepoArtifact) UnmarshalCBOR(r io.Reader) (err error) {
3254
-
*t = RepoArtifact{}
6231
+
func (t *RepoPull_Source) UnmarshalCBOR(r io.Reader) (err error) {
6232
+
*t = RepoPull_Source{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
3273
-
return fmt.Errorf("RepoArtifact: map struct too large (%d)", extra)
6251
+
return fmt.Errorf("RepoPull_Source: map struct too large (%d)", extra)
3278
-
nameBuf := make([]byte, 9)
6256
+
nameBuf := make([]byte, 6)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
3294
-
// t.Tag (util.LexBytes) (slice)
3297
-
maj, extra, err = cr.ReadHeader()
3302
-
if extra > 2097152 {
3303
-
return fmt.Errorf("t.Tag: byte array too large (%d)", extra)
3305
-
if maj != cbg.MajByteString {
3306
-
return fmt.Errorf("expected byte array")
3310
-
t.Tag = make([]uint8, extra)
3313
-
if _, err := io.ReadFull(cr, t.Tag); err != nil {
3317
-
// t.Name (string) (string)
3321
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3326
-
t.Name = string(sval)
3328
-
// t.Repo (string) (string)
6272
+
// t.Repo (string) (string)
3332
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3337
-
t.Repo = string(sval)
3339
-
// t.LexiconTypeID (string) (string)
3343
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3348
-
t.LexiconTypeID = string(sval)
3350
-
// t.Artifact (util.LexBlob) (struct)
···
if err := cr.UnreadByte(); err != nil {
3363
-
t.Artifact = new(util.LexBlob)
3364
-
if err := t.Artifact.UnmarshalCBOR(cr); err != nil {
3365
-
return xerrors.Errorf("unmarshaling t.Artifact pointer: %w", err)
6285
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6290
+
t.Repo = (*string)(&sval)
3370
-
// t.CreatedAt (string) (string)
6293
+
// t.Branch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
3379
-
t.CreatedAt = string(sval)
6302
+
t.Branch = string(sval)
···
3392
-
func (t *ActorProfile) MarshalCBOR(w io.Writer) error {
6315
+
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
3401
-
if t.Description == nil {
6323
+
if _, err := cw.Write([]byte{163}); err != nil {
3405
-
if t.Links == nil {
6327
+
// t.Pull (string) (string)
6328
+
if len("pull") > 1000000 {
6329
+
return xerrors.Errorf("Value in field \"pull\" was too long")
3409
-
if t.Location == nil {
6332
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
6335
+
if _, err := cw.WriteString(string("pull")); err != nil {
3413
-
if t.PinnedRepositories == nil {
6339
+
if len(t.Pull) > 1000000 {
6340
+
return xerrors.Errorf("Value in field t.Pull was too long")
3417
-
if t.Stats == nil {
6343
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
3421
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
6346
+
if _, err := cw.WriteString(string(t.Pull)); err != nil {
···
3437
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.actor.profile"))); err != nil {
6362
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.status"))); err != nil {
3440
-
if _, err := cw.WriteString(string("sh.tangled.actor.profile")); err != nil {
6365
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull.status")); err != nil {
3444
-
// t.Links ([]string) (slice)
3445
-
if t.Links != nil {
3447
-
if len("links") > 1000000 {
3448
-
return xerrors.Errorf("Value in field \"links\" was too long")
3451
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("links"))); err != nil {
3454
-
if _, err := cw.WriteString(string("links")); err != nil {
3458
-
if len(t.Links) > 8192 {
3459
-
return xerrors.Errorf("Slice value in field t.Links was too long")
3462
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Links))); err != nil {
3465
-
for _, v := range t.Links {
3466
-
if len(v) > 1000000 {
3467
-
return xerrors.Errorf("Value in field v was too long")
3470
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
3473
-
if _, err := cw.WriteString(string(v)); err != nil {
3480
-
// t.Stats ([]string) (slice)
3481
-
if t.Stats != nil {
3483
-
if len("stats") > 1000000 {
3484
-
return xerrors.Errorf("Value in field \"stats\" was too long")
3487
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("stats"))); err != nil {
3490
-
if _, err := cw.WriteString(string("stats")); err != nil {
3494
-
if len(t.Stats) > 8192 {
3495
-
return xerrors.Errorf("Slice value in field t.Stats was too long")
3498
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Stats))); err != nil {
3501
-
for _, v := range t.Stats {
3502
-
if len(v) > 1000000 {
3503
-
return xerrors.Errorf("Value in field v was too long")
3506
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
3509
-
if _, err := cw.WriteString(string(v)); err != nil {
3516
-
// t.Bluesky (bool) (bool)
3517
-
if len("bluesky") > 1000000 {
3518
-
return xerrors.Errorf("Value in field \"bluesky\" was too long")
6369
+
// t.Status (string) (string)
6370
+
if len("status") > 1000000 {
6371
+
return xerrors.Errorf("Value in field \"status\" was too long")
3521
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("bluesky"))); err != nil {
6374
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
3524
-
if _, err := cw.WriteString(string("bluesky")); err != nil {
6377
+
if _, err := cw.WriteString(string("status")); err != nil {
3528
-
if err := cbg.WriteBool(w, t.Bluesky); err != nil {
6381
+
if len(t.Status) > 1000000 {
6382
+
return xerrors.Errorf("Value in field t.Status was too long")
3532
-
// t.Location (string) (string)
3533
-
if t.Location != nil {
3535
-
if len("location") > 1000000 {
3536
-
return xerrors.Errorf("Value in field \"location\" was too long")
3539
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("location"))); err != nil {
3542
-
if _, err := cw.WriteString(string("location")); err != nil {
3546
-
if t.Location == nil {
3547
-
if _, err := cw.Write(cbg.CborNull); err != nil {
3551
-
if len(*t.Location) > 1000000 {
3552
-
return xerrors.Errorf("Value in field t.Location was too long")
3555
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Location))); err != nil {
3558
-
if _, err := cw.WriteString(string(*t.Location)); err != nil {
6385
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
3564
-
// t.Description (string) (string)
3565
-
if t.Description != nil {
3567
-
if len("description") > 1000000 {
3568
-
return xerrors.Errorf("Value in field \"description\" was too long")
3571
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("description"))); err != nil {
3574
-
if _, err := cw.WriteString(string("description")); err != nil {
3578
-
if t.Description == nil {
3579
-
if _, err := cw.Write(cbg.CborNull); err != nil {
3583
-
if len(*t.Description) > 1000000 {
3584
-
return xerrors.Errorf("Value in field t.Description was too long")
3587
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Description))); err != nil {
3590
-
if _, err := cw.WriteString(string(*t.Description)); err != nil {
3596
-
// t.PinnedRepositories ([]string) (slice)
3597
-
if t.PinnedRepositories != nil {
3599
-
if len("pinnedRepositories") > 1000000 {
3600
-
return xerrors.Errorf("Value in field \"pinnedRepositories\" was too long")
3603
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pinnedRepositories"))); err != nil {
3606
-
if _, err := cw.WriteString(string("pinnedRepositories")); err != nil {
3610
-
if len(t.PinnedRepositories) > 8192 {
3611
-
return xerrors.Errorf("Slice value in field t.PinnedRepositories was too long")
3614
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.PinnedRepositories))); err != nil {
3617
-
for _, v := range t.PinnedRepositories {
3618
-
if len(v) > 1000000 {
3619
-
return xerrors.Errorf("Value in field v was too long")
3622
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
3625
-
if _, err := cw.WriteString(string(v)); err != nil {
6388
+
if _, err := cw.WriteString(string(t.Status)); err != nil {
3634
-
func (t *ActorProfile) UnmarshalCBOR(r io.Reader) (err error) {
3635
-
*t = ActorProfile{}
6394
+
func (t *RepoPullStatus) UnmarshalCBOR(r io.Reader) (err error) {
6395
+
*t = RepoPullStatus{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
3654
-
return fmt.Errorf("ActorProfile: map struct too large (%d)", extra)
6414
+
return fmt.Errorf("RepoPullStatus: map struct too large (%d)", extra)
3659
-
nameBuf := make([]byte, 18)
6419
+
nameBuf := make([]byte, 6)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
3675
-
// t.LexiconTypeID (string) (string)
6435
+
// t.Pull (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
3684
-
t.LexiconTypeID = string(sval)
3686
-
// t.Links ([]string) (slice)
3689
-
maj, extra, err = cr.ReadHeader()
3695
-
return fmt.Errorf("t.Links: array too large (%d)", extra)
3698
-
if maj != cbg.MajArray {
3699
-
return fmt.Errorf("expected cbor array")
3703
-
t.Links = make([]string, extra)
3706
-
for i := 0; i < int(extra); i++ {
3716
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3721
-
t.Links[i] = string(sval)
3726
-
// t.Stats ([]string) (slice)
3729
-
maj, extra, err = cr.ReadHeader()
3735
-
return fmt.Errorf("t.Stats: array too large (%d)", extra)
3738
-
if maj != cbg.MajArray {
3739
-
return fmt.Errorf("expected cbor array")
3743
-
t.Stats = make([]string, extra)
3746
-
for i := 0; i < int(extra); i++ {
3756
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3761
-
t.Stats[i] = string(sval)
6444
+
t.Pull = string(sval)
3766
-
// t.Bluesky (bool) (bool)
3769
-
maj, extra, err = cr.ReadHeader()
3773
-
if maj != cbg.MajOther {
3774
-
return fmt.Errorf("booleans must be major type 7")
3782
-
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
3784
-
// t.Location (string) (string)
6446
+
// t.LexiconTypeID (string) (string)
3788
-
b, err := cr.ReadByte()
6450
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3792
-
if b != cbg.CborNull[0] {
3793
-
if err := cr.UnreadByte(); err != nil {
3797
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3802
-
t.Location = (*string)(&sval)
6455
+
t.LexiconTypeID = string(sval)
3805
-
// t.Description (string) (string)
3806
-
case "description":
6457
+
// t.Status (string) (string)
3809
-
b, err := cr.ReadByte()
6461
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3813
-
if b != cbg.CborNull[0] {
3814
-
if err := cr.UnreadByte(); err != nil {
3818
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3823
-
t.Description = (*string)(&sval)
3826
-
// t.PinnedRepositories ([]string) (slice)
3827
-
case "pinnedRepositories":
3829
-
maj, extra, err = cr.ReadHeader()
3835
-
return fmt.Errorf("t.PinnedRepositories: array too large (%d)", extra)
3838
-
if maj != cbg.MajArray {
3839
-
return fmt.Errorf("expected cbor array")
3843
-
t.PinnedRepositories = make([]string, extra)
3846
-
for i := 0; i < int(extra); i++ {
3856
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3861
-
t.PinnedRepositories[i] = string(sval)
6466
+
t.Status = string(sval)