···
671
-
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) MarshalCBOR(w io.Writer) error {
671
+
func (t *GitRefUpdate) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
679
-
if _, err := cw.Write([]byte{162}); err != nil {
679
+
if _, err := cw.Write([]byte{168}); err != nil {
683
-
// t.Count (int64) (int64)
684
-
if len("count") > 1000000 {
685
-
return xerrors.Errorf("Value in field \"count\" was too long")
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("count"))); err != nil {
688
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
691
-
if _, err := cw.WriteString(string("count")); err != nil {
691
+
if _, err := cw.WriteString(string("ref")); err != nil {
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 {
705
-
// t.Email (string) (string)
706
-
if len("email") > 1000000 {
707
-
return xerrors.Errorf("Value in field \"email\" was too long")
695
+
if len(t.Ref) > 1000000 {
696
+
return xerrors.Errorf("Value in field t.Ref was too long")
710
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("email"))); err != nil {
699
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
713
-
if _, err := cw.WriteString(string("email")); err != nil {
702
+
if _, err := cw.WriteString(string(t.Ref)); err != nil {
717
-
if len(t.Email) > 1000000 {
718
-
return xerrors.Errorf("Value in field t.Email was too long")
706
+
// t.Meta (tangled.GitRefUpdate_Meta) (struct)
707
+
if len("meta") > 1000000 {
708
+
return xerrors.Errorf("Value in field \"meta\" was too long")
721
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Email))); err != nil {
711
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("meta"))); err != nil {
724
-
if _, err := cw.WriteString(string(t.Email)); err != nil {
714
+
if _, err := cw.WriteString(string("meta")); err != nil {
730
-
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) UnmarshalCBOR(r io.Reader) (err error) {
731
-
*t = GitRefUpdate_Meta_CommitCount_ByEmail_Elem{}
718
+
if err := t.Meta.MarshalCBOR(cw); err != nil {
733
-
cr := cbg.NewCborReader(r)
722
+
// t.LexiconTypeID (string) (string)
723
+
if len("$type") > 1000000 {
724
+
return xerrors.Errorf("Value in field \"$type\" was too long")
735
-
maj, extra, err := cr.ReadHeader()
727
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
730
+
if _, err := cw.WriteString(string("$type")); err != nil {
741
-
err = io.ErrUnexpectedEOF
745
-
if maj != cbg.MajMap {
746
-
return fmt.Errorf("cbor input should be of type map")
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 {
749
-
if extra > cbg.MaxLength {
750
-
return fmt.Errorf("GitRefUpdate_Meta_CommitCount_ByEmail_Elem: map struct too large (%d)", extra)
741
+
// t.NewSha (string) (string)
742
+
if len("newSha") > 1000000 {
743
+
return xerrors.Errorf("Value in field \"newSha\" was too long")
746
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
749
+
if _, err := cw.WriteString(string("newSha")); err != nil {
755
-
nameBuf := make([]byte, 5)
756
-
for i := uint64(0); i < n; i++ {
757
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
753
+
if len(t.NewSha) > 1000000 {
754
+
return xerrors.Errorf("Value in field t.NewSha was too long")
763
-
// Field doesn't exist on this type, so ignore it
764
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
757
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
760
+
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
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)
764
+
// t.OldSha (string) (string)
765
+
if len("oldSha") > 1000000 {
766
+
return xerrors.Errorf("Value in field \"oldSha\" was too long")
795
-
t.Count = int64(extraI)
797
-
// t.Email (string) (string)
769
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
772
+
if _, err := cw.WriteString(string("oldSha")); err != nil {
801
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
776
+
if len(t.OldSha) > 1000000 {
777
+
return xerrors.Errorf("Value in field t.OldSha was too long")
806
-
t.Email = string(sval)
780
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
783
+
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
810
-
// Field doesn't exist on this type, so ignore it
811
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
787
+
// t.RepoDid (string) (string)
788
+
if len("repoDid") > 1000000 {
789
+
return xerrors.Errorf("Value in field \"repoDid\" was too long")
819
-
func (t *GitRefUpdate_Meta_CommitCount) MarshalCBOR(w io.Writer) error {
821
-
_, err := w.Write(cbg.CborNull)
792
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoDid"))); err != nil {
795
+
if _, err := cw.WriteString(string("repoDid")); err != nil {
825
-
cw := cbg.NewCborWriter(w)
799
+
if len(t.RepoDid) > 1000000 {
800
+
return xerrors.Errorf("Value in field t.RepoDid was too long")
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")
832
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
815
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoName"))); err != nil {
818
+
if _, err := cw.WriteString(string("repoName")); err != nil {
836
-
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
837
-
if t.ByEmail != nil {
822
+
if len(t.RepoName) > 1000000 {
823
+
return xerrors.Errorf("Value in field t.RepoName was too long")
839
-
if len("byEmail") > 1000000 {
840
-
return xerrors.Errorf("Value in field \"byEmail\" was too long")
826
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoName))); err != nil {
829
+
if _, err := cw.WriteString(string(t.RepoName)); err != nil {
843
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("byEmail"))); err != nil {
846
-
if _, err := cw.WriteString(string("byEmail")); err != nil {
833
+
// t.CommitterDid (string) (string)
834
+
if len("committerDid") > 1000000 {
835
+
return xerrors.Errorf("Value in field \"committerDid\" was too long")
850
-
if len(t.ByEmail) > 8192 {
851
-
return xerrors.Errorf("Slice value in field t.ByEmail was too long")
838
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("committerDid"))); err != nil {
841
+
if _, err := cw.WriteString(string("committerDid")); err != nil {
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 {
845
+
if len(t.CommitterDid) > 1000000 {
846
+
return xerrors.Errorf("Value in field t.CommitterDid was too long")
849
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CommitterDid))); err != nil {
852
+
if _, err := cw.WriteString(string(t.CommitterDid)); err != nil {
867
-
func (t *GitRefUpdate_Meta_CommitCount) UnmarshalCBOR(r io.Reader) (err error) {
868
-
*t = GitRefUpdate_Meta_CommitCount{}
858
+
func (t *GitRefUpdate) UnmarshalCBOR(r io.Reader) (err error) {
859
+
*t = GitRefUpdate{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
887
-
return fmt.Errorf("GitRefUpdate_Meta_CommitCount: map struct too large (%d)", extra)
878
+
return fmt.Errorf("GitRefUpdate: map struct too large (%d)", extra)
892
-
nameBuf := make([]byte, 7)
883
+
nameBuf := make([]byte, 12)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
908
-
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
899
+
// t.Ref (string) (string)
903
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
908
+
t.Ref = string(sval)
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)
911
-
maj, extra, err = cr.ReadHeader()
930
+
// t.LexiconTypeID (string) (string)
917
-
return fmt.Errorf("t.ByEmail: array too large (%d)", extra)
934
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
939
+
t.LexiconTypeID = string(sval)
941
+
// t.NewSha (string) (string)
920
-
if maj != cbg.MajArray {
921
-
return fmt.Errorf("expected cbor array")
945
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
950
+
t.NewSha = string(sval)
952
+
// t.OldSha (string) (string)
925
-
t.ByEmail = make([]*GitRefUpdate_Meta_CommitCount_ByEmail_Elem, extra)
956
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
961
+
t.OldSha = string(sval)
963
+
// t.RepoDid (string) (string)
928
-
for i := 0; i < int(extra); i++ {
967
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
972
+
t.RepoDid = string(sval)
974
+
// t.RepoName (string) (string)
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)
978
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
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)
···
1104
-
func (t *GitRefUpdate) MarshalCBOR(w io.Writer) error {
1143
+
func (t *GitRefUpdate_Meta_CommitCount) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
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")
1152
+
if t.ByEmail == nil {
1121
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
1124
-
if _, err := cw.WriteString(string("ref")); err != nil {
1156
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
1128
-
if len(t.Ref) > 1000000 {
1129
-
return xerrors.Errorf("Value in field t.Ref was too long")
1160
+
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
1161
+
if t.ByEmail != nil {
1132
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
1135
-
if _, err := cw.WriteString(string(t.Ref)); err != nil {
1163
+
if len("byEmail") > 1000000 {
1164
+
return xerrors.Errorf("Value in field \"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")
1167
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("byEmail"))); err != nil {
1170
+
if _, err := cw.WriteString(string("byEmail")); err != nil {
1144
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("meta"))); err != nil {
1147
-
if _, err := cw.WriteString(string("meta")); err != nil {
1174
+
if len(t.ByEmail) > 8192 {
1175
+
return xerrors.Errorf("Slice value in field t.ByEmail was too long")
1151
-
if err := t.Meta.MarshalCBOR(cw); err != nil {
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 {
1155
-
// t.LexiconTypeID (string) (string)
1156
-
if len("$type") > 1000000 {
1157
-
return xerrors.Errorf("Value in field \"$type\" was too long")
1191
+
func (t *GitRefUpdate_Meta_CommitCount) UnmarshalCBOR(r io.Reader) (err error) {
1192
+
*t = GitRefUpdate_Meta_CommitCount{}
1160
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
1163
-
if _, err := cw.WriteString(string("$type")); err != nil {
1194
+
cr := cbg.NewCborReader(r)
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 {
1196
+
maj, extra, err := cr.ReadHeader()
1201
+
if err == io.EOF {
1202
+
err = io.ErrUnexpectedEOF
1174
-
// t.NewSha (string) (string)
1175
-
if len("newSha") > 1000000 {
1176
-
return xerrors.Errorf("Value in field \"newSha\" was too long")
1206
+
if maj != cbg.MajMap {
1207
+
return fmt.Errorf("cbor input should be of type map")
1179
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
1182
-
if _, err := cw.WriteString(string("newSha")); err != nil {
1210
+
if extra > cbg.MaxLength {
1211
+
return fmt.Errorf("GitRefUpdate_Meta_CommitCount: map struct too large (%d)", extra)
1186
-
if len(t.NewSha) > 1000000 {
1187
-
return xerrors.Errorf("Value in field t.NewSha was too long")
1190
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
1193
-
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
1216
+
nameBuf := make([]byte, 7)
1217
+
for i := uint64(0); i < n; i++ {
1218
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
1197
-
// t.OldSha (string) (string)
1198
-
if len("oldSha") > 1000000 {
1199
-
return xerrors.Errorf("Value in field \"oldSha\" was too long")
1224
+
// Field doesn't exist on this type, so ignore it
1225
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
1202
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
1205
-
if _, err := cw.WriteString(string("oldSha")); err != nil {
1231
+
switch string(nameBuf[:nameLen]) {
1232
+
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
1209
-
if len(t.OldSha) > 1000000 {
1210
-
return xerrors.Errorf("Value in field t.OldSha was too long")
1235
+
maj, extra, err = cr.ReadHeader()
1213
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
1216
-
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
1241
+
return fmt.Errorf("t.ByEmail: array too large (%d)", extra)
1220
-
// t.RepoDid (string) (string)
1221
-
if len("repoDid") > 1000000 {
1222
-
return xerrors.Errorf("Value in field \"repoDid\" was too long")
1244
+
if maj != cbg.MajArray {
1245
+
return fmt.Errorf("expected cbor array")
1225
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoDid"))); err != nil {
1228
-
if _, err := cw.WriteString(string("repoDid")); err != nil {
1249
+
t.ByEmail = make([]*GitRefUpdate_Meta_CommitCount_ByEmail_Elem, extra)
1232
-
if len(t.RepoDid) > 1000000 {
1233
-
return xerrors.Errorf("Value in field t.RepoDid was too long")
1252
+
for i := 0; i < int(extra); i++ {
1236
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoDid))); err != nil {
1239
-
if _, err := cw.WriteString(string(t.RepoDid)); err != nil {
1243
-
// t.RepoName (string) (string)
1244
-
if len("repoName") > 1000000 {
1245
-
return xerrors.Errorf("Value in field \"repoName\" was too long")
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 {
1248
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoName"))); err != nil {
1292
+
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) MarshalCBOR(w io.Writer) error {
1294
+
_, err := w.Write(cbg.CborNull)
1251
-
if _, err := cw.WriteString(string("repoName")); err != nil {
1298
+
cw := cbg.NewCborWriter(w)
1300
+
if _, err := cw.Write([]byte{162}); err != nil {
1255
-
if len(t.RepoName) > 1000000 {
1256
-
return xerrors.Errorf("Value in field t.RepoName was too long")
1304
+
// t.Count (int64) (int64)
1305
+
if len("count") > 1000000 {
1306
+
return xerrors.Errorf("Value in field \"count\" was too long")
1259
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoName))); err != nil {
1309
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("count"))); err != nil {
1262
-
if _, err := cw.WriteString(string(t.RepoName)); err != nil {
1312
+
if _, err := cw.WriteString(string("count")); err != nil {
1266
-
// t.CommitterDid (string) (string)
1267
-
if len("committerDid") > 1000000 {
1268
-
return xerrors.Errorf("Value in field \"committerDid\" was too long")
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 {
1326
+
// t.Email (string) (string)
1327
+
if len("email") > 1000000 {
1328
+
return xerrors.Errorf("Value in field \"email\" was too long")
1271
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("committerDid"))); err != nil {
1331
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("email"))); err != nil {
1274
-
if _, err := cw.WriteString(string("committerDid")); err != nil {
1334
+
if _, err := cw.WriteString(string("email")); err != nil {
1278
-
if len(t.CommitterDid) > 1000000 {
1279
-
return xerrors.Errorf("Value in field t.CommitterDid was too long")
1338
+
if len(t.Email) > 1000000 {
1339
+
return xerrors.Errorf("Value in field t.Email was too long")
1282
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CommitterDid))); err != nil {
1342
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Email))); err != nil {
1285
-
if _, err := cw.WriteString(string(t.CommitterDid)); err != nil {
1345
+
if _, err := cw.WriteString(string(t.Email)); err != nil {
1291
-
func (t *GitRefUpdate) UnmarshalCBOR(r io.Reader) (err error) {
1292
-
*t = GitRefUpdate{}
1351
+
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) UnmarshalCBOR(r io.Reader) (err error) {
1352
+
*t = GitRefUpdate_Meta_CommitCount_ByEmail_Elem{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
1311
-
return fmt.Errorf("GitRefUpdate: map struct too large (%d)", extra)
1371
+
return fmt.Errorf("GitRefUpdate_Meta_CommitCount_ByEmail_Elem: map struct too large (%d)", extra)
1316
-
nameBuf := make([]byte, 12)
1376
+
nameBuf := make([]byte, 5)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
1332
-
// t.Ref (string) (string)
1392
+
// t.Count (int64) (int64)
1336
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1395
+
maj, extra, err := cr.ReadHeader()
1341
-
t.Ref = string(sval)
1343
-
// t.Meta (tangled.GitRefUpdate_Meta) (struct)
1348
-
b, err := cr.ReadByte()
1352
-
if b != cbg.CborNull[0] {
1353
-
if err := cr.UnreadByte(); err != nil {
1401
+
case cbg.MajUnsignedInt:
1402
+
extraI = int64(extra)
1404
+
return fmt.Errorf("int64 positive 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)
1406
+
case cbg.MajNegativeInt:
1407
+
extraI = int64(extra)
1409
+
return fmt.Errorf("int64 negative overflow")
1411
+
extraI = -1 - extraI
1413
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
1416
+
t.Count = int64(extraI)
1363
-
// t.LexiconTypeID (string) (string)
1418
+
// t.Email (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
1372
-
t.LexiconTypeID = string(sval)
1374
-
// t.NewSha (string) (string)
1378
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1383
-
t.NewSha = string(sval)
1385
-
// t.OldSha (string) (string)
1389
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
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)
1427
+
t.Email = string(sval)
···
1802
-
func (t *PipelineStatus) MarshalCBOR(w io.Writer) error {
1802
+
func (t *Pipeline) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
1811
-
if t.Error == nil {
1815
-
if t.ExitCode == nil {
1819
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
1810
+
if _, err := cw.Write([]byte{163}); err != nil {
···
1835
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline.status"))); err != nil {
1826
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline"))); err != nil {
1838
-
if _, err := cw.WriteString(string("sh.tangled.pipeline.status")); err != nil {
1829
+
if _, err := cw.WriteString(string("sh.tangled.pipeline")); err != nil {
1842
-
// t.Error (string) (string)
1843
-
if t.Error != nil {
1845
-
if len("error") > 1000000 {
1846
-
return xerrors.Errorf("Value in field \"error\" was too long")
1849
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("error"))); err != nil {
1852
-
if _, err := cw.WriteString(string("error")); err != nil {
1856
-
if t.Error == nil {
1857
-
if _, err := cw.Write(cbg.CborNull); err != nil {
1861
-
if len(*t.Error) > 1000000 {
1862
-
return xerrors.Errorf("Value in field t.Error was too long")
1865
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Error))); err != nil {
1868
-
if _, err := cw.WriteString(string(*t.Error)); err != nil {
1874
-
// t.Status (string) (string)
1875
-
if len("status") > 1000000 {
1876
-
return xerrors.Errorf("Value in field \"status\" was too long")
1833
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
1834
+
if len("workflows") > 1000000 {
1835
+
return xerrors.Errorf("Value in field \"workflows\" was too long")
1879
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
1838
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflows"))); err != nil {
1882
-
if _, err := cw.WriteString(string("status")); err != nil {
1841
+
if _, err := cw.WriteString(string("workflows")); err != nil {
1886
-
if len(t.Status) > 1000000 {
1887
-
return xerrors.Errorf("Value in field t.Status was too long")
1845
+
if len(t.Workflows) > 8192 {
1846
+
return xerrors.Errorf("Slice value in field t.Workflows was too long")
1890
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
1893
-
if _, err := cw.WriteString(string(t.Status)); err != nil {
1849
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Workflows))); err != nil {
1897
-
// t.ExitCode (int64) (int64)
1898
-
if t.ExitCode != nil {
1900
-
if len("exitCode") > 1000000 {
1901
-
return xerrors.Errorf("Value in field \"exitCode\" was too long")
1904
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("exitCode"))); err != nil {
1907
-
if _, err := cw.WriteString(string("exitCode")); err != nil {
1852
+
for _, v := range t.Workflows {
1853
+
if err := v.MarshalCBOR(cw); err != nil {
1911
-
if t.ExitCode == nil {
1912
-
if _, err := cw.Write(cbg.CborNull); err != nil {
1916
-
if *t.ExitCode >= 0 {
1917
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.ExitCode)); err != nil {
1921
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-*t.ExitCode-1)); err != nil {
1929
-
// t.Pipeline (string) (string)
1930
-
if len("pipeline") > 1000000 {
1931
-
return xerrors.Errorf("Value in field \"pipeline\" was too long")
1934
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pipeline"))); err != nil {
1937
-
if _, err := cw.WriteString(string("pipeline")); err != nil {
1941
-
if len(t.Pipeline) > 1000000 {
1942
-
return xerrors.Errorf("Value in field t.Pipeline was too long")
1945
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pipeline))); err != nil {
1948
-
if _, err := cw.WriteString(string(t.Pipeline)); err != nil {
1952
-
// t.Workflow (string) (string)
1953
-
if len("workflow") > 1000000 {
1954
-
return xerrors.Errorf("Value in field \"workflow\" was too long")
1957
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflow"))); err != nil {
1960
-
if _, err := cw.WriteString(string("workflow")); err != nil {
1964
-
if len(t.Workflow) > 1000000 {
1965
-
return xerrors.Errorf("Value in field t.Workflow was too long")
1968
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Workflow))); err != nil {
1971
-
if _, err := cw.WriteString(string(t.Workflow)); err != nil {
1975
-
// t.CreatedAt (string) (string)
1976
-
if len("createdAt") > 1000000 {
1977
-
return xerrors.Errorf("Value in field \"createdAt\" was too long")
1859
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
1860
+
if len("triggerMetadata") > 1000000 {
1861
+
return xerrors.Errorf("Value in field \"triggerMetadata\" was too long")
1980
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
1864
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("triggerMetadata"))); err != nil {
1983
-
if _, err := cw.WriteString(string("createdAt")); err != nil {
1867
+
if _, err := cw.WriteString(string("triggerMetadata")); err != nil {
1987
-
if len(t.CreatedAt) > 1000000 {
1988
-
return xerrors.Errorf("Value in field t.CreatedAt was too long")
1991
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
1994
-
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
1871
+
if err := t.TriggerMetadata.MarshalCBOR(cw); err != nil {
2000
-
func (t *PipelineStatus) UnmarshalCBOR(r io.Reader) (err error) {
2001
-
*t = PipelineStatus{}
1877
+
func (t *Pipeline) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2020
-
return fmt.Errorf("PipelineStatus: map struct too large (%d)", extra)
1897
+
return fmt.Errorf("Pipeline: map struct too large (%d)", extra)
2025
-
nameBuf := make([]byte, 9)
1902
+
nameBuf := make([]byte, 15)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
t.LexiconTypeID = string(sval)
2052
-
// t.Error (string) (string)
1929
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
1932
+
maj, extra, err = cr.ReadHeader()
2056
-
b, err := cr.ReadByte()
2060
-
if b != cbg.CborNull[0] {
2061
-
if err := cr.UnreadByte(); err != nil {
1938
+
return fmt.Errorf("t.Workflows: array too large (%d)", extra)
2065
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1941
+
if maj != cbg.MajArray {
1942
+
return fmt.Errorf("expected cbor array")
2070
-
t.Error = (*string)(&sval)
1946
+
t.Workflows = make([]*Pipeline_Workflow, extra)
2073
-
// t.Status (string) (string)
2077
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1949
+
for i := 0; i < int(extra); i++ {
2082
-
t.Status = string(sval)
2084
-
// t.ExitCode (int64) (int64)
2088
-
b, err := cr.ReadByte()
2092
-
if b != cbg.CborNull[0] {
2093
-
if err := cr.UnreadByte(); err != nil {
2096
-
maj, extra, err := cr.ReadHeader()
2102
-
case cbg.MajUnsignedInt:
2103
-
extraI = int64(extra)
2105
-
return fmt.Errorf("int64 positive overflow")
1960
+
b, err := cr.ReadByte()
2107
-
case cbg.MajNegativeInt:
2108
-
extraI = int64(extra)
2110
-
return fmt.Errorf("int64 negative overflow")
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)
2112
-
extraI = -1 - extraI
2114
-
return fmt.Errorf("wrong type for int64 field: %d", maj)
2117
-
t.ExitCode = (*int64)(&extraI)
2120
-
// t.Pipeline (string) (string)
1978
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
1979
+
case "triggerMetadata":
2124
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2129
-
t.Pipeline = string(sval)
2131
-
// t.Workflow (string) (string)
2135
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
1983
+
b, err := cr.ReadByte()
2140
-
t.Workflow = string(sval)
2142
-
// t.CreatedAt (string) (string)
2146
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
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)
2151
-
t.CreatedAt = string(sval)
···
2519
-
func (t *Pipeline_ManualTriggerData_Inputs_Elem) MarshalCBOR(w io.Writer) error {
2364
+
func (t *Pipeline_ManualTriggerData) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
2527
-
if _, err := cw.Write([]byte{162}); err != nil {
2531
-
// t.Key (string) (string)
2532
-
if len("key") > 1000000 {
2533
-
return xerrors.Errorf("Value in field \"key\" was too long")
2373
+
if t.Inputs == nil {
2536
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
2539
-
if _, err := cw.WriteString(string("key")); err != nil {
2377
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
2543
-
if len(t.Key) > 1000000 {
2544
-
return xerrors.Errorf("Value in field t.Key was too long")
2381
+
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2382
+
if t.Inputs != nil {
2547
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
2550
-
if _, err := cw.WriteString(string(t.Key)); err != nil {
2384
+
if len("inputs") > 1000000 {
2385
+
return xerrors.Errorf("Value in field \"inputs\" was too long")
2554
-
// t.Value (string) (string)
2555
-
if len("value") > 1000000 {
2556
-
return xerrors.Errorf("Value in field \"value\" was too long")
2388
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("inputs"))); err != nil {
2391
+
if _, err := cw.WriteString(string("inputs")); err != nil {
2559
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
2562
-
if _, err := cw.WriteString(string("value")); err != nil {
2395
+
if len(t.Inputs) > 8192 {
2396
+
return xerrors.Errorf("Slice value in field t.Inputs was too long")
2566
-
if len(t.Value) > 1000000 {
2567
-
return xerrors.Errorf("Value in field t.Value was too long")
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 {
2570
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
2573
-
if _, err := cw.WriteString(string(t.Value)); err != nil {
2579
-
func (t *Pipeline_ManualTriggerData_Inputs_Elem) UnmarshalCBOR(r io.Reader) (err error) {
2580
-
*t = Pipeline_ManualTriggerData_Inputs_Elem{}
2412
+
func (t *Pipeline_ManualTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
2413
+
*t = Pipeline_ManualTriggerData{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2599
-
return fmt.Errorf("Pipeline_ManualTriggerData_Inputs_Elem: map struct too large (%d)", extra)
2432
+
return fmt.Errorf("Pipeline_ManualTriggerData: map struct too large (%d)", extra)
2604
-
nameBuf := make([]byte, 5)
2437
+
nameBuf := make([]byte, 6)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
2620
-
// t.Key (string) (string)
2453
+
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2624
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2456
+
maj, extra, err = cr.ReadHeader()
2629
-
t.Key = string(sval)
2462
+
return fmt.Errorf("t.Inputs: array too large (%d)", extra)
2465
+
if maj != cbg.MajArray {
2466
+
return fmt.Errorf("expected cbor array")
2470
+
t.Inputs = make([]*Pipeline_ManualTriggerData_Inputs_Elem, extra)
2631
-
// t.Value (string) (string)
2473
+
for i := 0; i < int(extra); i++ {
2635
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
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)
2640
-
t.Value = string(sval)
···
2653
-
func (t *Pipeline_ManualTriggerData) MarshalCBOR(w io.Writer) error {
2513
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
2662
-
if t.Inputs == nil {
2521
+
if _, err := cw.Write([]byte{162}); err != nil {
2666
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
2525
+
// t.Key (string) (string)
2526
+
if len("key") > 1000000 {
2527
+
return xerrors.Errorf("Value in field \"key\" was too long")
2530
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
2533
+
if _, err := cw.WriteString(string("key")); err != nil {
2670
-
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2671
-
if t.Inputs != nil {
2537
+
if len(t.Key) > 1000000 {
2538
+
return xerrors.Errorf("Value in field t.Key was too long")
2673
-
if len("inputs") > 1000000 {
2674
-
return xerrors.Errorf("Value in field \"inputs\" was too long")
2541
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
2544
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
2677
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("inputs"))); err != nil {
2680
-
if _, err := cw.WriteString(string("inputs")); err != nil {
2548
+
// t.Value (string) (string)
2549
+
if len("value") > 1000000 {
2550
+
return xerrors.Errorf("Value in field \"value\" was too long")
2684
-
if len(t.Inputs) > 8192 {
2685
-
return xerrors.Errorf("Slice value in field t.Inputs was too long")
2553
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
2556
+
if _, err := cw.WriteString(string("value")); err != nil {
2688
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Inputs))); err != nil {
2691
-
for _, v := range t.Inputs {
2692
-
if err := v.MarshalCBOR(cw); err != nil {
2560
+
if len(t.Value) > 1000000 {
2561
+
return xerrors.Errorf("Value in field t.Value was too long")
2564
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
2567
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
2701
-
func (t *Pipeline_ManualTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
2702
-
*t = Pipeline_ManualTriggerData{}
2573
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) UnmarshalCBOR(r io.Reader) (err error) {
2574
+
*t = Pipeline_ManualTriggerData_Inputs_Elem{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
2721
-
return fmt.Errorf("Pipeline_ManualTriggerData: map struct too large (%d)", extra)
2593
+
return fmt.Errorf("Pipeline_ManualTriggerData_Inputs_Elem: map struct too large (%d)", extra)
2726
-
nameBuf := make([]byte, 6)
2598
+
nameBuf := make([]byte, 5)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
2742
-
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
2614
+
// t.Key (string) (string)
2745
-
maj, extra, err = cr.ReadHeader()
2751
-
return fmt.Errorf("t.Inputs: array too large (%d)", extra)
2754
-
if maj != cbg.MajArray {
2755
-
return fmt.Errorf("expected cbor array")
2618
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2759
-
t.Inputs = make([]*Pipeline_ManualTriggerData_Inputs_Elem, extra)
2623
+
t.Key = string(sval)
2625
+
// t.Value (string) (string)
2762
-
for i := 0; i < int(extra); i++ {
2629
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
2773
-
b, err := cr.ReadByte()
2777
-
if b != cbg.CborNull[0] {
2778
-
if err := cr.UnreadByte(); err != nil {
2781
-
t.Inputs[i] = new(Pipeline_ManualTriggerData_Inputs_Elem)
2782
-
if err := t.Inputs[i].UnmarshalCBOR(cr); err != nil {
2783
-
return xerrors.Errorf("unmarshaling t.Inputs[i] pointer: %w", err)
2634
+
t.Value = string(sval)
···
3017
+
func (t *PipelineStatus) MarshalCBOR(w io.Writer) error {
3019
+
_, err := w.Write(cbg.CborNull)
3023
+
cw := cbg.NewCborWriter(w)
3026
+
if t.Error == nil {
3030
+
if t.ExitCode == nil {
3034
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
3038
+
// t.LexiconTypeID (string) (string)
3039
+
if len("$type") > 1000000 {
3040
+
return xerrors.Errorf("Value in field \"$type\" was too long")
3043
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
3046
+
if _, err := cw.WriteString(string("$type")); err != nil {
3050
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline.status"))); err != nil {
3053
+
if _, err := cw.WriteString(string("sh.tangled.pipeline.status")); err != nil {
3057
+
// t.Error (string) (string)
3058
+
if t.Error != nil {
3060
+
if len("error") > 1000000 {
3061
+
return xerrors.Errorf("Value in field \"error\" was too long")
3064
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("error"))); err != nil {
3067
+
if _, err := cw.WriteString(string("error")); err != nil {
3071
+
if t.Error == nil {
3072
+
if _, err := cw.Write(cbg.CborNull); err != nil {
3076
+
if len(*t.Error) > 1000000 {
3077
+
return xerrors.Errorf("Value in field t.Error was too long")
3080
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Error))); err != nil {
3083
+
if _, err := cw.WriteString(string(*t.Error)); err != nil {
3089
+
// t.Status (string) (string)
3090
+
if len("status") > 1000000 {
3091
+
return xerrors.Errorf("Value in field \"status\" was too long")
3094
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
3097
+
if _, err := cw.WriteString(string("status")); err != nil {
3101
+
if len(t.Status) > 1000000 {
3102
+
return xerrors.Errorf("Value in field t.Status was too long")
3105
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
3108
+
if _, err := cw.WriteString(string(t.Status)); err != nil {
3112
+
// t.ExitCode (int64) (int64)
3113
+
if t.ExitCode != nil {
3115
+
if len("exitCode") > 1000000 {
3116
+
return xerrors.Errorf("Value in field \"exitCode\" was too long")
3119
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("exitCode"))); err != nil {
3122
+
if _, err := cw.WriteString(string("exitCode")); err != nil {
3126
+
if t.ExitCode == nil {
3127
+
if _, err := cw.Write(cbg.CborNull); err != nil {
3131
+
if *t.ExitCode >= 0 {
3132
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.ExitCode)); err != nil {
3136
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-*t.ExitCode-1)); err != nil {
3144
+
// t.Pipeline (string) (string)
3145
+
if len("pipeline") > 1000000 {
3146
+
return xerrors.Errorf("Value in field \"pipeline\" was too long")
3149
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pipeline"))); err != nil {
3152
+
if _, err := cw.WriteString(string("pipeline")); err != nil {
3156
+
if len(t.Pipeline) > 1000000 {
3157
+
return xerrors.Errorf("Value in field t.Pipeline was too long")
3160
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pipeline))); err != nil {
3163
+
if _, err := cw.WriteString(string(t.Pipeline)); err != nil {
3167
+
// t.Workflow (string) (string)
3168
+
if len("workflow") > 1000000 {
3169
+
return xerrors.Errorf("Value in field \"workflow\" was too long")
3172
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflow"))); err != nil {
3175
+
if _, err := cw.WriteString(string("workflow")); err != nil {
3179
+
if len(t.Workflow) > 1000000 {
3180
+
return xerrors.Errorf("Value in field t.Workflow was too long")
3183
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Workflow))); err != nil {
3186
+
if _, err := cw.WriteString(string(t.Workflow)); err != nil {
3190
+
// t.CreatedAt (string) (string)
3191
+
if len("createdAt") > 1000000 {
3192
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
3195
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
3198
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
3202
+
if len(t.CreatedAt) > 1000000 {
3203
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
3206
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
3209
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
3215
+
func (t *PipelineStatus) UnmarshalCBOR(r io.Reader) (err error) {
3216
+
*t = PipelineStatus{}
3218
+
cr := cbg.NewCborReader(r)
3220
+
maj, extra, err := cr.ReadHeader()
3225
+
if err == io.EOF {
3226
+
err = io.ErrUnexpectedEOF
3230
+
if maj != cbg.MajMap {
3231
+
return fmt.Errorf("cbor input should be of type map")
3234
+
if extra > cbg.MaxLength {
3235
+
return fmt.Errorf("PipelineStatus: map struct too large (%d)", extra)
3240
+
nameBuf := make([]byte, 9)
3241
+
for i := uint64(0); i < n; i++ {
3242
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
3248
+
// Field doesn't exist on this type, so ignore it
3249
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
3255
+
switch string(nameBuf[:nameLen]) {
3256
+
// t.LexiconTypeID (string) (string)
3260
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3265
+
t.LexiconTypeID = string(sval)
3267
+
// t.Error (string) (string)
3271
+
b, err := cr.ReadByte()
3275
+
if b != cbg.CborNull[0] {
3276
+
if err := cr.UnreadByte(); err != nil {
3280
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3285
+
t.Error = (*string)(&sval)
3288
+
// t.Status (string) (string)
3292
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3297
+
t.Status = string(sval)
3299
+
// t.ExitCode (int64) (int64)
3303
+
b, err := cr.ReadByte()
3307
+
if b != cbg.CborNull[0] {
3308
+
if err := cr.UnreadByte(); err != nil {
3311
+
maj, extra, err := cr.ReadHeader()
3317
+
case cbg.MajUnsignedInt:
3318
+
extraI = int64(extra)
3320
+
return fmt.Errorf("int64 positive overflow")
3322
+
case cbg.MajNegativeInt:
3323
+
extraI = int64(extra)
3325
+
return fmt.Errorf("int64 negative overflow")
3327
+
extraI = -1 - extraI
3329
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
3332
+
t.ExitCode = (*int64)(&extraI)
3335
+
// t.Pipeline (string) (string)
3339
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3344
+
t.Pipeline = string(sval)
3346
+
// t.Workflow (string) (string)
3350
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3355
+
t.Workflow = string(sval)
3357
+
// t.CreatedAt (string) (string)
3361
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3366
+
t.CreatedAt = string(sval)
3370
+
// Field doesn't exist on this type, so ignore it
3371
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *Pipeline_Step) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
3774
-
func (t *Pipeline_Workflow_Environment_Elem) MarshalCBOR(w io.Writer) error {
3776
-
_, err := w.Write(cbg.CborNull)
3780
-
cw := cbg.NewCborWriter(w)
3782
-
if _, err := cw.Write([]byte{162}); err != nil {
3786
-
// t.Key (string) (string)
3787
-
if len("key") > 1000000 {
3788
-
return xerrors.Errorf("Value in field \"key\" was too long")
3791
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
3794
-
if _, err := cw.WriteString(string("key")); err != nil {
3798
-
if len(t.Key) > 1000000 {
3799
-
return xerrors.Errorf("Value in field t.Key was too long")
3802
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
3805
-
if _, err := cw.WriteString(string(t.Key)); err != nil {
3809
-
// t.Value (string) (string)
3810
-
if len("value") > 1000000 {
3811
-
return xerrors.Errorf("Value in field \"value\" was too long")
3814
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
3817
-
if _, err := cw.WriteString(string("value")); err != nil {
3821
-
if len(t.Value) > 1000000 {
3822
-
return xerrors.Errorf("Value in field t.Value was too long")
3825
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
3828
-
if _, err := cw.WriteString(string(t.Value)); err != nil {
3834
-
func (t *Pipeline_Workflow_Environment_Elem) UnmarshalCBOR(r io.Reader) (err error) {
3835
-
*t = Pipeline_Workflow_Environment_Elem{}
3837
-
cr := cbg.NewCborReader(r)
3839
-
maj, extra, err := cr.ReadHeader()
3844
-
if err == io.EOF {
3845
-
err = io.ErrUnexpectedEOF
3849
-
if maj != cbg.MajMap {
3850
-
return fmt.Errorf("cbor input should be of type map")
3853
-
if extra > cbg.MaxLength {
3854
-
return fmt.Errorf("Pipeline_Workflow_Environment_Elem: map struct too large (%d)", extra)
3859
-
nameBuf := make([]byte, 5)
3860
-
for i := uint64(0); i < n; i++ {
3861
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
3867
-
// Field doesn't exist on this type, so ignore it
3868
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
3874
-
switch string(nameBuf[:nameLen]) {
3875
-
// t.Key (string) (string)
3879
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3884
-
t.Key = string(sval)
3886
-
// t.Value (string) (string)
3890
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
3895
-
t.Value = string(sval)
3899
-
// Field doesn't exist on this type, so ignore it
3900
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *Pipeline_Workflow) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
4259
-
func (t *Pipeline) MarshalCBOR(w io.Writer) error {
4332
+
func (t *Pipeline_Workflow_Environment_Elem) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
4267
-
if _, err := cw.Write([]byte{163}); err != nil {
4340
+
if _, err := cw.Write([]byte{162}); 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 {
4344
+
// t.Key (string) (string)
4345
+
if len("key") > 1000000 {
4346
+
return xerrors.Errorf("Value in field \"key\" was too long")
4283
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline"))); err != nil {
4349
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
4286
-
if _, err := cw.WriteString(string("sh.tangled.pipeline")); err != nil {
4352
+
if _, err := cw.WriteString(string("key")); err != nil {
4290
-
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
4291
-
if len("workflows") > 1000000 {
4292
-
return xerrors.Errorf("Value in field \"workflows\" was too long")
4356
+
if len(t.Key) > 1000000 {
4357
+
return xerrors.Errorf("Value in field t.Key was too long")
4295
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflows"))); err != nil {
4360
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
4298
-
if _, err := cw.WriteString(string("workflows")); err != nil {
4363
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
4302
-
if len(t.Workflows) > 8192 {
4303
-
return xerrors.Errorf("Slice value in field t.Workflows was too long")
4367
+
// t.Value (string) (string)
4368
+
if len("value") > 1000000 {
4369
+
return xerrors.Errorf("Value in field \"value\" was too long")
4306
-
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Workflows))); err != nil {
4372
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
4309
-
for _, v := range t.Workflows {
4310
-
if err := v.MarshalCBOR(cw); err != nil {
4375
+
if _, err := cw.WriteString(string("value")); err != nil {
4316
-
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
4317
-
if len("triggerMetadata") > 1000000 {
4318
-
return xerrors.Errorf("Value in field \"triggerMetadata\" was too long")
4379
+
if len(t.Value) > 1000000 {
4380
+
return xerrors.Errorf("Value in field t.Value was too long")
4321
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("triggerMetadata"))); err != nil {
4383
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
4324
-
if _, err := cw.WriteString(string("triggerMetadata")); err != nil {
4328
-
if err := t.TriggerMetadata.MarshalCBOR(cw); err != nil {
4386
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
4334
-
func (t *Pipeline) UnmarshalCBOR(r io.Reader) (err error) {
4392
+
func (t *Pipeline_Workflow_Environment_Elem) UnmarshalCBOR(r io.Reader) (err error) {
4393
+
*t = Pipeline_Workflow_Environment_Elem{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
4354
-
return fmt.Errorf("Pipeline: map struct too large (%d)", extra)
4412
+
return fmt.Errorf("Pipeline_Workflow_Environment_Elem: map struct too large (%d)", extra)
4359
-
nameBuf := make([]byte, 15)
4417
+
nameBuf := make([]byte, 5)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
4375
-
// t.LexiconTypeID (string) (string)
4433
+
// t.Key (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
4384
-
t.LexiconTypeID = string(sval)
4386
-
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
4389
-
maj, extra, err = cr.ReadHeader()
4442
+
t.Key = string(sval)
4395
-
return fmt.Errorf("t.Workflows: array too large (%d)", extra)
4398
-
if maj != cbg.MajArray {
4399
-
return fmt.Errorf("expected cbor array")
4403
-
t.Workflows = make([]*Pipeline_Workflow, extra)
4406
-
for i := 0; i < int(extra); i++ {
4417
-
b, err := cr.ReadByte()
4421
-
if b != cbg.CborNull[0] {
4422
-
if err := cr.UnreadByte(); err != nil {
4425
-
t.Workflows[i] = new(Pipeline_Workflow)
4426
-
if err := t.Workflows[i].UnmarshalCBOR(cr); err != nil {
4427
-
return xerrors.Errorf("unmarshaling t.Workflows[i] pointer: %w", err)
4435
-
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
4436
-
case "triggerMetadata":
4444
+
// t.Value (string) (string)
4440
-
b, err := cr.ReadByte()
4448
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4444
-
if b != cbg.CborNull[0] {
4445
-
if err := cr.UnreadByte(); err != nil {
4448
-
t.TriggerMetadata = new(Pipeline_TriggerMetadata)
4449
-
if err := t.TriggerMetadata.UnmarshalCBOR(cr); err != nil {
4450
-
return xerrors.Errorf("unmarshaling t.TriggerMetadata pointer: %w", err)
4453
+
t.Value = string(sval)
···
4664
+
func (t *Repo) MarshalCBOR(w io.Writer) error {
4666
+
_, err := w.Write(cbg.CborNull)
4670
+
cw := cbg.NewCborWriter(w)
4673
+
if t.Description == nil {
4677
+
if t.Source == nil {
4681
+
if t.Spindle == nil {
4685
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
4689
+
// t.Knot (string) (string)
4690
+
if len("knot") > 1000000 {
4691
+
return xerrors.Errorf("Value in field \"knot\" was too long")
4694
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("knot"))); err != nil {
4697
+
if _, err := cw.WriteString(string("knot")); err != nil {
4701
+
if len(t.Knot) > 1000000 {
4702
+
return xerrors.Errorf("Value in field t.Knot was too long")
4705
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Knot))); err != nil {
4708
+
if _, err := cw.WriteString(string(t.Knot)); err != nil {
4712
+
// t.Name (string) (string)
4713
+
if len("name") > 1000000 {
4714
+
return xerrors.Errorf("Value in field \"name\" was too long")
4717
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
4720
+
if _, err := cw.WriteString(string("name")); err != nil {
4724
+
if len(t.Name) > 1000000 {
4725
+
return xerrors.Errorf("Value in field t.Name was too long")
4728
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
4731
+
if _, err := cw.WriteString(string(t.Name)); err != nil {
4735
+
// t.LexiconTypeID (string) (string)
4736
+
if len("$type") > 1000000 {
4737
+
return xerrors.Errorf("Value in field \"$type\" was too long")
4740
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
4743
+
if _, err := cw.WriteString(string("$type")); err != nil {
4747
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo"))); err != nil {
4750
+
if _, err := cw.WriteString(string("sh.tangled.repo")); err != nil {
4754
+
// t.Owner (string) (string)
4755
+
if len("owner") > 1000000 {
4756
+
return xerrors.Errorf("Value in field \"owner\" was too long")
4759
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
4762
+
if _, err := cw.WriteString(string("owner")); err != nil {
4766
+
if len(t.Owner) > 1000000 {
4767
+
return xerrors.Errorf("Value in field t.Owner was too long")
4770
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
4773
+
if _, err := cw.WriteString(string(t.Owner)); err != nil {
4777
+
// t.Source (string) (string)
4778
+
if t.Source != nil {
4780
+
if len("source") > 1000000 {
4781
+
return xerrors.Errorf("Value in field \"source\" was too long")
4784
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
4787
+
if _, err := cw.WriteString(string("source")); err != nil {
4791
+
if t.Source == nil {
4792
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4796
+
if len(*t.Source) > 1000000 {
4797
+
return xerrors.Errorf("Value in field t.Source was too long")
4800
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Source))); err != nil {
4803
+
if _, err := cw.WriteString(string(*t.Source)); err != nil {
4809
+
// t.Spindle (string) (string)
4810
+
if t.Spindle != nil {
4812
+
if len("spindle") > 1000000 {
4813
+
return xerrors.Errorf("Value in field \"spindle\" was too long")
4816
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("spindle"))); err != nil {
4819
+
if _, err := cw.WriteString(string("spindle")); err != nil {
4823
+
if t.Spindle == nil {
4824
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4828
+
if len(*t.Spindle) > 1000000 {
4829
+
return xerrors.Errorf("Value in field t.Spindle was too long")
4832
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Spindle))); err != nil {
4835
+
if _, err := cw.WriteString(string(*t.Spindle)); err != nil {
4841
+
// t.CreatedAt (string) (string)
4842
+
if len("createdAt") > 1000000 {
4843
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
4846
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
4849
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
4853
+
if len(t.CreatedAt) > 1000000 {
4854
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
4857
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
4860
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
4864
+
// t.Description (string) (string)
4865
+
if t.Description != nil {
4867
+
if len("description") > 1000000 {
4868
+
return xerrors.Errorf("Value in field \"description\" was too long")
4871
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("description"))); err != nil {
4874
+
if _, err := cw.WriteString(string("description")); err != nil {
4878
+
if t.Description == nil {
4879
+
if _, err := cw.Write(cbg.CborNull); err != nil {
4883
+
if len(*t.Description) > 1000000 {
4884
+
return xerrors.Errorf("Value in field t.Description was too long")
4887
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Description))); err != nil {
4890
+
if _, err := cw.WriteString(string(*t.Description)); err != nil {
4898
+
func (t *Repo) UnmarshalCBOR(r io.Reader) (err error) {
4901
+
cr := cbg.NewCborReader(r)
4903
+
maj, extra, err := cr.ReadHeader()
4908
+
if err == io.EOF {
4909
+
err = io.ErrUnexpectedEOF
4913
+
if maj != cbg.MajMap {
4914
+
return fmt.Errorf("cbor input should be of type map")
4917
+
if extra > cbg.MaxLength {
4918
+
return fmt.Errorf("Repo: map struct too large (%d)", extra)
4923
+
nameBuf := make([]byte, 11)
4924
+
for i := uint64(0); i < n; i++ {
4925
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
4931
+
// Field doesn't exist on this type, so ignore it
4932
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
4938
+
switch string(nameBuf[:nameLen]) {
4939
+
// t.Knot (string) (string)
4943
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4948
+
t.Knot = string(sval)
4950
+
// t.Name (string) (string)
4954
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4959
+
t.Name = string(sval)
4961
+
// t.LexiconTypeID (string) (string)
4965
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4970
+
t.LexiconTypeID = string(sval)
4972
+
// t.Owner (string) (string)
4976
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
4981
+
t.Owner = string(sval)
4983
+
// t.Source (string) (string)
4987
+
b, err := cr.ReadByte()
4991
+
if b != cbg.CborNull[0] {
4992
+
if err := cr.UnreadByte(); err != nil {
4996
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5001
+
t.Source = (*string)(&sval)
5004
+
// t.Spindle (string) (string)
5008
+
b, err := cr.ReadByte()
5012
+
if b != cbg.CborNull[0] {
5013
+
if err := cr.UnreadByte(); err != nil {
5017
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5022
+
t.Spindle = (*string)(&sval)
5025
+
// t.CreatedAt (string) (string)
5029
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5034
+
t.CreatedAt = string(sval)
5036
+
// t.Description (string) (string)
5037
+
case "description":
5040
+
b, err := cr.ReadByte()
5044
+
if b != cbg.CborNull[0] {
5045
+
if err := cr.UnreadByte(); err != nil {
5049
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5054
+
t.Description = (*string)(&sval)
5059
+
// Field doesn't exist on this type, so ignore it
5060
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *RepoArtifact) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
5358
+
func (t *RepoIssue) MarshalCBOR(w io.Writer) error {
5360
+
_, err := w.Write(cbg.CborNull)
5364
+
cw := cbg.NewCborWriter(w)
5367
+
if t.Body == nil {
5371
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
5375
+
// t.Body (string) (string)
5376
+
if t.Body != nil {
5378
+
if len("body") > 1000000 {
5379
+
return xerrors.Errorf("Value in field \"body\" was too long")
5382
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
5385
+
if _, err := cw.WriteString(string("body")); err != nil {
5389
+
if t.Body == nil {
5390
+
if _, err := cw.Write(cbg.CborNull); err != nil {
5394
+
if len(*t.Body) > 1000000 {
5395
+
return xerrors.Errorf("Value in field t.Body was too long")
5398
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Body))); err != nil {
5401
+
if _, err := cw.WriteString(string(*t.Body)); err != nil {
5407
+
// t.Repo (string) (string)
5408
+
if len("repo") > 1000000 {
5409
+
return xerrors.Errorf("Value in field \"repo\" was too long")
5412
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
5415
+
if _, err := cw.WriteString(string("repo")); err != nil {
5419
+
if len(t.Repo) > 1000000 {
5420
+
return xerrors.Errorf("Value in field t.Repo was too long")
5423
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
5426
+
if _, err := cw.WriteString(string(t.Repo)); err != nil {
5430
+
// t.LexiconTypeID (string) (string)
5431
+
if len("$type") > 1000000 {
5432
+
return xerrors.Errorf("Value in field \"$type\" was too long")
5435
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
5438
+
if _, err := cw.WriteString(string("$type")); err != nil {
5442
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue"))); err != nil {
5445
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue")); err != nil {
5449
+
// t.Owner (string) (string)
5450
+
if len("owner") > 1000000 {
5451
+
return xerrors.Errorf("Value in field \"owner\" was too long")
5454
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
5457
+
if _, err := cw.WriteString(string("owner")); err != nil {
5461
+
if len(t.Owner) > 1000000 {
5462
+
return xerrors.Errorf("Value in field t.Owner was too long")
5465
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
5468
+
if _, err := cw.WriteString(string(t.Owner)); err != nil {
5472
+
// t.Title (string) (string)
5473
+
if len("title") > 1000000 {
5474
+
return xerrors.Errorf("Value in field \"title\" was too long")
5477
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("title"))); err != nil {
5480
+
if _, err := cw.WriteString(string("title")); err != nil {
5484
+
if len(t.Title) > 1000000 {
5485
+
return xerrors.Errorf("Value in field t.Title was too long")
5488
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Title))); err != nil {
5491
+
if _, err := cw.WriteString(string(t.Title)); err != nil {
5495
+
// t.IssueId (int64) (int64)
5496
+
if len("issueId") > 1000000 {
5497
+
return xerrors.Errorf("Value in field \"issueId\" was too long")
5500
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issueId"))); err != nil {
5503
+
if _, err := cw.WriteString(string("issueId")); err != nil {
5507
+
if t.IssueId >= 0 {
5508
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.IssueId)); err != nil {
5512
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.IssueId-1)); err != nil {
5517
+
// t.CreatedAt (string) (string)
5518
+
if len("createdAt") > 1000000 {
5519
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
5522
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
5525
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
5529
+
if len(t.CreatedAt) > 1000000 {
5530
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
5533
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
5536
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
5542
+
func (t *RepoIssue) UnmarshalCBOR(r io.Reader) (err error) {
5545
+
cr := cbg.NewCborReader(r)
5547
+
maj, extra, err := cr.ReadHeader()
5552
+
if err == io.EOF {
5553
+
err = io.ErrUnexpectedEOF
5557
+
if maj != cbg.MajMap {
5558
+
return fmt.Errorf("cbor input should be of type map")
5561
+
if extra > cbg.MaxLength {
5562
+
return fmt.Errorf("RepoIssue: map struct too large (%d)", extra)
5567
+
nameBuf := make([]byte, 9)
5568
+
for i := uint64(0); i < n; i++ {
5569
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
5575
+
// Field doesn't exist on this type, so ignore it
5576
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
5582
+
switch string(nameBuf[:nameLen]) {
5583
+
// t.Body (string) (string)
5587
+
b, err := cr.ReadByte()
5591
+
if b != cbg.CborNull[0] {
5592
+
if err := cr.UnreadByte(); err != nil {
5596
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5601
+
t.Body = (*string)(&sval)
5604
+
// t.Repo (string) (string)
5608
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5613
+
t.Repo = string(sval)
5615
+
// t.LexiconTypeID (string) (string)
5619
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5624
+
t.LexiconTypeID = string(sval)
5626
+
// t.Owner (string) (string)
5630
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5635
+
t.Owner = string(sval)
5637
+
// t.Title (string) (string)
5641
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5646
+
t.Title = string(sval)
5648
+
// t.IssueId (int64) (int64)
5651
+
maj, extra, err := cr.ReadHeader()
5657
+
case cbg.MajUnsignedInt:
5658
+
extraI = int64(extra)
5660
+
return fmt.Errorf("int64 positive overflow")
5662
+
case cbg.MajNegativeInt:
5663
+
extraI = int64(extra)
5665
+
return fmt.Errorf("int64 negative overflow")
5667
+
extraI = -1 - extraI
5669
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
5672
+
t.IssueId = int64(extraI)
5674
+
// t.CreatedAt (string) (string)
5678
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5683
+
t.CreatedAt = string(sval)
5687
+
// Field doesn't exist on this type, so ignore it
5688
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *RepoIssueComment) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
5503
-
func (t *RepoIssue) MarshalCBOR(w io.Writer) error {
6245
+
func (t *RepoPull) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
6258
+
if t.Source == nil {
···
5552
-
// t.Repo (string) (string)
5553
-
if len("repo") > 1000000 {
5554
-
return xerrors.Errorf("Value in field \"repo\" was too long")
5557
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
5560
-
if _, err := cw.WriteString(string("repo")); err != nil {
5564
-
if len(t.Repo) > 1000000 {
5565
-
return xerrors.Errorf("Value in field t.Repo was too long")
5568
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
5571
-
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")
···
5587
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue"))); err != nil {
6310
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull"))); err != nil {
5590
-
if _, err := cw.WriteString(string("sh.tangled.repo.issue")); err != nil {
6313
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull")); err != nil {
5594
-
// t.Owner (string) (string)
5595
-
if len("owner") > 1000000 {
5596
-
return xerrors.Errorf("Value in field \"owner\" was too long")
6317
+
// t.Patch (string) (string)
6318
+
if len("patch") > 1000000 {
6319
+
return xerrors.Errorf("Value in field \"patch\" was too long")
5599
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
6322
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("patch"))); err != nil {
5602
-
if _, err := cw.WriteString(string("owner")); err != nil {
6325
+
if _, err := cw.WriteString(string("patch")); err != nil {
5606
-
if len(t.Owner) > 1000000 {
5607
-
return xerrors.Errorf("Value in field t.Owner was too long")
6329
+
if len(t.Patch) > 1000000 {
6330
+
return xerrors.Errorf("Value in field t.Patch was too long")
5610
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
6333
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Patch))); err != nil {
5613
-
if _, err := cw.WriteString(string(t.Owner)); err != nil {
6336
+
if _, err := cw.WriteString(string(t.Patch)); err != nil {
···
5640
-
// t.IssueId (int64) (int64)
5641
-
if len("issueId") > 1000000 {
5642
-
return xerrors.Errorf("Value in field \"issueId\" was too long")
6363
+
// t.PullId (int64) (int64)
6364
+
if len("pullId") > 1000000 {
6365
+
return xerrors.Errorf("Value in field \"pullId\" was too long")
5645
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issueId"))); err != nil {
6368
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pullId"))); err != nil {
5648
-
if _, err := cw.WriteString(string("issueId")); err != nil {
6371
+
if _, err := cw.WriteString(string("pullId")); err != nil {
5652
-
if t.IssueId >= 0 {
5653
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.IssueId)); err != nil {
6375
+
if t.PullId >= 0 {
6376
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PullId)); err != nil {
5657
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.IssueId-1)); err != nil {
6380
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.PullId-1)); err != nil {
6385
+
// t.Source (tangled.RepoPull_Source) (struct)
6386
+
if t.Source != nil {
6388
+
if len("source") > 1000000 {
6389
+
return xerrors.Errorf("Value in field \"source\" was too long")
6392
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
6395
+
if _, err := cw.WriteString(string("source")); err != nil {
6399
+
if err := t.Source.MarshalCBOR(cw); err != nil {
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
6427
+
// t.TargetRepo (string) (string)
6428
+
if len("targetRepo") > 1000000 {
6429
+
return xerrors.Errorf("Value in field \"targetRepo\" was too long")
6432
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetRepo"))); err != nil {
6435
+
if _, err := cw.WriteString(string("targetRepo")); err != nil {
6439
+
if len(t.TargetRepo) > 1000000 {
6440
+
return xerrors.Errorf("Value in field t.TargetRepo was too long")
6443
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetRepo))); err != nil {
6446
+
if _, err := cw.WriteString(string(t.TargetRepo)); err != nil {
6450
+
// t.TargetBranch (string) (string)
6451
+
if len("targetBranch") > 1000000 {
6452
+
return xerrors.Errorf("Value in field \"targetBranch\" was too long")
6455
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetBranch"))); err != nil {
6458
+
if _, err := cw.WriteString(string("targetBranch")); err != nil {
6462
+
if len(t.TargetBranch) > 1000000 {
6463
+
return xerrors.Errorf("Value in field t.TargetBranch was too long")
6466
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetBranch))); err != nil {
6469
+
if _, err := cw.WriteString(string(t.TargetBranch)); err != nil {
5687
-
func (t *RepoIssue) UnmarshalCBOR(r io.Reader) (err error) {
6475
+
func (t *RepoPull) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
5707
-
return fmt.Errorf("RepoIssue: map struct too large (%d)", extra)
6495
+
return fmt.Errorf("RepoPull: map struct too large (%d)", extra)
5712
-
nameBuf := make([]byte, 9)
6500
+
nameBuf := make([]byte, 12)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
t.Body = (*string)(&sval)
5749
-
// t.Repo (string) (string)
5753
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
5758
-
t.Repo = string(sval)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
5771
-
// t.Owner (string) (string)
6548
+
// t.Patch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
5780
-
t.Owner = string(sval)
6557
+
t.Patch = string(sval)
// t.Title (string) (string)
···
5793
-
// t.IssueId (int64) (int64)
6570
+
// t.PullId (int64) (int64)
maj, extra, err := cr.ReadHeader()
···
return fmt.Errorf("wrong type for int64 field: %d", maj)
5817
-
t.IssueId = int64(extraI)
6594
+
t.PullId = int64(extraI)
6596
+
// t.Source (tangled.RepoPull_Source) (struct)
6601
+
b, err := cr.ReadByte()
6605
+
if b != cbg.CborNull[0] {
6606
+
if err := cr.UnreadByte(); err != nil {
6609
+
t.Source = new(RepoPull_Source)
6610
+
if err := t.Source.UnmarshalCBOR(cr); err != nil {
6611
+
return xerrors.Errorf("unmarshaling t.Source pointer: %w", err)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
6627
+
// t.TargetRepo (string) (string)
6628
+
case "targetRepo":
6631
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6636
+
t.TargetRepo = string(sval)
6638
+
// t.TargetBranch (string) (string)
6639
+
case "targetBranch":
6642
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6647
+
t.TargetBranch = string(sval)
···
6226
-
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
6228
-
_, err := w.Write(cbg.CborNull)
6232
-
cw := cbg.NewCborWriter(w)
6234
-
if _, err := cw.Write([]byte{163}); err != nil {
6238
-
// t.Pull (string) (string)
6239
-
if len("pull") > 1000000 {
6240
-
return xerrors.Errorf("Value in field \"pull\" was too long")
6243
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
6246
-
if _, err := cw.WriteString(string("pull")); err != nil {
6250
-
if len(t.Pull) > 1000000 {
6251
-
return xerrors.Errorf("Value in field t.Pull was too long")
6254
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
6257
-
if _, err := cw.WriteString(string(t.Pull)); err != nil {
6261
-
// t.LexiconTypeID (string) (string)
6262
-
if len("$type") > 1000000 {
6263
-
return xerrors.Errorf("Value in field \"$type\" was too long")
6266
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
6269
-
if _, err := cw.WriteString(string("$type")); err != nil {
6273
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.status"))); err != nil {
6276
-
if _, err := cw.WriteString(string("sh.tangled.repo.pull.status")); err != nil {
6280
-
// t.Status (string) (string)
6281
-
if len("status") > 1000000 {
6282
-
return xerrors.Errorf("Value in field \"status\" was too long")
6285
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
6288
-
if _, err := cw.WriteString(string("status")); err != nil {
6292
-
if len(t.Status) > 1000000 {
6293
-
return xerrors.Errorf("Value in field t.Status was too long")
6296
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
6299
-
if _, err := cw.WriteString(string(t.Status)); err != nil {
6305
-
func (t *RepoPullStatus) UnmarshalCBOR(r io.Reader) (err error) {
6306
-
*t = RepoPullStatus{}
6308
-
cr := cbg.NewCborReader(r)
6310
-
maj, extra, err := cr.ReadHeader()
6315
-
if err == io.EOF {
6316
-
err = io.ErrUnexpectedEOF
6320
-
if maj != cbg.MajMap {
6321
-
return fmt.Errorf("cbor input should be of type map")
6324
-
if extra > cbg.MaxLength {
6325
-
return fmt.Errorf("RepoPullStatus: map struct too large (%d)", extra)
6330
-
nameBuf := make([]byte, 6)
6331
-
for i := uint64(0); i < n; i++ {
6332
-
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
6338
-
// Field doesn't exist on this type, so ignore it
6339
-
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
6345
-
switch string(nameBuf[:nameLen]) {
6346
-
// t.Pull (string) (string)
6350
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6355
-
t.Pull = string(sval)
6357
-
// t.LexiconTypeID (string) (string)
6361
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6366
-
t.LexiconTypeID = string(sval)
6368
-
// t.Status (string) (string)
6372
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6377
-
t.Status = string(sval)
6381
-
// Field doesn't exist on this type, so ignore it
6382
-
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *RepoPull_Source) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
6548
-
func (t *RepoPull) MarshalCBOR(w io.Writer) error {
7203
+
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
6557
-
if t.Body == nil {
6561
-
if t.Source == nil {
6565
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
7211
+
if _, err := cw.Write([]byte{163}); err != nil {
6569
-
// t.Body (string) (string)
6570
-
if t.Body != nil {
6572
-
if len("body") > 1000000 {
6573
-
return xerrors.Errorf("Value in field \"body\" was too long")
6576
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
6579
-
if _, err := cw.WriteString(string("body")); err != nil {
6583
-
if t.Body == nil {
6584
-
if _, err := cw.Write(cbg.CborNull); err != nil {
6588
-
if len(*t.Body) > 1000000 {
6589
-
return xerrors.Errorf("Value in field t.Body was too long")
6592
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Body))); err != nil {
6595
-
if _, err := cw.WriteString(string(*t.Body)); err != nil {
7215
+
// t.Pull (string) (string)
7216
+
if len("pull") > 1000000 {
7217
+
return xerrors.Errorf("Value in field \"pull\" was too long")
6601
-
// t.LexiconTypeID (string) (string)
6602
-
if len("$type") > 1000000 {
6603
-
return xerrors.Errorf("Value in field \"$type\" was too long")
6606
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
7220
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
6609
-
if _, err := cw.WriteString(string("$type")); err != nil {
7223
+
if _, err := cw.WriteString(string("pull")); err != nil {
6613
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull"))); err != nil {
6616
-
if _, err := cw.WriteString(string("sh.tangled.repo.pull")); err != nil {
7227
+
if len(t.Pull) > 1000000 {
7228
+
return xerrors.Errorf("Value in field t.Pull was too long")
6620
-
// t.Patch (string) (string)
6621
-
if len("patch") > 1000000 {
6622
-
return xerrors.Errorf("Value in field \"patch\" was too long")
6625
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("patch"))); err != nil {
7231
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
6628
-
if _, err := cw.WriteString(string("patch")); err != nil {
7234
+
if _, err := cw.WriteString(string(t.Pull)); err != nil {
6632
-
if len(t.Patch) > 1000000 {
6633
-
return xerrors.Errorf("Value in field t.Patch was too long")
7238
+
// t.LexiconTypeID (string) (string)
7239
+
if len("$type") > 1000000 {
7240
+
return xerrors.Errorf("Value in field \"$type\" was too long")
6636
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Patch))); err != nil {
6639
-
if _, err := cw.WriteString(string(t.Patch)); err != nil {
6643
-
// t.Title (string) (string)
6644
-
if len("title") > 1000000 {
6645
-
return xerrors.Errorf("Value in field \"title\" was too long")
6648
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("title"))); err != nil {
6651
-
if _, err := cw.WriteString(string("title")); err != nil {
6655
-
if len(t.Title) > 1000000 {
6656
-
return xerrors.Errorf("Value in field t.Title was too long")
6659
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Title))); err != nil {
7243
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
6662
-
if _, err := cw.WriteString(string(t.Title)); err != nil {
7246
+
if _, err := cw.WriteString(string("$type")); err != nil {
6666
-
// t.PullId (int64) (int64)
6667
-
if len("pullId") > 1000000 {
6668
-
return xerrors.Errorf("Value in field \"pullId\" was too long")
6671
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pullId"))); err != nil {
7250
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.status"))); err != nil {
6674
-
if _, err := cw.WriteString(string("pullId")); err != nil {
7253
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull.status")); err != nil {
6678
-
if t.PullId >= 0 {
6679
-
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PullId)); err != nil {
6683
-
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.PullId-1)); err != nil {
7257
+
// t.Status (string) (string)
7258
+
if len("status") > 1000000 {
7259
+
return xerrors.Errorf("Value in field \"status\" was too long")
6688
-
// t.Source (tangled.RepoPull_Source) (struct)
6689
-
if t.Source != nil {
6691
-
if len("source") > 1000000 {
6692
-
return xerrors.Errorf("Value in field \"source\" was too long")
6695
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
6698
-
if _, err := cw.WriteString(string("source")); err != nil {
6702
-
if err := t.Source.MarshalCBOR(cw); err != nil {
6707
-
// t.CreatedAt (string) (string)
6708
-
if len("createdAt") > 1000000 {
6709
-
return xerrors.Errorf("Value in field \"createdAt\" was too long")
6712
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
7262
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
6715
-
if _, err := cw.WriteString(string("createdAt")); err != nil {
7265
+
if _, err := cw.WriteString(string("status")); err != nil {
6719
-
if len(t.CreatedAt) > 1000000 {
6720
-
return xerrors.Errorf("Value in field t.CreatedAt was too long")
7269
+
if len(t.Status) > 1000000 {
7270
+
return xerrors.Errorf("Value in field t.Status was too long")
6723
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
7273
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
6726
-
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
6730
-
// t.TargetRepo (string) (string)
6731
-
if len("targetRepo") > 1000000 {
6732
-
return xerrors.Errorf("Value in field \"targetRepo\" was too long")
6735
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetRepo"))); err != nil {
6738
-
if _, err := cw.WriteString(string("targetRepo")); err != nil {
6742
-
if len(t.TargetRepo) > 1000000 {
6743
-
return xerrors.Errorf("Value in field t.TargetRepo was too long")
6746
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetRepo))); err != nil {
6749
-
if _, err := cw.WriteString(string(t.TargetRepo)); err != nil {
6753
-
// t.TargetBranch (string) (string)
6754
-
if len("targetBranch") > 1000000 {
6755
-
return xerrors.Errorf("Value in field \"targetBranch\" was too long")
6758
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetBranch"))); err != nil {
6761
-
if _, err := cw.WriteString(string("targetBranch")); err != nil {
6765
-
if len(t.TargetBranch) > 1000000 {
6766
-
return xerrors.Errorf("Value in field t.TargetBranch was too long")
6769
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetBranch))); err != nil {
6772
-
if _, err := cw.WriteString(string(t.TargetBranch)); err != nil {
7276
+
if _, err := cw.WriteString(string(t.Status)); err != nil {
6778
-
func (t *RepoPull) UnmarshalCBOR(r io.Reader) (err error) {
7282
+
func (t *RepoPullStatus) UnmarshalCBOR(r io.Reader) (err error) {
7283
+
*t = RepoPullStatus{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
6798
-
return fmt.Errorf("RepoPull: map struct too large (%d)", extra)
7302
+
return fmt.Errorf("RepoPullStatus: map struct too large (%d)", extra)
6803
-
nameBuf := make([]byte, 12)
7307
+
nameBuf := make([]byte, 6)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
6819
-
// t.Body (string) (string)
7323
+
// t.Pull (string) (string)
6823
-
b, err := cr.ReadByte()
7327
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6827
-
if b != cbg.CborNull[0] {
6828
-
if err := cr.UnreadByte(); err != nil {
6832
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6837
-
t.Body = (*string)(&sval)
7332
+
t.Pull = string(sval)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
6851
-
// t.Patch (string) (string)
7345
+
// t.Status (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
6860
-
t.Patch = string(sval)
6862
-
// t.Title (string) (string)
6866
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6871
-
t.Title = string(sval)
6873
-
// t.PullId (int64) (int64)
6876
-
maj, extra, err := cr.ReadHeader()
6882
-
case cbg.MajUnsignedInt:
6883
-
extraI = int64(extra)
6885
-
return fmt.Errorf("int64 positive overflow")
6887
-
case cbg.MajNegativeInt:
6888
-
extraI = int64(extra)
6890
-
return fmt.Errorf("int64 negative overflow")
6892
-
extraI = -1 - extraI
6894
-
return fmt.Errorf("wrong type for int64 field: %d", maj)
6897
-
t.PullId = int64(extraI)
6899
-
// t.Source (tangled.RepoPull_Source) (struct)
6904
-
b, err := cr.ReadByte()
6908
-
if b != cbg.CborNull[0] {
6909
-
if err := cr.UnreadByte(); err != nil {
6912
-
t.Source = new(RepoPull_Source)
6913
-
if err := t.Source.UnmarshalCBOR(cr); err != nil {
6914
-
return xerrors.Errorf("unmarshaling t.Source pointer: %w", err)
6919
-
// t.CreatedAt (string) (string)
6923
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6928
-
t.CreatedAt = string(sval)
6930
-
// t.TargetRepo (string) (string)
6931
-
case "targetRepo":
6934
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6939
-
t.TargetRepo = string(sval)
6941
-
// t.TargetBranch (string) (string)
6942
-
case "targetBranch":
6945
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
6950
-
t.TargetBranch = string(sval)
7354
+
t.Status = string(sval)
···
6963
-
func (t *Repo) MarshalCBOR(w io.Writer) error {
7367
+
func (t *Spindle) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
6972
-
if t.Description == nil {
6976
-
if t.Source == nil {
6980
-
if t.Spindle == nil {
6984
-
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
6988
-
// t.Knot (string) (string)
6989
-
if len("knot") > 1000000 {
6990
-
return xerrors.Errorf("Value in field \"knot\" was too long")
6993
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("knot"))); err != nil {
6996
-
if _, err := cw.WriteString(string("knot")); err != nil {
7000
-
if len(t.Knot) > 1000000 {
7001
-
return xerrors.Errorf("Value in field t.Knot was too long")
7004
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Knot))); err != nil {
7007
-
if _, err := cw.WriteString(string(t.Knot)); err != nil {
7011
-
// t.Name (string) (string)
7012
-
if len("name") > 1000000 {
7013
-
return xerrors.Errorf("Value in field \"name\" was too long")
7016
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
7019
-
if _, err := cw.WriteString(string("name")); err != nil {
7023
-
if len(t.Name) > 1000000 {
7024
-
return xerrors.Errorf("Value in field t.Name was too long")
7027
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
7030
-
if _, err := cw.WriteString(string(t.Name)); err != nil {
7375
+
if _, err := cw.Write([]byte{162}); err != nil {
···
7046
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo"))); err != nil {
7391
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.spindle"))); err != nil {
7049
-
if _, err := cw.WriteString(string("sh.tangled.repo")); err != nil {
7394
+
if _, err := cw.WriteString(string("sh.tangled.spindle")); err != nil {
7053
-
// t.Owner (string) (string)
7054
-
if len("owner") > 1000000 {
7055
-
return xerrors.Errorf("Value in field \"owner\" was too long")
7058
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
7061
-
if _, err := cw.WriteString(string("owner")); err != nil {
7065
-
if len(t.Owner) > 1000000 {
7066
-
return xerrors.Errorf("Value in field t.Owner was too long")
7069
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
7072
-
if _, err := cw.WriteString(string(t.Owner)); err != nil {
7076
-
// t.Source (string) (string)
7077
-
if t.Source != nil {
7079
-
if len("source") > 1000000 {
7080
-
return xerrors.Errorf("Value in field \"source\" was too long")
7083
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
7086
-
if _, err := cw.WriteString(string("source")); err != nil {
7090
-
if t.Source == nil {
7091
-
if _, err := cw.Write(cbg.CborNull); err != nil {
7095
-
if len(*t.Source) > 1000000 {
7096
-
return xerrors.Errorf("Value in field t.Source was too long")
7099
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Source))); err != nil {
7102
-
if _, err := cw.WriteString(string(*t.Source)); err != nil {
7108
-
// t.Spindle (string) (string)
7109
-
if t.Spindle != nil {
7111
-
if len("spindle") > 1000000 {
7112
-
return xerrors.Errorf("Value in field \"spindle\" was too long")
7115
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("spindle"))); err != nil {
7118
-
if _, err := cw.WriteString(string("spindle")); err != nil {
7122
-
if t.Spindle == nil {
7123
-
if _, err := cw.Write(cbg.CborNull); err != nil {
7127
-
if len(*t.Spindle) > 1000000 {
7128
-
return xerrors.Errorf("Value in field t.Spindle was too long")
7131
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Spindle))); err != nil {
7134
-
if _, err := cw.WriteString(string(*t.Spindle)); err != nil {
// t.CreatedAt (string) (string)
if len("createdAt") > 1000000 {
return xerrors.Errorf("Value in field \"createdAt\" was too long")
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
7163
-
// t.Description (string) (string)
7164
-
if t.Description != nil {
7166
-
if len("description") > 1000000 {
7167
-
return xerrors.Errorf("Value in field \"description\" was too long")
7170
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("description"))); err != nil {
7173
-
if _, err := cw.WriteString(string("description")); err != nil {
7177
-
if t.Description == nil {
7178
-
if _, err := cw.Write(cbg.CborNull); err != nil {
7182
-
if len(*t.Description) > 1000000 {
7183
-
return xerrors.Errorf("Value in field t.Description was too long")
7186
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Description))); err != nil {
7189
-
if _, err := cw.WriteString(string(*t.Description)); err != nil {
7197
-
func (t *Repo) UnmarshalCBOR(r io.Reader) (err error) {
7423
+
func (t *Spindle) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
7217
-
return fmt.Errorf("Repo: map struct too large (%d)", extra)
7443
+
return fmt.Errorf("Spindle: map struct too large (%d)", extra)
7222
-
nameBuf := make([]byte, 11)
7448
+
nameBuf := make([]byte, 9)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
7238
-
// t.Knot (string) (string)
7242
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7247
-
t.Knot = string(sval)
7249
-
// t.Name (string) (string)
7253
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7258
-
t.Name = string(sval)
7260
-
// t.LexiconTypeID (string) (string)
7464
+
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
7271
-
// t.Owner (string) (string)
7275
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7280
-
t.Owner = string(sval)
7282
-
// t.Source (string) (string)
7286
-
b, err := cr.ReadByte()
7290
-
if b != cbg.CborNull[0] {
7291
-
if err := cr.UnreadByte(); err != nil {
7295
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7300
-
t.Source = (*string)(&sval)
7303
-
// t.Spindle (string) (string)
7307
-
b, err := cr.ReadByte()
7311
-
if b != cbg.CborNull[0] {
7312
-
if err := cr.UnreadByte(); err != nil {
7316
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7321
-
t.Spindle = (*string)(&sval)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
7335
-
// t.Description (string) (string)
7336
-
case "description":
7339
-
b, err := cr.ReadByte()
7343
-
if b != cbg.CborNull[0] {
7344
-
if err := cr.UnreadByte(); err != nil {
7348
-
sval, err := cbg.ReadStringWithMax(cr, 1000000)
7353
-
t.Description = (*string)(&sval)