···
671
-
func (t *GitRefUpdate) MarshalCBOR(w io.Writer) error {
671
+
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
679
-
if _, err := cw.Write([]byte{168}); err != nil {
679
+
if _, err := cw.Write([]byte{162}); err != nil {
683
-
// t.Ref (string) (string)
684
-
if len("ref") > 1000000 {
685
-
return xerrors.Errorf("Value in field \"ref\" was too long")
683
+
// t.Count (int64) (int64)
684
+
if len("count") > 1000000 {
685
+
return xerrors.Errorf("Value in field \"count\" was too long")
688
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
688
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("count"))); err != nil {
691
-
if _, err := cw.WriteString(string("ref")); err != nil {
691
+
if _, err := cw.WriteString(string("count")); err != nil {
695
-
if len(t.Ref) > 1000000 {
696
-
return xerrors.Errorf("Value in field t.Ref was too long")
696
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Count)); err != nil {
700
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Count-1)); err != nil {
699
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
705
+
// t.Email (string) (string)
706
+
if len("email") > 1000000 {
707
+
return xerrors.Errorf("Value in field \"email\" was too long")
710
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("email"))); err != nil {
702
-
if _, err := cw.WriteString(string(t.Ref)); err != nil {
713
+
if _, err := cw.WriteString(string("email")); err != nil {
706
-
// t.Meta (tangled.GitRefUpdate_Meta) (struct)
707
-
if len("meta") > 1000000 {
708
-
return xerrors.Errorf("Value in field \"meta\" was too long")
717
+
if len(t.Email) > 1000000 {
718
+
return xerrors.Errorf("Value in field t.Email was too long")
711
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("meta"))); err != nil {
721
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Email))); err != nil {
714
-
if _, err := cw.WriteString(string("meta")); err != nil {
724
+
if _, err := cw.WriteString(string(t.Email)); err != nil {
718
-
if err := t.Meta.MarshalCBOR(cw); err != nil {
730
+
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) UnmarshalCBOR(r io.Reader) (err error) {
731
+
*t = GitRefUpdate_Meta_CommitCount_ByEmail_Elem{}
722
-
// t.LexiconTypeID (string) (string)
723
-
if len("$type") > 1000000 {
724
-
return xerrors.Errorf("Value in field \"$type\" was too long")
733
+
cr := cbg.NewCborReader(r)
727
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
730
-
if _, err := cw.WriteString(string("$type")); err != nil {
735
+
maj, extra, err := cr.ReadHeader()
741
+
err = io.ErrUnexpectedEOF
734
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.git.refUpdate"))); err != nil {
737
-
if _, err := cw.WriteString(string("sh.tangled.git.refUpdate")); err != nil {
745
+
if maj != cbg.MajMap {
746
+
return fmt.Errorf("cbor input should be of type map")
741
-
// t.NewSha (string) (string)
742
-
if len("newSha") > 1000000 {
743
-
return xerrors.Errorf("Value in field \"newSha\" was too long")
749
+
if extra > cbg.MaxLength {
750
+
return fmt.Errorf("GitRefUpdate_Meta_CommitCount_ByEmail_Elem: map struct too large (%d)", extra)
746
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
749
-
if _, err := cw.WriteString(string("newSha")); err != nil {
753
-
if len(t.NewSha) > 1000000 {
754
-
return xerrors.Errorf("Value in field t.NewSha was too long")
755
+
nameBuf := make([]byte, 5)
756
+
for i := uint64(0); i < n; i++ {
757
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
757
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
760
-
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
763
+
// Field doesn't exist on this type, so ignore it
764
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
764
-
// t.OldSha (string) (string)
765
-
if len("oldSha") > 1000000 {
766
-
return xerrors.Errorf("Value in field \"oldSha\" was too long")
770
+
switch string(nameBuf[:nameLen]) {
771
+
// t.Count (int64) (int64)
774
+
maj, extra, err := cr.ReadHeader()
780
+
case cbg.MajUnsignedInt:
781
+
extraI = int64(extra)
783
+
return fmt.Errorf("int64 positive overflow")
785
+
case cbg.MajNegativeInt:
786
+
extraI = int64(extra)
788
+
return fmt.Errorf("int64 negative overflow")
790
+
extraI = -1 - extraI
792
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
769
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
772
-
if _, err := cw.WriteString(string("oldSha")); err != nil {
795
+
t.Count = int64(extraI)
797
+
// t.Email (string) (string)
776
-
if len(t.OldSha) > 1000000 {
777
-
return xerrors.Errorf("Value in field t.OldSha was too long")
801
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
780
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
783
-
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
806
+
t.Email = string(sval)
787
-
// t.RepoDid (string) (string)
788
-
if len("repoDid") > 1000000 {
789
-
return xerrors.Errorf("Value in field \"repoDid\" was too long")
810
+
// Field doesn't exist on this type, so ignore it
811
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
792
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoDid"))); err != nil {
795
-
if _, err := cw.WriteString(string("repoDid")); err != nil {
819
+
func (t *GitRefUpdate_Meta_CommitCount) MarshalCBOR(w io.Writer) error {
821
+
_, err := w.Write(cbg.CborNull)
799
-
if len(t.RepoDid) > 1000000 {
800
-
return xerrors.Errorf("Value in field t.RepoDid was too long")
825
+
cw := cbg.NewCborWriter(w)
803
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoDid))); err != nil {
806
-
if _, err := cw.WriteString(string(t.RepoDid)); err != nil {
828
+
if t.ByEmail == nil {
810
-
// t.RepoName (string) (string)
811
-
if len("repoName") > 1000000 {
812
-
return xerrors.Errorf("Value in field \"repoName\" was too long")
815
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoName"))); err != nil {
818
-
if _, err := cw.WriteString(string("repoName")); err != nil {
832
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
822
-
if len(t.RepoName) > 1000000 {
823
-
return xerrors.Errorf("Value in field t.RepoName was too long")
836
+
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
837
+
if t.ByEmail != nil {
826
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoName))); err != nil {
829
-
if _, err := cw.WriteString(string(t.RepoName)); err != nil {
839
+
if len("byEmail") > 1000000 {
840
+
return xerrors.Errorf("Value in field \"byEmail\" was too long")
833
-
// t.CommitterDid (string) (string)
834
-
if len("committerDid") > 1000000 {
835
-
return xerrors.Errorf("Value in field \"committerDid\" was too long")
843
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("byEmail"))); err != nil {
846
+
if _, err := cw.WriteString(string("byEmail")); err != nil {
838
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("committerDid"))); err != nil {
841
-
if _, err := cw.WriteString(string("committerDid")); err != nil {
850
+
if len(t.ByEmail) > 8192 {
851
+
return xerrors.Errorf("Slice value in field t.ByEmail was too long")
845
-
if len(t.CommitterDid) > 1000000 {
846
-
return xerrors.Errorf("Value in field t.CommitterDid was too long")
854
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.ByEmail))); err != nil {
857
+
for _, v := range t.ByEmail {
858
+
if err := v.MarshalCBOR(cw); err != nil {
849
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CommitterDid))); err != nil {
852
-
if _, err := cw.WriteString(string(t.CommitterDid)); err != nil {
858
-
func (t *GitRefUpdate) UnmarshalCBOR(r io.Reader) (err error) {
859
-
*t = GitRefUpdate{}
867
+
func (t *GitRefUpdate_Meta_CommitCount) UnmarshalCBOR(r io.Reader) (err error) {
868
+
*t = GitRefUpdate_Meta_CommitCount{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
878
-
return fmt.Errorf("GitRefUpdate: map struct too large (%d)", extra)
887
+
return fmt.Errorf("GitRefUpdate_Meta_CommitCount: map struct too large (%d)", extra)
883
-
nameBuf := make([]byte, 12)
892
+
nameBuf := make([]byte, 7)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
899
-
// t.Ref (string) (string)
903
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
908
+
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
908
-
t.Ref = string(sval)
911
+
maj, extra, err = cr.ReadHeader()
910
-
// t.Meta (tangled.GitRefUpdate_Meta) (struct)
915
-
b, err := cr.ReadByte()
919
-
if b != cbg.CborNull[0] {
920
-
if err := cr.UnreadByte(); err != nil {
923
-
t.Meta = new(GitRefUpdate_Meta)
924
-
if err := t.Meta.UnmarshalCBOR(cr); err != nil {
925
-
return xerrors.Errorf("unmarshaling t.Meta pointer: %w", err)
917
+
return fmt.Errorf("t.ByEmail: array too large (%d)", extra)
930
-
// t.LexiconTypeID (string) (string)
934
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
939
-
t.LexiconTypeID = string(sval)
920
+
if maj != cbg.MajArray {
921
+
return fmt.Errorf("expected cbor array")
941
-
// t.NewSha (string) (string)
945
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
950
-
t.NewSha = string(sval)
925
+
t.ByEmail = make([]*GitRefUpdate_Meta_CommitCount_ByEmail_Elem, extra)
952
-
// t.OldSha (string) (string)
956
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
928
+
for i := 0; i < int(extra); i++ {
961
-
t.OldSha = string(sval)
963
-
// t.RepoDid (string) (string)
967
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
972
-
t.RepoDid = string(sval)
974
-
// t.RepoName (string) (string)
978
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
939
+
b, err := cr.ReadByte()
943
+
if b != cbg.CborNull[0] {
944
+
if err := cr.UnreadByte(); err != nil {
947
+
t.ByEmail[i] = new(GitRefUpdate_Meta_CommitCount_ByEmail_Elem)
948
+
if err := t.ByEmail[i].UnmarshalCBOR(cr); err != nil {
949
+
return xerrors.Errorf("unmarshaling t.ByEmail[i] pointer: %w", err)
983
-
t.RepoName = string(sval)
985
-
// t.CommitterDid (string) (string)
986
-
case "committerDid":
989
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
994
-
t.CommitterDid = string(sval)
···
1143
-
func (t *GitRefUpdate_Meta_CommitCount) MarshalCBOR(w io.Writer) error {
1104
+
func (t *GitRefUpdate) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
1152
-
if t.ByEmail == nil {
1112
+
if _, err := cw.Write([]byte{168}); err != nil {
1116
+
// t.Ref (string) (string)
1117
+
if len("ref") > 1000000 {
1118
+
return xerrors.Errorf("Value in field \"ref\" was too long")
1156
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
1121
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
1124
+
if _, err := cw.WriteString(string("ref")); err != nil {
1160
-
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
1161
-
if t.ByEmail != nil {
1128
+
if len(t.Ref) > 1000000 {
1129
+
return xerrors.Errorf("Value in field t.Ref was too long")
1163
-
if len("byEmail") > 1000000 {
1164
-
return xerrors.Errorf("Value in field \"byEmail\" was too long")
1132
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
1135
+
if _, err := cw.WriteString(string(t.Ref)); err != nil {
1167
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("byEmail"))); err != nil {
1170
-
if _, err := cw.WriteString(string("byEmail")); err != nil {
1174
-
if len(t.ByEmail) > 8192 {
1175
-
return xerrors.Errorf("Slice value in field t.ByEmail was too long")
1139
+
// t.Meta (tangled.GitRefUpdate_Meta) (struct)
1140
+
if len("meta") > 1000000 {
1141
+
return xerrors.Errorf("Value in field \"meta\" was too long")
1178
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.ByEmail))); err != nil {
1181
-
for _, v := range t.ByEmail {
1182
-
if err := v.MarshalCBOR(cw); err != nil {
1144
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("meta"))); err != nil {
1147
+
if _, err := cw.WriteString(string("meta")); err != nil {
1151
+
if err := t.Meta.MarshalCBOR(cw); err != nil {
1191
-
func (t *GitRefUpdate_Meta_CommitCount) UnmarshalCBOR(r io.Reader) (err error) {
1192
-
*t = GitRefUpdate_Meta_CommitCount{}
1155
+
// t.LexiconTypeID (string) (string)
1156
+
if len("$type") > 1000000 {
1157
+
return xerrors.Errorf("Value in field \"$type\" was too long")
1194
-
cr := cbg.NewCborReader(r)
1160
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
1163
+
if _, err := cw.WriteString(string("$type")); err != nil {
1196
-
maj, extra, err := cr.ReadHeader()
1167
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.git.refUpdate"))); err != nil {
1170
+
if _, err := cw.WriteString(string("sh.tangled.git.refUpdate")); err != nil {
1201
-
if err == io.EOF {
1202
-
err = io.ErrUnexpectedEOF
1206
-
if maj != cbg.MajMap {
1207
-
return fmt.Errorf("cbor input should be of type map")
1174
+
// t.NewSha (string) (string)
1175
+
if len("newSha") > 1000000 {
1176
+
return xerrors.Errorf("Value in field \"newSha\" was too long")
1210
-
if extra > cbg.MaxLength {
1211
-
return fmt.Errorf("GitRefUpdate_Meta_CommitCount: map struct too large (%d)", extra)
1179
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
1182
+
if _, err := cw.WriteString(string("newSha")); err != nil {
1186
+
if len(t.NewSha) > 1000000 {
1187
+
return xerrors.Errorf("Value in field t.NewSha was too long")
1216
-
nameBuf := make([]byte, 7)
1217
-
for i := uint64(0); i < n; i++ {
1218
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1190
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
1193
+
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
1224
-
// Field doesn't exist on this type, so ignore it
1225
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1197
+
// t.OldSha (string) (string)
1198
+
if len("oldSha") > 1000000 {
1199
+
return xerrors.Errorf("Value in field \"oldSha\" was too long")
1231
-
switch string(nameBuf[:nameLen]) {
1232
-
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
1202
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
1205
+
if _, err := cw.WriteString(string("oldSha")); err != nil {
1235
-
maj, extra, err = cr.ReadHeader()
1209
+
if len(t.OldSha) > 1000000 {
1210
+
return xerrors.Errorf("Value in field t.OldSha was too long")
1241
-
return fmt.Errorf("t.ByEmail: array too large (%d)", extra)
1213
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
1216
+
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
1244
-
if maj != cbg.MajArray {
1245
-
return fmt.Errorf("expected cbor array")
1220
+
// t.RepoDid (string) (string)
1221
+
if len("repoDid") > 1000000 {
1222
+
return xerrors.Errorf("Value in field \"repoDid\" was too long")
1249
-
t.ByEmail = make([]*GitRefUpdate_Meta_CommitCount_ByEmail_Elem, extra)
1225
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoDid"))); err != nil {
1228
+
if _, err := cw.WriteString(string("repoDid")); err != nil {
1252
-
for i := 0; i < int(extra); i++ {
1232
+
if len(t.RepoDid) > 1000000 {
1233
+
return xerrors.Errorf("Value in field t.RepoDid was too long")
1236
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoDid))); err != nil {
1239
+
if _, err := cw.WriteString(string(t.RepoDid)); err != nil {
1263
-
b, err := cr.ReadByte()
1267
-
if b != cbg.CborNull[0] {
1268
-
if err := cr.UnreadByte(); err != nil {
1271
-
t.ByEmail[i] = new(GitRefUpdate_Meta_CommitCount_ByEmail_Elem)
1272
-
if err := t.ByEmail[i].UnmarshalCBOR(cr); err != nil {
1273
-
return xerrors.Errorf("unmarshaling t.ByEmail[i] pointer: %w", err)
1283
-
// Field doesn't exist on this type, so ignore it
1284
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
1243
+
// t.RepoName (string) (string)
1244
+
if len("repoName") > 1000000 {
1245
+
return xerrors.Errorf("Value in field \"repoName\" was too long")
1292
-
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) MarshalCBOR(w io.Writer) error {
1294
-
_, err := w.Write(cbg.CborNull)
1248
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoName"))); err != nil {
1298
-
cw := cbg.NewCborWriter(w)
1300
-
if _, err := cw.Write([]byte{162}); err != nil {
1251
+
if _, err := cw.WriteString(string("repoName")); err != nil {
1304
-
// t.Count (int64) (int64)
1305
-
if len("count") > 1000000 {
1306
-
return xerrors.Errorf("Value in field \"count\" was too long")
1255
+
if len(t.RepoName) > 1000000 {
1256
+
return xerrors.Errorf("Value in field t.RepoName was too long")
1309
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("count"))); err != nil {
1259
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoName))); err != nil {
1312
-
if _, err := cw.WriteString(string("count")); err != nil {
1262
+
if _, err := cw.WriteString(string(t.RepoName)); err != nil {
1317
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Count)); err != nil {
1321
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Count-1)); err != nil {
1266
+
// t.CommitterDid (string) (string)
1267
+
if len("committerDid") > 1000000 {
1268
+
return xerrors.Errorf("Value in field \"committerDid\" was too long")
1326
-
// t.Email (string) (string)
1327
-
if len("email") > 1000000 {
1328
-
return xerrors.Errorf("Value in field \"email\" was too long")
1331
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("email"))); err != nil {
1271
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("committerDid"))); err != nil {
1334
-
if _, err := cw.WriteString(string("email")); err != nil {
1274
+
if _, err := cw.WriteString(string("committerDid")); err != nil {
1338
-
if len(t.Email) > 1000000 {
1339
-
return xerrors.Errorf("Value in field t.Email was too long")
1278
+
if len(t.CommitterDid) > 1000000 {
1279
+
return xerrors.Errorf("Value in field t.CommitterDid was too long")
1342
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Email))); err != nil {
1282
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CommitterDid))); err != nil {
1345
-
if _, err := cw.WriteString(string(t.Email)); err != nil {
1285
+
if _, err := cw.WriteString(string(t.CommitterDid)); err != nil {
1351
-
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) UnmarshalCBOR(r io.Reader) (err error) {
1352
-
*t = GitRefUpdate_Meta_CommitCount_ByEmail_Elem{}
1291
+
func (t *GitRefUpdate) UnmarshalCBOR(r io.Reader) (err error) {
1292
+
*t = GitRefUpdate{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1371
-
return fmt.Errorf("GitRefUpdate_Meta_CommitCount_ByEmail_Elem: map struct too large (%d)", extra)
1311
+
return fmt.Errorf("GitRefUpdate: map struct too large (%d)", extra)
1376
-
nameBuf := make([]byte, 5)
1316
+
nameBuf := make([]byte, 12)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
1392
-
// t.Count (int64) (int64)
1332
+
// t.Ref (string) (string)
1336
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1341
+
t.Ref = string(sval)
1343
+
// t.Meta (tangled.GitRefUpdate_Meta) (struct)
1395
-
maj, extra, err := cr.ReadHeader()
1348
+
b, err := cr.ReadByte()
1401
-
case cbg.MajUnsignedInt:
1402
-
extraI = int64(extra)
1404
-
return fmt.Errorf("int64 positive overflow")
1352
+
if b != cbg.CborNull[0] {
1353
+
if err := cr.UnreadByte(); err != nil {
1406
-
case cbg.MajNegativeInt:
1407
-
extraI = int64(extra)
1409
-
return fmt.Errorf("int64 negative overflow")
1356
+
t.Meta = new(GitRefUpdate_Meta)
1357
+
if err := t.Meta.UnmarshalCBOR(cr); err != nil {
1358
+
return xerrors.Errorf("unmarshaling t.Meta pointer: %w", err)
1411
-
extraI = -1 - extraI
1413
-
return fmt.Errorf("wrong type for int64 field: %d", maj)
1363
+
// t.LexiconTypeID (string) (string)
1367
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1372
+
t.LexiconTypeID = string(sval)
1374
+
// t.NewSha (string) (string)
1378
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1416
-
t.Count = int64(extraI)
1383
+
t.NewSha = string(sval)
1418
-
// t.Email (string) (string)
1385
+
// t.OldSha (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1427
-
t.Email = string(sval)
1394
+
t.OldSha = string(sval)
1396
+
// t.RepoDid (string) (string)
1400
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1405
+
t.RepoDid = string(sval)
1407
+
// t.RepoName (string) (string)
1411
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1416
+
t.RepoName = string(sval)
1418
+
// t.CommitterDid (string) (string)
1419
+
case "committerDid":
1422
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1427
+
t.CommitterDid = string(sval)
···
1802
-
func (t *Pipeline) MarshalCBOR(w io.Writer) error {
1804
-
_, err := w.Write(cbg.CborNull)
1808
-
cw := cbg.NewCborWriter(w)
1810
-
if _, err := cw.Write([]byte{163}); err != nil {
1814
-
// t.LexiconTypeID (string) (string)
1815
-
if len("$type") > 1000000 {
1816
-
return xerrors.Errorf("Value in field \"$type\" was too long")
1819
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
1822
-
if _, err := cw.WriteString(string("$type")); err != nil {
1826
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline"))); err != nil {
1829
-
if _, err := cw.WriteString(string("sh.tangled.pipeline")); err != nil {
1833
-
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
1834
-
if len("workflows") > 1000000 {
1835
-
return xerrors.Errorf("Value in field \"workflows\" was too long")
1838
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflows"))); err != nil {
1841
-
if _, err := cw.WriteString(string("workflows")); err != nil {
1845
-
if len(t.Workflows) > 8192 {
1846
-
return xerrors.Errorf("Slice value in field t.Workflows was too long")
1849
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Workflows))); err != nil {
1852
-
for _, v := range t.Workflows {
1853
-
if err := v.MarshalCBOR(cw); err != nil {
1859
-
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
1860
-
if len("triggerMetadata") > 1000000 {
1861
-
return xerrors.Errorf("Value in field \"triggerMetadata\" was too long")
1864
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("triggerMetadata"))); err != nil {
1867
-
if _, err := cw.WriteString(string("triggerMetadata")); err != nil {
1871
-
if err := t.TriggerMetadata.MarshalCBOR(cw); err != nil {
1877
-
func (t *Pipeline) UnmarshalCBOR(r io.Reader) (err error) {
1880
-
cr := cbg.NewCborReader(r)
1882
-
maj, extra, err := cr.ReadHeader()
1887
-
if err == io.EOF {
1888
-
err = io.ErrUnexpectedEOF
1892
-
if maj != cbg.MajMap {
1893
-
return fmt.Errorf("cbor input should be of type map")
1896
-
if extra > cbg.MaxLength {
1897
-
return fmt.Errorf("Pipeline: map struct too large (%d)", extra)
1902
-
nameBuf := make([]byte, 15)
1903
-
for i := uint64(0); i < n; i++ {
1904
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1910
-
// Field doesn't exist on this type, so ignore it
1911
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1917
-
switch string(nameBuf[:nameLen]) {
1918
-
// t.LexiconTypeID (string) (string)
1922
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1927
-
t.LexiconTypeID = string(sval)
1929
-
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
1932
-
maj, extra, err = cr.ReadHeader()
1938
-
return fmt.Errorf("t.Workflows: array too large (%d)", extra)
1941
-
if maj != cbg.MajArray {
1942
-
return fmt.Errorf("expected cbor array")
1946
-
t.Workflows = make([]*Pipeline_Workflow, extra)
1949
-
for i := 0; i < int(extra); i++ {
1960
-
b, err := cr.ReadByte()
1964
-
if b != cbg.CborNull[0] {
1965
-
if err := cr.UnreadByte(); err != nil {
1968
-
t.Workflows[i] = new(Pipeline_Workflow)
1969
-
if err := t.Workflows[i].UnmarshalCBOR(cr); err != nil {
1970
-
return xerrors.Errorf("unmarshaling t.Workflows[i] pointer: %w", err)
1978
-
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
1979
-
case "triggerMetadata":
1983
-
b, err := cr.ReadByte()
1987
-
if b != cbg.CborNull[0] {
1988
-
if err := cr.UnreadByte(); err != nil {
1991
-
t.TriggerMetadata = new(Pipeline_TriggerMetadata)
1992
-
if err := t.TriggerMetadata.UnmarshalCBOR(cr); err != nil {
1993
-
return xerrors.Errorf("unmarshaling t.TriggerMetadata pointer: %w", err)
2000
-
// Field doesn't exist on this type, so ignore it
2001
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *Pipeline_CloneOpts) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
2364
-
func (t *Pipeline_ManualTriggerData) MarshalCBOR(w io.Writer) error {
2157
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
2373
-
if t.Inputs == nil {
2165
+
if _, err := cw.Write([]byte{162}); err != nil {
2377
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
2169
+
// t.Key (string) (string)
2170
+
if len("key") > 1000000 {
2171
+
return xerrors.Errorf("Value in field \"key\" was too long")
2174
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
2177
+
if _, err := cw.WriteString(string("key")); err != nil {
2381
-
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2382
-
if t.Inputs != nil {
2181
+
if len(t.Key) > 1000000 {
2182
+
return xerrors.Errorf("Value in field t.Key was too long")
2384
-
if len("inputs") > 1000000 {
2385
-
return xerrors.Errorf("Value in field \"inputs\" was too long")
2185
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
2188
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
2388
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("inputs"))); err != nil {
2391
-
if _, err := cw.WriteString(string("inputs")); err != nil {
2192
+
// t.Value (string) (string)
2193
+
if len("value") > 1000000 {
2194
+
return xerrors.Errorf("Value in field \"value\" was too long")
2395
-
if len(t.Inputs) > 8192 {
2396
-
return xerrors.Errorf("Slice value in field t.Inputs was too long")
2197
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
2200
+
if _, err := cw.WriteString(string("value")); err != nil {
2399
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Inputs))); err != nil {
2402
-
for _, v := range t.Inputs {
2403
-
if err := v.MarshalCBOR(cw); err != nil {
2204
+
if len(t.Value) > 1000000 {
2205
+
return xerrors.Errorf("Value in field t.Value was too long")
2208
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
2211
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
2412
-
func (t *Pipeline_ManualTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
2413
-
*t = Pipeline_ManualTriggerData{}
2217
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) UnmarshalCBOR(r io.Reader) (err error) {
2218
+
*t = Pipeline_ManualTriggerData_Inputs_Elem{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2432
-
return fmt.Errorf("Pipeline_ManualTriggerData: map struct too large (%d)", extra)
2237
+
return fmt.Errorf("Pipeline_ManualTriggerData_Inputs_Elem: map struct too large (%d)", extra)
2437
-
nameBuf := make([]byte, 6)
2242
+
nameBuf := make([]byte, 5)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
2453
-
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2258
+
// t.Key (string) (string)
2456
-
maj, extra, err = cr.ReadHeader()
2262
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2462
-
return fmt.Errorf("t.Inputs: array too large (%d)", extra)
2267
+
t.Key = string(sval)
2269
+
// t.Value (string) (string)
2465
-
if maj != cbg.MajArray {
2466
-
return fmt.Errorf("expected cbor array")
2273
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2470
-
t.Inputs = make([]*Pipeline_ManualTriggerData_Inputs_Elem, extra)
2473
-
for i := 0; i < int(extra); i++ {
2484
-
b, err := cr.ReadByte()
2488
-
if b != cbg.CborNull[0] {
2489
-
if err := cr.UnreadByte(); err != nil {
2492
-
t.Inputs[i] = new(Pipeline_ManualTriggerData_Inputs_Elem)
2493
-
if err := t.Inputs[i].UnmarshalCBOR(cr); err != nil {
2494
-
return xerrors.Errorf("unmarshaling t.Inputs[i] pointer: %w", err)
2278
+
t.Value = string(sval)
···
2513
-
func (t *Pipeline_ManualTriggerData_Inputs_Elem) MarshalCBOR(w io.Writer) error {
2291
+
func (t *Pipeline_ManualTriggerData) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
2521
-
if _, err := cw.Write([]byte{162}); err != nil {
2525
-
// t.Key (string) (string)
2526
-
if len("key") > 1000000 {
2527
-
return xerrors.Errorf("Value in field \"key\" was too long")
2300
+
if t.Inputs == nil {
2530
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
2533
-
if _, err := cw.WriteString(string("key")); err != nil {
2304
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
2537
-
if len(t.Key) > 1000000 {
2538
-
return xerrors.Errorf("Value in field t.Key was too long")
2308
+
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2309
+
if t.Inputs != nil {
2541
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
2544
-
if _, err := cw.WriteString(string(t.Key)); err != nil {
2311
+
if len("inputs") > 1000000 {
2312
+
return xerrors.Errorf("Value in field \"inputs\" was too long")
2548
-
// t.Value (string) (string)
2549
-
if len("value") > 1000000 {
2550
-
return xerrors.Errorf("Value in field \"value\" was too long")
2315
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("inputs"))); err != nil {
2318
+
if _, err := cw.WriteString(string("inputs")); err != nil {
2553
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
2556
-
if _, err := cw.WriteString(string("value")); err != nil {
2322
+
if len(t.Inputs) > 8192 {
2323
+
return xerrors.Errorf("Slice value in field t.Inputs was too long")
2560
-
if len(t.Value) > 1000000 {
2561
-
return xerrors.Errorf("Value in field t.Value was too long")
2326
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Inputs))); err != nil {
2329
+
for _, v := range t.Inputs {
2330
+
if err := v.MarshalCBOR(cw); err != nil {
2564
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
2567
-
if _, err := cw.WriteString(string(t.Value)); err != nil {
2573
-
func (t *Pipeline_ManualTriggerData_Inputs_Elem) UnmarshalCBOR(r io.Reader) (err error) {
2574
-
*t = Pipeline_ManualTriggerData_Inputs_Elem{}
2339
+
func (t *Pipeline_ManualTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
2340
+
*t = Pipeline_ManualTriggerData{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2593
-
return fmt.Errorf("Pipeline_ManualTriggerData_Inputs_Elem: map struct too large (%d)", extra)
2359
+
return fmt.Errorf("Pipeline_ManualTriggerData: map struct too large (%d)", extra)
2598
-
nameBuf := make([]byte, 5)
2364
+
nameBuf := make([]byte, 6)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
2614
-
// t.Key (string) (string)
2380
+
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2618
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2383
+
maj, extra, err = cr.ReadHeader()
2623
-
t.Key = string(sval)
2389
+
return fmt.Errorf("t.Inputs: array too large (%d)", extra)
2625
-
// t.Value (string) (string)
2629
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2392
+
if maj != cbg.MajArray {
2393
+
return fmt.Errorf("expected cbor array")
2634
-
t.Value = string(sval)
2397
+
t.Inputs = make([]*Pipeline_ManualTriggerData_Inputs_Elem, extra)
2400
+
for i := 0; i < int(extra); i++ {
2411
+
b, err := cr.ReadByte()
2415
+
if b != cbg.CborNull[0] {
2416
+
if err := cr.UnreadByte(); err != nil {
2419
+
t.Inputs[i] = new(Pipeline_ManualTriggerData_Inputs_Elem)
2420
+
if err := t.Inputs[i].UnmarshalCBOR(cr); err != nil {
2421
+
return xerrors.Errorf("unmarshaling t.Inputs[i] pointer: %w", err)
···
3412
+
func (t *Pipeline_Workflow_Environment_Elem) MarshalCBOR(w io.Writer) error {
3414
+
_, err := w.Write(cbg.CborNull)
3418
+
cw := cbg.NewCborWriter(w)
3420
+
if _, err := cw.Write([]byte{162}); err != nil {
3424
+
// t.Key (string) (string)
3425
+
if len("key") > 1000000 {
3426
+
return xerrors.Errorf("Value in field \"key\" was too long")
3429
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
3432
+
if _, err := cw.WriteString(string("key")); err != nil {
3436
+
if len(t.Key) > 1000000 {
3437
+
return xerrors.Errorf("Value in field t.Key was too long")
3440
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
3443
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
3447
+
// t.Value (string) (string)
3448
+
if len("value") > 1000000 {
3449
+
return xerrors.Errorf("Value in field \"value\" was too long")
3452
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
3455
+
if _, err := cw.WriteString(string("value")); err != nil {
3459
+
if len(t.Value) > 1000000 {
3460
+
return xerrors.Errorf("Value in field t.Value was too long")
3463
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
3466
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
3472
+
func (t *Pipeline_Workflow_Environment_Elem) UnmarshalCBOR(r io.Reader) (err error) {
3473
+
*t = Pipeline_Workflow_Environment_Elem{}
3475
+
cr := cbg.NewCborReader(r)
3477
+
maj, extra, err := cr.ReadHeader()
3482
+
if err == io.EOF {
3483
+
err = io.ErrUnexpectedEOF
3487
+
if maj != cbg.MajMap {
3488
+
return fmt.Errorf("cbor input should be of type map")
3491
+
if extra > cbg.MaxLength {
3492
+
return fmt.Errorf("Pipeline_Workflow_Environment_Elem: map struct too large (%d)", extra)
3497
+
nameBuf := make([]byte, 5)
3498
+
for i := uint64(0); i < n; i++ {
3499
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
3505
+
// Field doesn't exist on this type, so ignore it
3506
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
3512
+
switch string(nameBuf[:nameLen]) {
3513
+
// t.Key (string) (string)
3517
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3522
+
t.Key = string(sval)
3524
+
// t.Value (string) (string)
3528
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3533
+
t.Value = string(sval)
3537
+
// Field doesn't exist on this type, so ignore it
3538
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *Pipeline_Workflow) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
3970
-
func (t *Pipeline_Workflow_Environment_Elem) MarshalCBOR(w io.Writer) error {
3897
+
func (t *Pipeline) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
3978
-
if _, err := cw.Write([]byte{162}); err != nil {
3905
+
if _, err := cw.Write([]byte{163}); err != nil {
3982
-
// t.Key (string) (string)
3983
-
if len("key") > 1000000 {
3984
-
return xerrors.Errorf("Value in field \"key\" was too long")
3909
+
// t.LexiconTypeID (string) (string)
3910
+
if len("$type") > 1000000 {
3911
+
return xerrors.Errorf("Value in field \"$type\" was too long")
3987
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
3914
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
3990
-
if _, err := cw.WriteString(string("key")); err != nil {
3917
+
if _, err := cw.WriteString(string("$type")); err != nil {
3921
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline"))); err != nil {
3924
+
if _, err := cw.WriteString(string("sh.tangled.pipeline")); err != nil {
3994
-
if len(t.Key) > 1000000 {
3995
-
return xerrors.Errorf("Value in field t.Key was too long")
3928
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
3929
+
if len("workflows") > 1000000 {
3930
+
return xerrors.Errorf("Value in field \"workflows\" was too long")
3998
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
3933
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflows"))); err != nil {
4001
-
if _, err := cw.WriteString(string(t.Key)); err != nil {
3936
+
if _, err := cw.WriteString(string("workflows")); err != nil {
4005
-
// t.Value (string) (string)
4006
-
if len("value") > 1000000 {
4007
-
return xerrors.Errorf("Value in field \"value\" was too long")
3940
+
if len(t.Workflows) > 8192 {
3941
+
return xerrors.Errorf("Slice value in field t.Workflows was too long")
4010
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
3944
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Workflows))); err != nil {
4013
-
if _, err := cw.WriteString(string("value")); err != nil {
3947
+
for _, v := range t.Workflows {
3948
+
if err := v.MarshalCBOR(cw); err != nil {
4017
-
if len(t.Value) > 1000000 {
4018
-
return xerrors.Errorf("Value in field t.Value was too long")
3954
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
3955
+
if len("triggerMetadata") > 1000000 {
3956
+
return xerrors.Errorf("Value in field \"triggerMetadata\" was too long")
4021
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
3959
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("triggerMetadata"))); err != nil {
3962
+
if _, err := cw.WriteString(string("triggerMetadata")); err != nil {
4024
-
if _, err := cw.WriteString(string(t.Value)); err != nil {
3966
+
if err := t.TriggerMetadata.MarshalCBOR(cw); err != nil {
4030
-
func (t *Pipeline_Workflow_Environment_Elem) UnmarshalCBOR(r io.Reader) (err error) {
4031
-
*t = Pipeline_Workflow_Environment_Elem{}
3972
+
func (t *Pipeline) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
4050
-
return fmt.Errorf("Pipeline_Workflow_Environment_Elem: map struct too large (%d)", extra)
3992
+
return fmt.Errorf("Pipeline: map struct too large (%d)", extra)
4055
-
nameBuf := make([]byte, 5)
3997
+
nameBuf := make([]byte, 15)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
4071
-
// t.Key (string) (string)
4013
+
// t.LexiconTypeID (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
4080
-
t.Key = string(sval)
4022
+
t.LexiconTypeID = string(sval)
4024
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
4027
+
maj, extra, err = cr.ReadHeader()
4033
+
return fmt.Errorf("t.Workflows: array too large (%d)", extra)
4036
+
if maj != cbg.MajArray {
4037
+
return fmt.Errorf("expected cbor array")
4041
+
t.Workflows = make([]*Pipeline_Workflow, extra)
4082
-
// t.Value (string) (string)
4044
+
for i := 0; i < int(extra); i++ {
4055
+
b, err := cr.ReadByte()
4059
+
if b != cbg.CborNull[0] {
4060
+
if err := cr.UnreadByte(); err != nil {
4063
+
t.Workflows[i] = new(Pipeline_Workflow)
4064
+
if err := t.Workflows[i].UnmarshalCBOR(cr); err != nil {
4065
+
return xerrors.Errorf("unmarshaling t.Workflows[i] pointer: %w", err)
4073
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
4074
+
case "triggerMetadata":
4086
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4078
+
b, err := cr.ReadByte()
4082
+
if b != cbg.CborNull[0] {
4083
+
if err := cr.UnreadByte(); err != nil {
4086
+
t.TriggerMetadata = new(Pipeline_TriggerMetadata)
4087
+
if err := t.TriggerMetadata.UnmarshalCBOR(cr); err != nil {
4088
+
return xerrors.Errorf("unmarshaling t.TriggerMetadata pointer: %w", err)
4091
-
t.Value = string(sval)
···
4302
-
func (t *Repo) MarshalCBOR(w io.Writer) error {
4302
+
func (t *RepoArtifact) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
4311
-
if t.Description == nil {
4315
-
if t.Source == nil {
···
4323
-
// t.Knot (string) (string)
4324
-
if len("knot") > 1000000 {
4325
-
return xerrors.Errorf("Value in field \"knot\" was too long")
4319
+
// t.Tag (util.LexBytes) (slice)
4322
+
if len("tag") > 1000000 {
4323
+
return xerrors.Errorf("Value in field \"tag\" was too long")
4328
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("knot"))); err != nil {
4331
-
if _, err := cw.WriteString(string("knot")); err != nil {
4326
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("tag"))); err != nil {
4329
+
if _, err := cw.WriteString(string("tag")); err != nil {
4335
-
if len(t.Knot) > 1000000 {
4336
-
return xerrors.Errorf("Value in field t.Knot was too long")
4333
+
if len(t.Tag) > 2097152 {
4334
+
return xerrors.Errorf("Byte array in field t.Tag was too long")
4339
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Knot))); err != nil {
4342
-
if _, err := cw.WriteString(string(t.Knot)); err != nil {
4337
+
if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Tag))); err != nil {
4341
+
if _, err := cw.Write(t.Tag); err != nil {
// t.Name (string) (string)
···
4369
-
// t.LexiconTypeID (string) (string)
4370
-
if len("$type") > 1000000 {
4371
-
return xerrors.Errorf("Value in field \"$type\" was too long")
4370
+
// t.Repo (string) (string)
4371
+
if len("repo") > 1000000 {
4372
+
return xerrors.Errorf("Value in field \"repo\" was too long")
4374
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
4375
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
4377
-
if _, err := cw.WriteString(string("$type")); err != nil {
4378
+
if _, err := cw.WriteString(string("repo")); err != nil {
4381
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo"))); err != nil {
4382
+
if len(t.Repo) > 1000000 {
4383
+
return xerrors.Errorf("Value in field t.Repo was too long")
4386
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
4384
-
if _, err := cw.WriteString(string("sh.tangled.repo")); err != nil {
4389
+
if _, err := cw.WriteString(string(t.Repo)); err != nil {
4388
-
// t.Owner (string) (string)
4389
-
if len("owner") > 1000000 {
4390
-
return xerrors.Errorf("Value in field \"owner\" was too long")
4393
+
// t.LexiconTypeID (string) (string)
4394
+
if len("$type") > 1000000 {
4395
+
return xerrors.Errorf("Value in field \"$type\" was too long")
4393
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
4398
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
4396
-
if _, err := cw.WriteString(string("owner")); err != nil {
4401
+
if _, err := cw.WriteString(string("$type")); err != nil {
4400
-
if len(t.Owner) > 1000000 {
4401
-
return xerrors.Errorf("Value in field t.Owner was too long")
4404
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
4405
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.artifact"))); err != nil {
4407
-
if _, err := cw.WriteString(string(t.Owner)); err != nil {
4408
+
if _, err := cw.WriteString(string("sh.tangled.repo.artifact")); err != nil {
4411
-
// t.Source (string) (string)
4412
-
if t.Source != nil {
4414
-
if len("source") > 1000000 {
4415
-
return xerrors.Errorf("Value in field \"source\" was too long")
4418
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
4421
-
if _, err := cw.WriteString(string("source")); err != nil {
4412
+
// t.Artifact (util.LexBlob) (struct)
4413
+
if len("artifact") > 1000000 {
4414
+
return xerrors.Errorf("Value in field \"artifact\" was too long")
4425
-
if t.Source == nil {
4426
-
if _, err := cw.Write(cbg.CborNull); err != nil {
4430
-
if len(*t.Source) > 1000000 {
4431
-
return xerrors.Errorf("Value in field t.Source was too long")
4417
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("artifact"))); err != nil {
4420
+
if _, err := cw.WriteString(string("artifact")); err != nil {
4434
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Source))); err != nil {
4437
-
if _, err := cw.WriteString(string(*t.Source)); err != nil {
4424
+
if err := t.Artifact.MarshalCBOR(cw); err != nil {
// t.CreatedAt (string) (string)
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
4466
-
// t.Description (string) (string)
4467
-
if t.Description != nil {
4469
-
if len("description") > 1000000 {
4470
-
return xerrors.Errorf("Value in field \"description\" was too long")
4473
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("description"))); err != nil {
4476
-
if _, err := cw.WriteString(string("description")); err != nil {
4480
-
if t.Description == nil {
4481
-
if _, err := cw.Write(cbg.CborNull); err != nil {
4485
-
if len(*t.Description) > 1000000 {
4486
-
return xerrors.Errorf("Value in field t.Description was too long")
4489
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Description))); err != nil {
4492
-
if _, err := cw.WriteString(string(*t.Description)); err != nil {
4500
-
func (t *Repo) UnmarshalCBOR(r io.Reader) (err error) {
4453
+
func (t *RepoArtifact) UnmarshalCBOR(r io.Reader) (err error) {
4454
+
*t = RepoArtifact{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
4520
-
return fmt.Errorf("Repo: map struct too large (%d)", extra)
4473
+
return fmt.Errorf("RepoArtifact: map struct too large (%d)", extra)
4525
-
nameBuf := make([]byte, 11)
4478
+
nameBuf := make([]byte, 9)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
4541
-
// t.Knot (string) (string)
4494
+
// t.Tag (util.LexBytes) (slice)
4545
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4497
+
maj, extra, err = cr.ReadHeader()
4550
-
t.Knot = string(sval)
4502
+
if extra > 2097152 {
4503
+
return fmt.Errorf("t.Tag: byte array too large (%d)", extra)
4505
+
if maj != cbg.MajByteString {
4506
+
return fmt.Errorf("expected byte array")
4510
+
t.Tag = make([]uint8, extra)
4513
+
if _, err := io.ReadFull(cr, t.Tag); err != nil {
// t.Name (string) (string)
···
4563
-
// t.LexiconTypeID (string) (string)
4528
+
// t.Repo (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
4572
-
t.LexiconTypeID = string(sval)
4537
+
t.Repo = string(sval)
4574
-
// t.Owner (string) (string)
4539
+
// t.LexiconTypeID (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
4583
-
t.Owner = string(sval)
4548
+
t.LexiconTypeID = string(sval)
4585
-
// t.Source (string) (string)
4550
+
// t.Artifact (util.LexBlob) (struct)
···
if err := cr.UnreadByte(); err != nil {
4598
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4563
+
t.Artifact = new(util.LexBlob)
4564
+
if err := t.Artifact.UnmarshalCBOR(cr); err != nil {
4565
+
return xerrors.Errorf("unmarshaling t.Artifact pointer: %w", err)
4603
-
t.Source = (*string)(&sval)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
4617
-
// t.Description (string) (string)
4618
-
case "description":
4621
-
b, err := cr.ReadByte()
4625
-
if b != cbg.CborNull[0] {
4626
-
if err := cr.UnreadByte(); err != nil {
4630
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4635
-
t.Description = (*string)(&sval)
// Field doesn't exist on this type, so ignore it
···
4649
-
func (t *RepoArtifact) MarshalCBOR(w io.Writer) error {
4592
+
func (t *RepoIssueComment) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
4601
+
if t.CommentId == nil {
4662
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
4605
+
if t.Owner == nil {
4666
-
// t.Tag (util.LexBytes) (slice)
4669
-
if len("tag") > 1000000 {
4670
-
return xerrors.Errorf("Value in field \"tag\" was too long")
4673
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("tag"))); err != nil {
4676
-
if _, err := cw.WriteString(string("tag")); err != nil {
4680
-
if len(t.Tag) > 2097152 {
4681
-
return xerrors.Errorf("Byte array in field t.Tag was too long")
4684
-
if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Tag))); err != nil {
4688
-
if _, err := cw.Write(t.Tag); err != nil {
4609
+
if t.Repo == nil {
4613
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
4694
-
// t.Name (string) (string)
4695
-
if len("name") > 1000000 {
4696
-
return xerrors.Errorf("Value in field \"name\" was too long")
4617
+
// t.Body (string) (string)
4618
+
if len("body") > 1000000 {
4619
+
return xerrors.Errorf("Value in field \"body\" was too long")
4699
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
4622
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
4702
-
if _, err := cw.WriteString(string("name")); err != nil {
4625
+
if _, err := cw.WriteString(string("body")); err != nil {
4706
-
if len(t.Name) > 1000000 {
4707
-
return xerrors.Errorf("Value in field t.Name was too long")
4629
+
if len(t.Body) > 1000000 {
4630
+
return xerrors.Errorf("Value in field t.Body was too long")
4710
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
4633
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Body))); err != nil {
4713
-
if _, err := cw.WriteString(string(t.Name)); err != nil {
4636
+
if _, err := cw.WriteString(string(t.Body)); err != nil {
// t.Repo (string) (string)
4718
-
if len("repo") > 1000000 {
4719
-
return xerrors.Errorf("Value in field \"repo\" was too long")
4641
+
if t.Repo != nil {
4722
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
4725
-
if _, err := cw.WriteString(string("repo")); err != nil {
4643
+
if len("repo") > 1000000 {
4644
+
return xerrors.Errorf("Value in field \"repo\" was too long")
4729
-
if len(t.Repo) > 1000000 {
4730
-
return xerrors.Errorf("Value in field t.Repo was too long")
4647
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
4650
+
if _, err := cw.WriteString(string("repo")); err != nil {
4654
+
if t.Repo == nil {
4655
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4659
+
if len(*t.Repo) > 1000000 {
4660
+
return xerrors.Errorf("Value in field t.Repo was too long")
4733
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
4736
-
if _, err := cw.WriteString(string(t.Repo)); err != nil {
4663
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Repo))); err != nil {
4666
+
if _, err := cw.WriteString(string(*t.Repo)); err != nil {
// t.LexiconTypeID (string) (string)
···
4752
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.artifact"))); err != nil {
4684
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.comment"))); err != nil {
4755
-
if _, err := cw.WriteString(string("sh.tangled.repo.artifact")); err != nil {
4687
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue.comment")); err != nil {
4759
-
// t.Artifact (util.LexBlob) (struct)
4760
-
if len("artifact") > 1000000 {
4761
-
return xerrors.Errorf("Value in field \"artifact\" was too long")
4691
+
// t.Issue (string) (string)
4692
+
if len("issue") > 1000000 {
4693
+
return xerrors.Errorf("Value in field \"issue\" was too long")
4764
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("artifact"))); err != nil {
4696
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
4767
-
if _, err := cw.WriteString(string("artifact")); err != nil {
4699
+
if _, err := cw.WriteString(string("issue")); err != nil {
4771
-
if err := t.Artifact.MarshalCBOR(cw); err != nil {
4703
+
if len(t.Issue) > 1000000 {
4704
+
return xerrors.Errorf("Value in field t.Issue was too long")
4707
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
4710
+
if _, err := cw.WriteString(string(t.Issue)); err != nil {
4714
+
// t.Owner (string) (string)
4715
+
if t.Owner != nil {
4717
+
if len("owner") > 1000000 {
4718
+
return xerrors.Errorf("Value in field \"owner\" was too long")
4721
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
4724
+
if _, err := cw.WriteString(string("owner")); err != nil {
4728
+
if t.Owner == nil {
4729
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4733
+
if len(*t.Owner) > 1000000 {
4734
+
return xerrors.Errorf("Value in field t.Owner was too long")
4737
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Owner))); err != nil {
4740
+
if _, err := cw.WriteString(string(*t.Owner)); err != nil {
4746
+
// t.CommentId (int64) (int64)
4747
+
if t.CommentId != nil {
4749
+
if len("commentId") > 1000000 {
4750
+
return xerrors.Errorf("Value in field \"commentId\" was too long")
4753
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commentId"))); err != nil {
4756
+
if _, err := cw.WriteString(string("commentId")); err != nil {
4760
+
if t.CommentId == nil {
4761
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4765
+
if *t.CommentId >= 0 {
4766
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.CommentId)); err != nil {
4770
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-*t.CommentId-1)); err != nil {
// t.CreatedAt (string) (string)
if len("createdAt") > 1000000 {
return xerrors.Errorf("Value in field \"createdAt\" was too long")
···
4800
-
func (t *RepoArtifact) UnmarshalCBOR(r io.Reader) (err error) {
4801
-
*t = RepoArtifact{}
4803
+
func (t *RepoIssueComment) UnmarshalCBOR(r io.Reader) (err error) {
4804
+
*t = RepoIssueComment{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
4820
-
return fmt.Errorf("RepoArtifact: map struct too large (%d)", extra)
4823
+
return fmt.Errorf("RepoIssueComment: map struct too large (%d)", extra)
···
switch string(nameBuf[:nameLen]) {
4841
-
// t.Tag (util.LexBytes) (slice)
4844
-
maj, extra, err = cr.ReadHeader()
4849
-
if extra > 2097152 {
4850
-
return fmt.Errorf("t.Tag: byte array too large (%d)", extra)
4852
-
if maj != cbg.MajByteString {
4853
-
return fmt.Errorf("expected byte array")
4857
-
t.Tag = make([]uint8, extra)
4860
-
if _, err := io.ReadFull(cr, t.Tag); err != nil {
4864
-
// t.Name (string) (string)
4844
+
// t.Body (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
4873
-
t.Name = string(sval)
4853
+
t.Body = string(sval)
// t.Repo (string) (string)
4879
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4859
+
b, err := cr.ReadByte()
4863
+
if b != cbg.CborNull[0] {
4864
+
if err := cr.UnreadByte(); err != nil {
4884
-
t.Repo = string(sval)
4868
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4873
+
t.Repo = (*string)(&sval)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
4897
-
// t.Artifact (util.LexBlob) (struct)
4887
+
// t.Issue (string) (string)
4891
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4896
+
t.Issue = string(sval)
4898
+
// t.Owner (string) (string)
···
if err := cr.UnreadByte(); err != nil {
4910
-
t.Artifact = new(util.LexBlob)
4911
-
if err := t.Artifact.UnmarshalCBOR(cr); err != nil {
4912
-
return xerrors.Errorf("unmarshaling t.Artifact pointer: %w", err)
4911
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4916
+
t.Owner = (*string)(&sval)
4919
+
// t.CommentId (int64) (int64)
4923
+
b, err := cr.ReadByte()
4927
+
if b != cbg.CborNull[0] {
4928
+
if err := cr.UnreadByte(); err != nil {
4931
+
maj, extra, err := cr.ReadHeader()
4937
+
case cbg.MajUnsignedInt:
4938
+
extraI = int64(extra)
4940
+
return fmt.Errorf("int64 positive overflow")
4942
+
case cbg.MajNegativeInt:
4943
+
extraI = int64(extra)
4945
+
return fmt.Errorf("int64 negative overflow")
4947
+
extraI = -1 - extraI
4949
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
4952
+
t.CommentId = (*int64)(&extraI)
// t.CreatedAt (string) (string)
···
4977
+
func (t *RepoIssueState) MarshalCBOR(w io.Writer) error {
4979
+
_, err := w.Write(cbg.CborNull)
4983
+
cw := cbg.NewCborWriter(w)
4985
+
if _, err := cw.Write([]byte{163}); err != nil {
4989
+
// t.LexiconTypeID (string) (string)
4990
+
if len("$type") > 1000000 {
4991
+
return xerrors.Errorf("Value in field \"$type\" was too long")
4994
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
4997
+
if _, err := cw.WriteString(string("$type")); err != nil {
5001
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.state"))); err != nil {
5004
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue.state")); err != nil {
5008
+
// t.Issue (string) (string)
5009
+
if len("issue") > 1000000 {
5010
+
return xerrors.Errorf("Value in field \"issue\" was too long")
5013
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
5016
+
if _, err := cw.WriteString(string("issue")); err != nil {
5020
+
if len(t.Issue) > 1000000 {
5021
+
return xerrors.Errorf("Value in field t.Issue was too long")
5024
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
5027
+
if _, err := cw.WriteString(string(t.Issue)); err != nil {
5031
+
// t.State (string) (string)
5032
+
if len("state") > 1000000 {
5033
+
return xerrors.Errorf("Value in field \"state\" was too long")
5036
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("state"))); err != nil {
5039
+
if _, err := cw.WriteString(string("state")); err != nil {
5043
+
if len(t.State) > 1000000 {
5044
+
return xerrors.Errorf("Value in field t.State was too long")
5047
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil {
5050
+
if _, err := cw.WriteString(string(t.State)); err != nil {
5056
+
func (t *RepoIssueState) UnmarshalCBOR(r io.Reader) (err error) {
5057
+
*t = RepoIssueState{}
5059
+
cr := cbg.NewCborReader(r)
5061
+
maj, extra, err := cr.ReadHeader()
5066
+
if err == io.EOF {
5067
+
err = io.ErrUnexpectedEOF
5071
+
if maj != cbg.MajMap {
5072
+
return fmt.Errorf("cbor input should be of type map")
5075
+
if extra > cbg.MaxLength {
5076
+
return fmt.Errorf("RepoIssueState: map struct too large (%d)", extra)
5081
+
nameBuf := make([]byte, 5)
5082
+
for i := uint64(0); i < n; i++ {
5083
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
5089
+
// Field doesn't exist on this type, so ignore it
5090
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
5096
+
switch string(nameBuf[:nameLen]) {
5097
+
// t.LexiconTypeID (string) (string)
5101
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5106
+
t.LexiconTypeID = string(sval)
5108
+
// t.Issue (string) (string)
5112
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5117
+
t.Issue = string(sval)
5119
+
// t.State (string) (string)
5123
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5128
+
t.State = string(sval)
5132
+
// Field doesn't exist on this type, so ignore it
5133
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *RepoIssue) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
5277
-
func (t *RepoIssueComment) MarshalCBOR(w io.Writer) error {
5479
+
func (t *RepoPullComment) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
5527
+
// t.Pull (string) (string)
5528
+
if len("pull") > 1000000 {
5529
+
return xerrors.Errorf("Value in field \"pull\" was too long")
5532
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
5535
+
if _, err := cw.WriteString(string("pull")); err != nil {
5539
+
if len(t.Pull) > 1000000 {
5540
+
return xerrors.Errorf("Value in field t.Pull was too long")
5543
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
5546
+
if _, err := cw.WriteString(string(t.Pull)); err != nil {
// t.Repo (string) (string)
···
5369
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.comment"))); err != nil {
5372
-
if _, err := cw.WriteString(string("sh.tangled.repo.issue.comment")); err != nil {
5376
-
// t.Issue (string) (string)
5377
-
if len("issue") > 1000000 {
5378
-
return xerrors.Errorf("Value in field \"issue\" was too long")
5381
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
5594
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.comment"))); err != nil {
5384
-
if _, err := cw.WriteString(string("issue")); err != nil {
5388
-
if len(t.Issue) > 1000000 {
5389
-
return xerrors.Errorf("Value in field t.Issue was too long")
5392
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
5395
-
if _, err := cw.WriteString(string(t.Issue)); err != nil {
5597
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull.comment")); err != nil {
···
5488
-
func (t *RepoIssueComment) UnmarshalCBOR(r io.Reader) (err error) {
5489
-
*t = RepoIssueComment{}
5690
+
func (t *RepoPullComment) UnmarshalCBOR(r io.Reader) (err error) {
5691
+
*t = RepoPullComment{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
5508
-
return fmt.Errorf("RepoIssueComment: map struct too large (%d)", extra)
5710
+
return fmt.Errorf("RepoPullComment: map struct too large (%d)", extra)
···
5742
+
// t.Pull (string) (string)
5746
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5751
+
t.Pull = string(sval)
// t.Repo (string) (string)
···
t.LexiconTypeID = string(sval)
5572
-
// t.Issue (string) (string)
5576
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5581
-
t.Issue = string(sval)
// t.Owner (string) (string)
···
5662
-
func (t *RepoIssueState) MarshalCBOR(w io.Writer) error {
5864
+
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
5674
-
// t.LexiconTypeID (string) (string)
5675
-
if len("$type") > 1000000 {
5676
-
return xerrors.Errorf("Value in field \"$type\" was too long")
5876
+
// t.Pull (string) (string)
5877
+
if len("pull") > 1000000 {
5878
+
return xerrors.Errorf("Value in field \"pull\" was too long")
5679
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
5881
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
5682
-
if _, err := cw.WriteString(string("$type")); err != nil {
5884
+
if _, err := cw.WriteString(string("pull")); err != nil {
5686
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.state"))); err != nil {
5888
+
if len(t.Pull) > 1000000 {
5889
+
return xerrors.Errorf("Value in field t.Pull was too long")
5892
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
5689
-
if _, err := cw.WriteString(string("sh.tangled.repo.issue.state")); err != nil {
5895
+
if _, err := cw.WriteString(string(t.Pull)); err != nil {
5693
-
// t.Issue (string) (string)
5694
-
if len("issue") > 1000000 {
5695
-
return xerrors.Errorf("Value in field \"issue\" was too long")
5899
+
// t.LexiconTypeID (string) (string)
5900
+
if len("$type") > 1000000 {
5901
+
return xerrors.Errorf("Value in field \"$type\" was too long")
5698
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
5904
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
5701
-
if _, err := cw.WriteString(string("issue")); err != nil {
5907
+
if _, err := cw.WriteString(string("$type")); err != nil {
5705
-
if len(t.Issue) > 1000000 {
5706
-
return xerrors.Errorf("Value in field t.Issue was too long")
5709
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
5911
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.status"))); err != nil {
5712
-
if _, err := cw.WriteString(string(t.Issue)); err != nil {
5914
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull.status")); err != nil {
5716
-
// t.State (string) (string)
5717
-
if len("state") > 1000000 {
5718
-
return xerrors.Errorf("Value in field \"state\" was too long")
5918
+
// t.Status (string) (string)
5919
+
if len("status") > 1000000 {
5920
+
return xerrors.Errorf("Value in field \"status\" was too long")
5721
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("state"))); err != nil {
5923
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
5724
-
if _, err := cw.WriteString(string("state")); err != nil {
5926
+
if _, err := cw.WriteString(string("status")); err != nil {
5728
-
if len(t.State) > 1000000 {
5729
-
return xerrors.Errorf("Value in field t.State was too long")
5930
+
if len(t.Status) > 1000000 {
5931
+
return xerrors.Errorf("Value in field t.Status was too long")
5732
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil {
5934
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
5735
-
if _, err := cw.WriteString(string(t.State)); err != nil {
5937
+
if _, err := cw.WriteString(string(t.Status)); err != nil {
5741
-
func (t *RepoIssueState) UnmarshalCBOR(r io.Reader) (err error) {
5742
-
*t = RepoIssueState{}
5943
+
func (t *RepoPullStatus) UnmarshalCBOR(r io.Reader) (err error) {
5944
+
*t = RepoPullStatus{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
5761
-
return fmt.Errorf("RepoIssueState: map struct too large (%d)", extra)
5963
+
return fmt.Errorf("RepoPullStatus: map struct too large (%d)", extra)
5766
-
nameBuf := make([]byte, 5)
5968
+
nameBuf := make([]byte, 6)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
5782
-
// t.LexiconTypeID (string) (string)
5984
+
// t.Pull (string) (string)
5988
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5993
+
t.Pull = string(sval)
5995
+
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
5793
-
// t.Issue (string) (string)
6006
+
// t.Status (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
5802
-
t.Issue = string(sval)
6015
+
t.Status = string(sval)
6019
+
// Field doesn't exist on this type, so ignore it
6020
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
6028
+
func (t *RepoPull_Source) MarshalCBOR(w io.Writer) error {
6030
+
_, err := w.Write(cbg.CborNull)
6034
+
cw := cbg.NewCborWriter(w)
6037
+
if t.Repo == nil {
6041
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
6045
+
// t.Repo (string) (string)
6046
+
if t.Repo != nil {
6048
+
if len("repo") > 1000000 {
6049
+
return xerrors.Errorf("Value in field \"repo\" was too long")
6052
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
6055
+
if _, err := cw.WriteString(string("repo")); err != nil {
6059
+
if t.Repo == nil {
6060
+
if _, err := cw.Write(cbg.CborNull); err != nil {
6064
+
if len(*t.Repo) > 1000000 {
6065
+
return xerrors.Errorf("Value in field t.Repo was too long")
6068
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Repo))); err != nil {
6071
+
if _, err := cw.WriteString(string(*t.Repo)); err != nil {
6077
+
// t.Branch (string) (string)
6078
+
if len("branch") > 1000000 {
6079
+
return xerrors.Errorf("Value in field \"branch\" was too long")
6082
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("branch"))); err != nil {
6085
+
if _, err := cw.WriteString(string("branch")); err != nil {
6089
+
if len(t.Branch) > 1000000 {
6090
+
return xerrors.Errorf("Value in field t.Branch was too long")
6093
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Branch))); err != nil {
6096
+
if _, err := cw.WriteString(string(t.Branch)); err != nil {
6102
+
func (t *RepoPull_Source) UnmarshalCBOR(r io.Reader) (err error) {
6103
+
*t = RepoPull_Source{}
6105
+
cr := cbg.NewCborReader(r)
6107
+
maj, extra, err := cr.ReadHeader()
6112
+
if err == io.EOF {
6113
+
err = io.ErrUnexpectedEOF
6117
+
if maj != cbg.MajMap {
6118
+
return fmt.Errorf("cbor input should be of type map")
6121
+
if extra > cbg.MaxLength {
6122
+
return fmt.Errorf("RepoPull_Source: map struct too large (%d)", extra)
6127
+
nameBuf := make([]byte, 6)
6128
+
for i := uint64(0); i < n; i++ {
6129
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
6135
+
// Field doesn't exist on this type, so ignore it
6136
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
5804
-
// t.State (string) (string)
6142
+
switch string(nameBuf[:nameLen]) {
6143
+
// t.Repo (string) (string)
6147
+
b, err := cr.ReadByte()
6151
+
if b != cbg.CborNull[0] {
6152
+
if err := cr.UnreadByte(); err != nil {
6156
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6161
+
t.Repo = (*string)(&sval)
6164
+
// t.Branch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
5813
-
t.State = string(sval)
6173
+
t.Branch = string(sval)
···
6241
-
func (t *RepoPullComment) MarshalCBOR(w io.Writer) error {
6601
+
func (t *Repo) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
6250
-
if t.CommentId == nil {
6610
+
if t.Description == nil {
6254
-
if t.Owner == nil {
6258
-
if t.Repo == nil {
6614
+
if t.Source == nil {
···
6266
-
// t.Body (string) (string)
6267
-
if len("body") > 1000000 {
6268
-
return xerrors.Errorf("Value in field \"body\" was too long")
6622
+
// t.Knot (string) (string)
6623
+
if len("knot") > 1000000 {
6624
+
return xerrors.Errorf("Value in field \"knot\" was too long")
6271
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
6627
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("knot"))); err != nil {
6274
-
if _, err := cw.WriteString(string("body")); err != nil {
6630
+
if _, err := cw.WriteString(string("knot")); err != nil {
6278
-
if len(t.Body) > 1000000 {
6279
-
return xerrors.Errorf("Value in field t.Body was too long")
6634
+
if len(t.Knot) > 1000000 {
6635
+
return xerrors.Errorf("Value in field t.Knot was too long")
6282
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Body))); err != nil {
6638
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Knot))); err != nil {
6285
-
if _, err := cw.WriteString(string(t.Body)); err != nil {
6641
+
if _, err := cw.WriteString(string(t.Knot)); err != nil {
6289
-
// t.Pull (string) (string)
6290
-
if len("pull") > 1000000 {
6291
-
return xerrors.Errorf("Value in field \"pull\" was too long")
6645
+
// t.Name (string) (string)
6646
+
if len("name") > 1000000 {
6647
+
return xerrors.Errorf("Value in field \"name\" was too long")
6294
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
6650
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
6297
-
if _, err := cw.WriteString(string("pull")); err != nil {
6653
+
if _, err := cw.WriteString(string("name")); err != nil {
6301
-
if len(t.Pull) > 1000000 {
6302
-
return xerrors.Errorf("Value in field t.Pull was too long")
6657
+
if len(t.Name) > 1000000 {
6658
+
return xerrors.Errorf("Value in field t.Name was too long")
6305
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
6661
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
6308
-
if _, err := cw.WriteString(string(t.Pull)); err != nil {
6664
+
if _, err := cw.WriteString(string(t.Name)); err != nil {
6312
-
// t.Repo (string) (string)
6313
-
if t.Repo != nil {
6315
-
if len("repo") > 1000000 {
6316
-
return xerrors.Errorf("Value in field \"repo\" was too long")
6319
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
6322
-
if _, err := cw.WriteString(string("repo")); err != nil {
6326
-
if t.Repo == nil {
6327
-
if _, err := cw.Write(cbg.CborNull); err != nil {
6331
-
if len(*t.Repo) > 1000000 {
6332
-
return xerrors.Errorf("Value in field t.Repo was too long")
6335
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Repo))); err != nil {
6338
-
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")
···
6356
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.comment"))); err != nil {
6680
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo"))); err != nil {
6359
-
if _, err := cw.WriteString(string("sh.tangled.repo.pull.comment")); err != nil {
6683
+
if _, err := cw.WriteString(string("sh.tangled.repo")); err != nil {
// t.Owner (string) (string)
6364
-
if t.Owner != nil {
6366
-
if len("owner") > 1000000 {
6367
-
return xerrors.Errorf("Value in field \"owner\" was too long")
6688
+
if len("owner") > 1000000 {
6689
+
return xerrors.Errorf("Value in field \"owner\" was too long")
6370
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
6373
-
if _, err := cw.WriteString(string("owner")); err != nil {
6692
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
6695
+
if _, err := cw.WriteString(string("owner")); err != nil {
6377
-
if t.Owner == nil {
6378
-
if _, err := cw.Write(cbg.CborNull); err != nil {
6382
-
if len(*t.Owner) > 1000000 {
6383
-
return xerrors.Errorf("Value in field t.Owner was too long")
6699
+
if len(t.Owner) > 1000000 {
6700
+
return xerrors.Errorf("Value in field t.Owner was too long")
6386
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Owner))); err != nil {
6389
-
if _, err := cw.WriteString(string(*t.Owner)); err != nil {
6703
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
6706
+
if _, err := cw.WriteString(string(t.Owner)); err != nil {
6395
-
// t.CommentId (int64) (int64)
6396
-
if t.CommentId != nil {
6710
+
// t.Source (string) (string)
6711
+
if t.Source != nil {
6398
-
if len("commentId") > 1000000 {
6399
-
return xerrors.Errorf("Value in field \"commentId\" was too long")
6713
+
if len("source") > 1000000 {
6714
+
return xerrors.Errorf("Value in field \"source\" was too long")
6402
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commentId"))); err != nil {
6717
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
6405
-
if _, err := cw.WriteString(string("commentId")); err != nil {
6720
+
if _, err := cw.WriteString(string("source")); err != nil {
6409
-
if t.CommentId == nil {
6724
+
if t.Source == nil {
if _, err := cw.Write(cbg.CborNull); err != nil {
6414
-
if *t.CommentId >= 0 {
6415
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.CommentId)); err != nil {
6419
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-*t.CommentId-1)); err != nil {
6729
+
if len(*t.Source) > 1000000 {
6730
+
return xerrors.Errorf("Value in field t.Source was too long")
6733
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Source))); err != nil {
6736
+
if _, err := cw.WriteString(string(*t.Source)); err != nil {
// t.CreatedAt (string) (string)
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
6765
+
// t.Description (string) (string)
6766
+
if t.Description != nil {
6768
+
if len("description") > 1000000 {
6769
+
return xerrors.Errorf("Value in field \"description\" was too long")
6772
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("description"))); err != nil {
6775
+
if _, err := cw.WriteString(string("description")); err != nil {
6779
+
if t.Description == nil {
6780
+
if _, err := cw.Write(cbg.CborNull); err != nil {
6784
+
if len(*t.Description) > 1000000 {
6785
+
return xerrors.Errorf("Value in field t.Description was too long")
6788
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Description))); err != nil {
6791
+
if _, err := cw.WriteString(string(*t.Description)); err != nil {
6452
-
func (t *RepoPullComment) UnmarshalCBOR(r io.Reader) (err error) {
6453
-
*t = RepoPullComment{}
6799
+
func (t *Repo) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
6472
-
return fmt.Errorf("RepoPullComment: map struct too large (%d)", extra)
6819
+
return fmt.Errorf("Repo: map struct too large (%d)", extra)
6477
-
nameBuf := make([]byte, 9)
6824
+
nameBuf := make([]byte, 11)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
6493
-
// t.Body (string) (string)
6840
+
// t.Knot (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
6502
-
t.Body = string(sval)
6849
+
t.Knot = string(sval)
6504
-
// t.Pull (string) (string)
6851
+
// t.Name (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
6513
-
t.Pull = string(sval)
6860
+
t.Name = string(sval)
6515
-
// t.Repo (string) (string)
6862
+
// t.LexiconTypeID (string) (string)
6519
-
b, err := cr.ReadByte()
6866
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6523
-
if b != cbg.CborNull[0] {
6524
-
if err := cr.UnreadByte(); err != nil {
6528
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6533
-
t.Repo = (*string)(&sval)
6871
+
t.LexiconTypeID = string(sval)
6536
-
// t.LexiconTypeID (string) (string)
6873
+
// t.Owner (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
6545
-
t.LexiconTypeID = string(sval)
6882
+
t.Owner = string(sval)
6547
-
// t.Owner (string) (string)
6884
+
// t.Source (string) (string)
···
6565
-
t.Owner = (*string)(&sval)
6902
+
t.Source = (*string)(&sval)
6568
-
// t.CommentId (int64) (int64)
6905
+
// t.CreatedAt (string) (string)
6909
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6914
+
t.CreatedAt = string(sval)
6916
+
// t.Description (string) (string)
6917
+
case "description":
···
if err := cr.UnreadByte(); err != nil {
6580
-
maj, extra, err := cr.ReadHeader()
6929
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6586
-
case cbg.MajUnsignedInt:
6587
-
extraI = int64(extra)
6589
-
return fmt.Errorf("int64 positive overflow")
6591
-
case cbg.MajNegativeInt:
6592
-
extraI = int64(extra)
6594
-
return fmt.Errorf("int64 negative overflow")
6596
-
extraI = -1 - extraI
6598
-
return fmt.Errorf("wrong type for int64 field: %d", maj)
6601
-
t.CommentId = (*int64)(&extraI)
6604
-
// t.CreatedAt (string) (string)
6608
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6934
+
t.Description = (*string)(&sval)
6613
-
t.CreatedAt = string(sval)
···
6626
-
func (t *RepoPull_Source) MarshalCBOR(w io.Writer) error {
6948
+
func (t *SpindleMember) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
6635
-
if t.Repo == nil {
6957
+
if t.Instance == nil {
···
6643
-
// t.Repo (string) (string)
6644
-
if t.Repo != nil {
6646
-
if len("repo") > 1000000 {
6647
-
return xerrors.Errorf("Value in field \"repo\" was too long")
6650
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
6653
-
if _, err := cw.WriteString(string("repo")); err != nil {
6965
+
// t.LexiconTypeID (string) (string)
6966
+
if len("$type") > 1000000 {
6967
+
return xerrors.Errorf("Value in field \"$type\" was too long")
6657
-
if t.Repo == nil {
6658
-
if _, err := cw.Write(cbg.CborNull); err != nil {
6662
-
if len(*t.Repo) > 1000000 {
6663
-
return xerrors.Errorf("Value in field t.Repo was too long")
6666
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Repo))); err != nil {
6669
-
if _, err := cw.WriteString(string(*t.Repo)); err != nil {
6970
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
6675
-
// t.Branch (string) (string)
6676
-
if len("branch") > 1000000 {
6677
-
return xerrors.Errorf("Value in field \"branch\" was too long")
6973
+
if _, err := cw.WriteString(string("$type")); err != nil {
6680
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("branch"))); err != nil {
6977
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.spindle.member"))); err != nil {
6683
-
if _, err := cw.WriteString(string("branch")); err != nil {
6980
+
if _, err := cw.WriteString(string("sh.tangled.spindle.member")); err != nil {
6687
-
if len(t.Branch) > 1000000 {
6688
-
return xerrors.Errorf("Value in field t.Branch was too long")
6984
+
// t.Subject (string) (string)
6985
+
if len("subject") > 1000000 {
6986
+
return xerrors.Errorf("Value in field \"subject\" was too long")
6691
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Branch))); err != nil {
6989
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("subject"))); err != nil {
6694
-
if _, err := cw.WriteString(string(t.Branch)); err != nil {
6992
+
if _, err := cw.WriteString(string("subject")); err != nil {
6700
-
func (t *RepoPull_Source) UnmarshalCBOR(r io.Reader) (err error) {
6701
-
*t = RepoPull_Source{}
6703
-
cr := cbg.NewCborReader(r)
6996
+
if len(t.Subject) > 1000000 {
6997
+
return xerrors.Errorf("Value in field t.Subject was too long")
6705
-
maj, extra, err := cr.ReadHeader()
7000
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Subject))); err != nil {
6710
-
if err == io.EOF {
6711
-
err = io.ErrUnexpectedEOF
6715
-
if maj != cbg.MajMap {
6716
-
return fmt.Errorf("cbor input should be of type map")
7003
+
if _, err := cw.WriteString(string(t.Subject)); err != nil {
6719
-
if extra > cbg.MaxLength {
6720
-
return fmt.Errorf("RepoPull_Source: map struct too large (%d)", extra)
7007
+
// t.Instance (string) (string)
7008
+
if t.Instance != nil {
7010
+
if len("instance") > 1000000 {
7011
+
return xerrors.Errorf("Value in field \"instance\" was too long")
6725
-
nameBuf := make([]byte, 6)
6726
-
for i := uint64(0); i < n; i++ {
6727
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
7014
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("instance"))); err != nil {
7017
+
if _, err := cw.WriteString(string("instance")); err != nil {
6733
-
// Field doesn't exist on this type, so ignore it
6734
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
7021
+
if t.Instance == nil {
7022
+
if _, err := cw.Write(cbg.CborNull); err != nil {
6740
-
switch string(nameBuf[:nameLen]) {
6741
-
// t.Repo (string) (string)
6745
-
b, err := cr.ReadByte()
6749
-
if b != cbg.CborNull[0] {
6750
-
if err := cr.UnreadByte(); err != nil {
6754
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6759
-
t.Repo = (*string)(&sval)
7026
+
if len(*t.Instance) > 1000000 {
7027
+
return xerrors.Errorf("Value in field t.Instance was too long")
6762
-
// t.Branch (string) (string)
6766
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6771
-
t.Branch = string(sval)
7030
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Instance))); err != nil {
6775
-
// Field doesn't exist on this type, so ignore it
6776
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
7033
+
if _, err := cw.WriteString(string(*t.Instance)); err != nil {
6784
-
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
6786
-
_, err := w.Write(cbg.CborNull)
6790
-
cw := cbg.NewCborWriter(w)
6792
-
if _, err := cw.Write([]byte{163}); err != nil {
6796
-
// t.Pull (string) (string)
6797
-
if len("pull") > 1000000 {
6798
-
return xerrors.Errorf("Value in field \"pull\" was too long")
7039
+
// t.CreatedAt (string) (string)
7040
+
if len("createdAt") > 1000000 {
7041
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
6801
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
7044
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
6804
-
if _, err := cw.WriteString(string("pull")); err != nil {
7047
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
6808
-
if len(t.Pull) > 1000000 {
6809
-
return xerrors.Errorf("Value in field t.Pull was too long")
7051
+
if len(t.CreatedAt) > 1000000 {
7052
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
6812
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
6815
-
if _, err := cw.WriteString(string(t.Pull)); err != nil {
6819
-
// t.LexiconTypeID (string) (string)
6820
-
if len("$type") > 1000000 {
6821
-
return xerrors.Errorf("Value in field \"$type\" was too long")
6824
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
6827
-
if _, err := cw.WriteString(string("$type")); err != nil {
6831
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.status"))); err != nil {
6834
-
if _, err := cw.WriteString(string("sh.tangled.repo.pull.status")); err != nil {
6838
-
// t.Status (string) (string)
6839
-
if len("status") > 1000000 {
6840
-
return xerrors.Errorf("Value in field \"status\" was too long")
6843
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
6846
-
if _, err := cw.WriteString(string("status")); err != nil {
6850
-
if len(t.Status) > 1000000 {
6851
-
return xerrors.Errorf("Value in field t.Status was too long")
6854
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
7055
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
6857
-
if _, err := cw.WriteString(string(t.Status)); err != nil {
7058
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
6863
-
func (t *RepoPullStatus) UnmarshalCBOR(r io.Reader) (err error) {
6864
-
*t = RepoPullStatus{}
7064
+
func (t *SpindleMember) UnmarshalCBOR(r io.Reader) (err error) {
7065
+
*t = SpindleMember{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
6883
-
return fmt.Errorf("RepoPullStatus: map struct too large (%d)", extra)
7084
+
return fmt.Errorf("SpindleMember: map struct too large (%d)", extra)
6888
-
nameBuf := make([]byte, 6)
7089
+
nameBuf := make([]byte, 9)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
6904
-
// t.Pull (string) (string)
7105
+
// t.LexiconTypeID (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
6913
-
t.Pull = string(sval)
7114
+
t.LexiconTypeID = string(sval)
6915
-
// t.LexiconTypeID (string) (string)
7116
+
// t.Subject (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
6924
-
t.LexiconTypeID = string(sval)
7125
+
t.Subject = string(sval)
7127
+
// t.Instance (string) (string)
7131
+
b, err := cr.ReadByte()
7135
+
if b != cbg.CborNull[0] {
7136
+
if err := cr.UnreadByte(); err != nil {
7140
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7145
+
t.Instance = (*string)(&sval)
6926
-
// t.Status (string) (string)
7148
+
// t.CreatedAt (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
6935
-
t.Status = string(sval)
7157
+
t.CreatedAt = string(sval)