···
+
func (t *GitRefUpdate_CommitCountBreakdown) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
// t.ByEmail ([]*tangled.GitRefUpdate_IndividualEmailCommitCount) (slice)
if len("byEmail") > 1000000 {
···
+
func (t *GitRefUpdate_CommitCountBreakdown) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = GitRefUpdate_CommitCountBreakdown{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("GitRefUpdate_CommitCountBreakdown: map struct too large (%d)", extra)
···
switch string(nameBuf[:nameLen]) {
+
// t.ByEmail ([]*tangled.GitRefUpdate_IndividualEmailCommitCount) (slice)
maj, extra, err = cr.ReadHeader()
···
+
t.ByEmail = make([]*GitRefUpdate_IndividualEmailCommitCount, extra)
for i := 0; i < int(extra); i++ {
···
if err := cr.UnreadByte(); err != nil {
+
t.ByEmail[i] = new(GitRefUpdate_IndividualEmailCommitCount)
if err := t.ByEmail[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.ByEmail[i] pointer: %w", err)
···
+
func (t *GitRefUpdate_IndividualEmailCommitCount) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
func (t *GitRefUpdate_IndividualEmailCommitCount) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = GitRefUpdate_IndividualEmailCommitCount{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("GitRefUpdate_IndividualEmailCommitCount: map struct too large (%d)", extra)
···
+
func (t *GitRefUpdate_LangBreakdown) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
// t.Inputs ([]*tangled.GitRefUpdate_IndividualLanguageSize) (slice)
if len("inputs") > 1000000 {
···
+
func (t *GitRefUpdate_LangBreakdown) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = GitRefUpdate_LangBreakdown{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("GitRefUpdate_LangBreakdown: map struct too large (%d)", extra)
···
switch string(nameBuf[:nameLen]) {
+
// t.Inputs ([]*tangled.GitRefUpdate_IndividualLanguageSize) (slice)
maj, extra, err = cr.ReadHeader()
···
+
t.Inputs = make([]*GitRefUpdate_IndividualLanguageSize, extra)
for i := 0; i < int(extra); i++ {
···
if err := cr.UnreadByte(); err != nil {
+
t.Inputs[i] = new(GitRefUpdate_IndividualLanguageSize)
if err := t.Inputs[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Inputs[i] pointer: %w", err)
···
+
func (t *GitRefUpdate_IndividualLanguageSize) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
func (t *GitRefUpdate_IndividualLanguageSize) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = GitRefUpdate_IndividualLanguageSize{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("GitRefUpdate_IndividualLanguageSize: map struct too large (%d)", extra)
···
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *GitRefUpdate_Meta) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if t.LangBreakdown == nil {
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
+
// t.CommitCount (tangled.GitRefUpdate_CommitCountBreakdown) (struct)
+
if len("commitCount") > 1000000 {
+
return xerrors.Errorf("Value in field \"commitCount\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commitCount"))); err != nil {
+
if _, err := cw.WriteString(string("commitCount")); err != nil {
+
if err := t.CommitCount.MarshalCBOR(cw); err != nil {
+
// t.IsDefaultRef (bool) (bool)
+
if len("isDefaultRef") > 1000000 {
+
return xerrors.Errorf("Value in field \"isDefaultRef\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("isDefaultRef"))); err != nil {
+
if _, err := cw.WriteString(string("isDefaultRef")); err != nil {
+
if err := cbg.WriteBool(w, t.IsDefaultRef); err != nil {
+
// t.LangBreakdown (tangled.GitRefUpdate_LangBreakdown) (struct)
+
if t.LangBreakdown != nil {
+
if len("langBreakdown") > 1000000 {
+
return xerrors.Errorf("Value in field \"langBreakdown\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("langBreakdown"))); err != nil {
+
if _, err := cw.WriteString(string("langBreakdown")); err != nil {
+
if err := t.LangBreakdown.MarshalCBOR(cw); err != nil {
+
func (t *GitRefUpdate_Meta) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = GitRefUpdate_Meta{}
+
cr := cbg.NewCborReader(r)
+
maj, extra, err := cr.ReadHeader()
+
err = io.ErrUnexpectedEOF
+
return fmt.Errorf("cbor input should be of type map")
+
if extra > cbg.MaxLength {
+
return fmt.Errorf("GitRefUpdate_Meta: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 13)
+
for i := uint64(0); i < n; i++ {
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
+
switch string(nameBuf[:nameLen]) {
+
// t.CommitCount (tangled.GitRefUpdate_CommitCountBreakdown) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.CommitCount = new(GitRefUpdate_CommitCountBreakdown)
+
if err := t.CommitCount.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.CommitCount pointer: %w", err)
+
// t.IsDefaultRef (bool) (bool)
+
maj, extra, err = cr.ReadHeader()
+
if maj != cbg.MajOther {
+
return fmt.Errorf("booleans must be major type 7")
+
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
+
// t.LangBreakdown (tangled.GitRefUpdate_LangBreakdown) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.LangBreakdown = new(GitRefUpdate_LangBreakdown)
+
if err := t.LangBreakdown.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.LangBreakdown pointer: %w", err)
···
func (t *RepoPull) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *RepoPull_Target) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{162}); err != nil {
+
// t.Repo (string) (string)
+
if len("repo") > 1000000 {
+
return xerrors.Errorf("Value in field \"repo\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repo"))); err != nil {
+
if _, err := cw.WriteString(string("repo")); err != nil {
+
if len(t.Repo) > 1000000 {
+
return xerrors.Errorf("Value in field t.Repo was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Repo))); err != nil {
+
if _, err := cw.WriteString(string(t.Repo)); err != nil {
+
// t.Branch (string) (string)
+
if len("branch") > 1000000 {
+
return xerrors.Errorf("Value in field \"branch\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("branch"))); err != nil {
+
if _, err := cw.WriteString(string("branch")); err != nil {
+
if len(t.Branch) > 1000000 {
+
return xerrors.Errorf("Value in field t.Branch was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Branch))); err != nil {
+
if _, err := cw.WriteString(string(t.Branch)); err != nil {
+
func (t *RepoPull_Target) UnmarshalCBOR(r io.Reader) (err error) {
+
cr := cbg.NewCborReader(r)
+
maj, extra, err := cr.ReadHeader()
+
err = io.ErrUnexpectedEOF
+
return fmt.Errorf("cbor input should be of type map")
+
if extra > cbg.MaxLength {
+
return fmt.Errorf("RepoPull_Target: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 6)
+
for i := uint64(0); i < n; i++ {
+
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil {
+
switch string(nameBuf[:nameLen]) {
+
// t.Repo (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Branch (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Branch = string(sval)