···
+
func (t *ActorProfile) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if t.Description == nil {
+
if t.PinnedRepositories == nil {
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
+
// t.LexiconTypeID (string) (string)
+
if len("$type") > 1000000 {
+
return xerrors.Errorf("Value in field \"$type\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
+
if _, err := cw.WriteString(string("$type")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.actor.profile"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.actor.profile")); err != nil {
+
// t.Links ([]string) (slice)
+
if len("links") > 1000000 {
+
return xerrors.Errorf("Value in field \"links\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("links"))); err != nil {
+
if _, err := cw.WriteString(string("links")); err != nil {
+
if len(t.Links) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Links was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Links))); err != nil {
+
for _, v := range t.Links {
+
return xerrors.Errorf("Value in field v was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
+
if _, err := cw.WriteString(string(v)); err != nil {
+
// t.Stats ([]string) (slice)
+
if len("stats") > 1000000 {
+
return xerrors.Errorf("Value in field \"stats\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("stats"))); err != nil {
+
if _, err := cw.WriteString(string("stats")); err != nil {
+
if len(t.Stats) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Stats was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Stats))); err != nil {
+
for _, v := range t.Stats {
+
return xerrors.Errorf("Value in field v was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
+
if _, err := cw.WriteString(string(v)); err != nil {
+
// t.Bluesky (bool) (bool)
+
if len("bluesky") > 1000000 {
+
return xerrors.Errorf("Value in field \"bluesky\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("bluesky"))); err != nil {
+
if _, err := cw.WriteString(string("bluesky")); err != nil {
+
if err := cbg.WriteBool(w, t.Bluesky); err != nil {
+
// t.Location (string) (string)
+
if len("location") > 1000000 {
+
return xerrors.Errorf("Value in field \"location\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("location"))); err != nil {
+
if _, err := cw.WriteString(string("location")); err != nil {
+
if _, err := cw.Write(cbg.CborNull); err != nil {
+
if len(*t.Location) > 1000000 {
+
return xerrors.Errorf("Value in field t.Location was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Location))); err != nil {
+
if _, err := cw.WriteString(string(*t.Location)); err != nil {
+
// t.Description (string) (string)
+
if t.Description != nil {
+
if len("description") > 1000000 {
+
return xerrors.Errorf("Value in field \"description\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("description"))); err != nil {
+
if _, err := cw.WriteString(string("description")); err != nil {
+
if t.Description == nil {
+
if _, err := cw.Write(cbg.CborNull); err != nil {
+
if len(*t.Description) > 1000000 {
+
return xerrors.Errorf("Value in field t.Description was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Description))); err != nil {
+
if _, err := cw.WriteString(string(*t.Description)); err != nil {
+
// t.PinnedRepositories ([]string) (slice)
+
if t.PinnedRepositories != nil {
+
if len("pinnedRepositories") > 1000000 {
+
return xerrors.Errorf("Value in field \"pinnedRepositories\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pinnedRepositories"))); err != nil {
+
if _, err := cw.WriteString(string("pinnedRepositories")); err != nil {
+
if len(t.PinnedRepositories) > 8192 {
+
return xerrors.Errorf("Slice value in field t.PinnedRepositories was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.PinnedRepositories))); err != nil {
+
for _, v := range t.PinnedRepositories {
+
return xerrors.Errorf("Value in field v was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
+
if _, err := cw.WriteString(string(v)); err != nil {
+
func (t *ActorProfile) 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("ActorProfile: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 18)
+
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.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
+
// t.Links ([]string) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Links: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Links = make([]string, extra)
+
for i := 0; i < int(extra); i++ {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Links[i] = string(sval)
+
// t.Stats ([]string) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Stats: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Stats = make([]string, extra)
+
for i := 0; i < int(extra); i++ {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Stats[i] = string(sval)
+
// t.Bluesky (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.Location (string) (string)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Location = (*string)(&sval)
+
// t.Description (string) (string)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Description = (*string)(&sval)
+
// t.PinnedRepositories ([]string) (slice)
+
case "pinnedRepositories":
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.PinnedRepositories: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.PinnedRepositories = make([]string, extra)
+
for i := 0; i < int(extra); i++ {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.PinnedRepositories[i] = string(sval)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *FeedStar) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
func (t *GitRefUpdate) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{167}); err != nil {
+
// t.Ref (string) (string)
+
if len("ref") > 1000000 {
+
return xerrors.Errorf("Value in field \"ref\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
+
if _, err := cw.WriteString(string("ref")); err != nil {
+
if len(t.Ref) > 1000000 {
+
return xerrors.Errorf("Value in field t.Ref was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
+
if _, err := cw.WriteString(string(t.Ref)); err != nil {
+
// t.LexiconTypeID (string) (string)
+
if len("$type") > 1000000 {
+
return xerrors.Errorf("Value in field \"$type\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
+
if _, err := cw.WriteString(string("$type")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.git.refUpdate"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.git.refUpdate")); err != nil {
+
// t.NewSha (string) (string)
+
if len("newSha") > 1000000 {
+
return xerrors.Errorf("Value in field \"newSha\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
+
if _, err := cw.WriteString(string("newSha")); err != nil {
+
if len(t.NewSha) > 1000000 {
+
return xerrors.Errorf("Value in field t.NewSha was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
+
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
+
// t.OldSha (string) (string)
+
if len("oldSha") > 1000000 {
+
return xerrors.Errorf("Value in field \"oldSha\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
+
if _, err := cw.WriteString(string("oldSha")); err != nil {
+
if len(t.OldSha) > 1000000 {
+
return xerrors.Errorf("Value in field t.OldSha was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
+
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
+
// t.RepoDid (string) (string)
+
if len("repoDid") > 1000000 {
+
return xerrors.Errorf("Value in field \"repoDid\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoDid"))); err != nil {
+
if _, err := cw.WriteString(string("repoDid")); err != nil {
+
if len(t.RepoDid) > 1000000 {
+
return xerrors.Errorf("Value in field t.RepoDid was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoDid))); err != nil {
+
if _, err := cw.WriteString(string(t.RepoDid)); err != nil {
+
// t.RepoName (string) (string)
+
if len("repoName") > 1000000 {
+
return xerrors.Errorf("Value in field \"repoName\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("repoName"))); err != nil {
+
if _, err := cw.WriteString(string("repoName")); err != nil {
+
if len(t.RepoName) > 1000000 {
+
return xerrors.Errorf("Value in field t.RepoName was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RepoName))); err != nil {
+
if _, err := cw.WriteString(string(t.RepoName)); err != nil {
+
// t.CommitterDid (string) (string)
+
if len("committerDid") > 1000000 {
+
return xerrors.Errorf("Value in field \"committerDid\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("committerDid"))); err != nil {
+
if _, err := cw.WriteString(string("committerDid")); err != nil {
+
if len(t.CommitterDid) > 1000000 {
+
return xerrors.Errorf("Value in field t.CommitterDid was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CommitterDid))); err != nil {
+
if _, err := cw.WriteString(string(t.CommitterDid)); err != nil {
+
func (t *GitRefUpdate) 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("GitRefUpdate: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 12)
+
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.Ref (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
+
// t.NewSha (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.NewSha = string(sval)
+
// t.OldSha (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.OldSha = string(sval)
+
// t.RepoDid (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.RepoDid = string(sval)
+
// t.RepoName (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.RepoName = string(sval)
+
// t.CommitterDid (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.CommitterDid = string(sval)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
func (t *GraphFollow) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
func (t *Pipeline) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{163}); err != nil {
+
// t.LexiconTypeID (string) (string)
+
if len("$type") > 1000000 {
+
return xerrors.Errorf("Value in field \"$type\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
+
if _, err := cw.WriteString(string("$type")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.pipeline"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.pipeline")); err != nil {
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
+
if len("workflows") > 1000000 {
+
return xerrors.Errorf("Value in field \"workflows\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("workflows"))); err != nil {
+
if _, err := cw.WriteString(string("workflows")); err != nil {
+
if len(t.Workflows) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Workflows was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Workflows))); err != nil {
+
for _, v := range t.Workflows {
+
if err := v.MarshalCBOR(cw); err != nil {
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
+
if len("triggerMetadata") > 1000000 {
+
return xerrors.Errorf("Value in field \"triggerMetadata\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("triggerMetadata"))); err != nil {
+
if _, err := cw.WriteString(string("triggerMetadata")); err != nil {
+
if err := t.TriggerMetadata.MarshalCBOR(cw); err != nil {
+
func (t *Pipeline) 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("Pipeline: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 15)
+
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.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
+
// t.Workflows ([]*tangled.Pipeline_Workflow) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Workflows: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Workflows = make([]*Pipeline_Workflow, extra)
+
for i := 0; i < int(extra); i++ {
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Workflows[i] = new(Pipeline_Workflow)
+
if err := t.Workflows[i].UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Workflows[i] pointer: %w", err)
+
// t.TriggerMetadata (tangled.Pipeline_TriggerMetadata) (struct)
+
case "triggerMetadata":
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.TriggerMetadata = new(Pipeline_TriggerMetadata)
+
if err := t.TriggerMetadata.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.TriggerMetadata pointer: %w", err)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_CloneOpts) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{163}); err != nil {
+
// t.Skip (bool) (bool)
+
if len("skip") > 1000000 {
+
return xerrors.Errorf("Value in field \"skip\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("skip"))); err != nil {
+
if _, err := cw.WriteString(string("skip")); err != nil {
+
if err := cbg.WriteBool(w, t.Skip); err != nil {
+
// t.Depth (int64) (int64)
+
if len("depth") > 1000000 {
+
return xerrors.Errorf("Value in field \"depth\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("depth"))); err != nil {
+
if _, err := cw.WriteString(string("depth")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Depth)); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Depth-1)); err != nil {
+
// t.Submodules (bool) (bool)
+
if len("submodules") > 1000000 {
+
return xerrors.Errorf("Value in field \"submodules\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("submodules"))); err != nil {
+
if _, err := cw.WriteString(string("submodules")); err != nil {
+
if err := cbg.WriteBool(w, t.Submodules); err != nil {
+
func (t *Pipeline_CloneOpts) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_CloneOpts{}
+
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("Pipeline_CloneOpts: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 10)
+
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.Skip (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.Depth (int64) (int64)
+
maj, extra, err := cr.ReadHeader()
+
case cbg.MajUnsignedInt:
+
return fmt.Errorf("int64 positive overflow")
+
case cbg.MajNegativeInt:
+
return fmt.Errorf("int64 negative overflow")
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
+
t.Depth = int64(extraI)
+
// t.Submodules (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)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_Workflow) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{165}); err != nil {
···
+
// t.Clone (tangled.Pipeline_CloneOpts) (struct)
+
if len("clone") > 1000000 {
+
return xerrors.Errorf("Value in field \"clone\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("clone"))); err != nil {
+
if _, err := cw.WriteString(string("clone")); err != nil {
+
if err := t.Clone.MarshalCBOR(cw); err != nil {
+
// t.Steps ([]*tangled.Pipeline_Step) (slice)
+
if len("steps") > 1000000 {
+
return xerrors.Errorf("Value in field \"steps\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("steps"))); err != nil {
+
if _, err := cw.WriteString(string("steps")); err != nil {
+
if len(t.Steps) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Steps was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Steps))); err != nil {
+
for _, v := range t.Steps {
+
if err := v.MarshalCBOR(cw); err != nil {
+
// t.Environment ([]*tangled.Pipeline_Workflow_Environment_Elem) (slice)
+
if len("environment") > 1000000 {
+
return xerrors.Errorf("Value in field \"environment\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("environment"))); err != nil {
+
if _, err := cw.WriteString(string("environment")); err != nil {
+
if len(t.Environment) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Environment was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Environment))); err != nil {
+
for _, v := range t.Environment {
+
if err := v.MarshalCBOR(cw); err != nil {
+
// t.Dependencies ([]tangled.Pipeline_Dependencies_Elem) (slice)
+
if len("dependencies") > 1000000 {
+
return xerrors.Errorf("Value in field \"dependencies\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("dependencies"))); err != nil {
+
if _, err := cw.WriteString(string("dependencies")); err != nil {
+
if len(t.Dependencies) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Dependencies was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Dependencies))); err != nil {
+
for _, v := range t.Dependencies {
+
if err := v.MarshalCBOR(cw); err != nil {
+
func (t *Pipeline_Workflow) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_Workflow{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("Pipeline_Workflow: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 12)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
+
// t.Name (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.Clone (tangled.Pipeline_CloneOpts) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Clone = new(Pipeline_CloneOpts)
+
if err := t.Clone.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Clone pointer: %w", err)
+
// t.Steps ([]*tangled.Pipeline_Step) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Steps: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Steps = make([]*Pipeline_Step, extra)
+
for i := 0; i < int(extra); i++ {
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Steps[i] = new(Pipeline_Step)
+
if err := t.Steps[i].UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Steps[i] pointer: %w", err)
+
// t.Environment ([]*tangled.Pipeline_Workflow_Environment_Elem) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Environment: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Environment = make([]*Pipeline_Workflow_Environment_Elem, extra)
+
for i := 0; i < int(extra); i++ {
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Environment[i] = new(Pipeline_Workflow_Environment_Elem)
+
if err := t.Environment[i].UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Environment[i] pointer: %w", err)
+
// t.Dependencies ([]tangled.Pipeline_Dependencies_Elem) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Dependencies: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Dependencies = make([]Pipeline_Dependencies_Elem, extra)
+
for i := 0; i < int(extra); i++ {
+
if err := t.Dependencies[i].UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Dependencies[i]: %w", err)
···
+
func (t *Pipeline_Workflow_Environment_Elem) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{162}); err != nil {
+
// t.Key (string) (string)
+
if len("key") > 1000000 {
+
return xerrors.Errorf("Value in field \"key\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
+
if _, err := cw.WriteString(string("key")); err != nil {
+
if len(t.Key) > 1000000 {
+
return xerrors.Errorf("Value in field t.Key was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
+
// t.Value (string) (string)
+
if len("value") > 1000000 {
+
return xerrors.Errorf("Value in field \"value\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
+
if _, err := cw.WriteString(string("value")); err != nil {
+
if len(t.Value) > 1000000 {
+
return xerrors.Errorf("Value in field t.Value was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
+
func (t *Pipeline_Workflow_Environment_Elem) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_Workflow_Environment_Elem{}
+
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("Pipeline_Workflow_Environment_Elem: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 5)
+
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.Key (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Value (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_Dependencies_Elem) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{162}); err != nil {
+
// t.Packages ([]string) (slice)
+
if len("packages") > 1000000 {
+
return xerrors.Errorf("Value in field \"packages\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("packages"))); err != nil {
+
if _, err := cw.WriteString(string("packages")); err != nil {
+
if len(t.Packages) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Packages was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Packages))); err != nil {
+
for _, v := range t.Packages {
+
return xerrors.Errorf("Value in field v was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(v))); err != nil {
+
if _, err := cw.WriteString(string(v)); err != nil {
+
// t.Registry (string) (string)
+
if len("registry") > 1000000 {
+
return xerrors.Errorf("Value in field \"registry\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("registry"))); err != nil {
+
if _, err := cw.WriteString(string("registry")); err != nil {
+
if len(t.Registry) > 1000000 {
+
return xerrors.Errorf("Value in field t.Registry was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Registry))); err != nil {
+
if _, err := cw.WriteString(string(t.Registry)); err != nil {
+
func (t *Pipeline_Dependencies_Elem) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_Dependencies_Elem{}
+
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("Pipeline_Dependencies_Elem: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 8)
+
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.Packages ([]string) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Packages: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Packages = make([]string, extra)
+
for i := 0; i < int(extra); i++ {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Packages[i] = string(sval)
+
// t.Registry (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Registry = string(sval)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_ManualTriggerData) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
+
// t.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
+
if len("inputs") > 1000000 {
+
return xerrors.Errorf("Value in field \"inputs\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("inputs"))); err != nil {
+
if _, err := cw.WriteString(string("inputs")); err != nil {
+
if len(t.Inputs) > 8192 {
+
return xerrors.Errorf("Slice value in field t.Inputs was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Inputs))); err != nil {
+
for _, v := range t.Inputs {
+
if err := v.MarshalCBOR(cw); err != nil {
+
func (t *Pipeline_ManualTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_ManualTriggerData{}
+
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("Pipeline_ManualTriggerData: 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.Inputs ([]*tangled.Pipeline_ManualTriggerData_Inputs_Elem) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Inputs: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.Inputs = make([]*Pipeline_ManualTriggerData_Inputs_Elem, extra)
+
for i := 0; i < int(extra); i++ {
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Inputs[i] = new(Pipeline_ManualTriggerData_Inputs_Elem)
+
if err := t.Inputs[i].UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Inputs[i] pointer: %w", err)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{162}); err != nil {
+
// t.Key (string) (string)
+
if len("key") > 1000000 {
+
return xerrors.Errorf("Value in field \"key\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
+
if _, err := cw.WriteString(string("key")); err != nil {
+
if len(t.Key) > 1000000 {
+
return xerrors.Errorf("Value in field t.Key was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
+
// t.Value (string) (string)
+
if len("value") > 1000000 {
+
return xerrors.Errorf("Value in field \"value\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("value"))); err != nil {
+
if _, err := cw.WriteString(string("value")); err != nil {
+
if len(t.Value) > 1000000 {
+
return xerrors.Errorf("Value in field t.Value was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
+
if _, err := cw.WriteString(string(t.Value)); err != nil {
+
func (t *Pipeline_ManualTriggerData_Inputs_Elem) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_ManualTriggerData_Inputs_Elem{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("Pipeline_ManualTriggerData_Inputs_Elem: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 5)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
+
// t.Key (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.Value (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_PullRequestTriggerData) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{164}); err != nil {
+
// t.Action (string) (string)
+
if len("action") > 1000000 {
+
return xerrors.Errorf("Value in field \"action\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("action"))); err != nil {
+
if _, err := cw.WriteString(string("action")); err != nil {
+
if len(t.Action) > 1000000 {
+
return xerrors.Errorf("Value in field t.Action was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Action))); err != nil {
+
if _, err := cw.WriteString(string(t.Action)); err != nil {
+
// t.SourceSha (string) (string)
+
if len("sourceSha") > 1000000 {
+
return xerrors.Errorf("Value in field \"sourceSha\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sourceSha"))); err != nil {
+
if _, err := cw.WriteString(string("sourceSha")); err != nil {
+
if len(t.SourceSha) > 1000000 {
+
return xerrors.Errorf("Value in field t.SourceSha was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.SourceSha))); err != nil {
+
if _, err := cw.WriteString(string(t.SourceSha)); err != nil {
+
// t.SourceBranch (string) (string)
+
if len("sourceBranch") > 1000000 {
+
return xerrors.Errorf("Value in field \"sourceBranch\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sourceBranch"))); err != nil {
+
if _, err := cw.WriteString(string("sourceBranch")); err != nil {
+
if len(t.SourceBranch) > 1000000 {
+
return xerrors.Errorf("Value in field t.SourceBranch was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.SourceBranch))); err != nil {
+
if _, err := cw.WriteString(string(t.SourceBranch)); err != nil {
+
// t.TargetBranch (string) (string)
+
if len("targetBranch") > 1000000 {
+
return xerrors.Errorf("Value in field \"targetBranch\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetBranch"))); err != nil {
+
if _, err := cw.WriteString(string("targetBranch")); err != nil {
+
if len(t.TargetBranch) > 1000000 {
+
return xerrors.Errorf("Value in field t.TargetBranch was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetBranch))); err != nil {
+
if _, err := cw.WriteString(string(t.TargetBranch)); err != nil {
+
func (t *Pipeline_PullRequestTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_PullRequestTriggerData{}
+
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("Pipeline_PullRequestTriggerData: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 12)
+
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.Action (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.Action = string(sval)
+
// t.SourceSha (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.SourceSha = string(sval)
+
// t.SourceBranch (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.SourceBranch = string(sval)
+
// t.TargetBranch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.TargetBranch = string(sval)
···
+
func (t *Pipeline_PushTriggerData) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
// t.Ref (string) (string)
+
if len("ref") > 1000000 {
+
return xerrors.Errorf("Value in field \"ref\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ref"))); err != nil {
+
if _, err := cw.WriteString(string("ref")); err != nil {
+
if len(t.Ref) > 1000000 {
+
return xerrors.Errorf("Value in field t.Ref was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Ref))); err != nil {
+
if _, err := cw.WriteString(string(t.Ref)); err != nil {
+
// t.NewSha (string) (string)
+
if len("newSha") > 1000000 {
+
return xerrors.Errorf("Value in field \"newSha\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("newSha"))); err != nil {
+
if _, err := cw.WriteString(string("newSha")); err != nil {
+
if len(t.NewSha) > 1000000 {
+
return xerrors.Errorf("Value in field t.NewSha was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.NewSha))); err != nil {
+
if _, err := cw.WriteString(string(t.NewSha)); err != nil {
+
// t.OldSha (string) (string)
+
if len("oldSha") > 1000000 {
+
return xerrors.Errorf("Value in field \"oldSha\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("oldSha"))); err != nil {
+
if _, err := cw.WriteString(string("oldSha")); err != nil {
+
if len(t.OldSha) > 1000000 {
+
return xerrors.Errorf("Value in field t.OldSha was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.OldSha))); err != nil {
+
if _, err := cw.WriteString(string(t.OldSha)); err != nil {
+
func (t *Pipeline_PushTriggerData) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_PushTriggerData{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("Pipeline_PushTriggerData: 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)
···
switch string(nameBuf[:nameLen]) {
+
// t.Ref (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.NewSha (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.NewSha = string(sval)
+
// t.OldSha (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.OldSha = string(sval)
···
+
func (t *Pipeline_Step) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{162}); err != nil {
+
// t.Name (string) (string)
+
if len("name") > 1000000 {
+
return xerrors.Errorf("Value in field \"name\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
+
if _, err := cw.WriteString(string("name")); err != nil {
+
if len(t.Name) > 1000000 {
+
return xerrors.Errorf("Value in field t.Name was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
+
if _, err := cw.WriteString(string(t.Name)); err != nil {
+
// t.Command (string) (string)
+
if len("command") > 1000000 {
+
return xerrors.Errorf("Value in field \"command\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("command"))); err != nil {
+
if _, err := cw.WriteString(string("command")); err != nil {
+
if len(t.Command) > 1000000 {
+
return xerrors.Errorf("Value in field t.Command was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Command))); err != nil {
+
if _, err := cw.WriteString(string(t.Command)); err != nil {
+
func (t *Pipeline_Step) 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("Pipeline_Step: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 7)
+
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.Name (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Command (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Command = string(sval)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_TriggerMetadata) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if t.PullRequest == nil {
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
+
// t.Kind (string) (string)
+
if len("kind") > 1000000 {
+
return xerrors.Errorf("Value in field \"kind\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("kind"))); err != nil {
+
if _, err := cw.WriteString(string("kind")); err != nil {
+
if len(t.Kind) > 1000000 {
+
return xerrors.Errorf("Value in field t.Kind was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Kind))); err != nil {
+
if _, err := cw.WriteString(string(t.Kind)); err != nil {
+
// t.Push (tangled.Pipeline_PushTriggerData) (struct)
+
if len("push") > 1000000 {
+
return xerrors.Errorf("Value in field \"push\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("push"))); err != nil {
+
if _, err := cw.WriteString(string("push")); err != nil {
+
if err := t.Push.MarshalCBOR(cw); err != nil {
+
// t.Repo (tangled.Pipeline_TriggerRepo) (struct)
if len("repo") > 1000000 {
return xerrors.Errorf("Value in field \"repo\" was too long")
···
+
if err := t.Repo.MarshalCBOR(cw); err != nil {
+
// t.Manual (tangled.Pipeline_ManualTriggerData) (struct)
+
if len("manual") > 1000000 {
+
return xerrors.Errorf("Value in field \"manual\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("manual"))); err != nil {
+
if _, err := cw.WriteString(string("manual")); err != nil {
+
if err := t.Manual.MarshalCBOR(cw); err != nil {
+
// t.PullRequest (tangled.Pipeline_PullRequestTriggerData) (struct)
+
if t.PullRequest != nil {
+
if len("pullRequest") > 1000000 {
+
return xerrors.Errorf("Value in field \"pullRequest\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pullRequest"))); err != nil {
+
if _, err := cw.WriteString(string("pullRequest")); err != nil {
+
if err := t.PullRequest.MarshalCBOR(cw); err != nil {
+
func (t *Pipeline_TriggerMetadata) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_TriggerMetadata{}
+
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("Pipeline_TriggerMetadata: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 11)
+
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.Kind (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Push (tangled.Pipeline_PushTriggerData) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Push = new(Pipeline_PushTriggerData)
+
if err := t.Push.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Push pointer: %w", err)
+
// t.Repo (tangled.Pipeline_TriggerRepo) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Repo = new(Pipeline_TriggerRepo)
+
if err := t.Repo.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Repo pointer: %w", err)
+
// t.Manual (tangled.Pipeline_ManualTriggerData) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Manual = new(Pipeline_ManualTriggerData)
+
if err := t.Manual.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Manual pointer: %w", err)
+
// t.PullRequest (tangled.Pipeline_PullRequestTriggerData) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.PullRequest = new(Pipeline_PullRequestTriggerData)
+
if err := t.PullRequest.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.PullRequest pointer: %w", err)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *Pipeline_TriggerRepo) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{164}); err != nil {
+
// t.Did (string) (string)
+
if len("did") > 1000000 {
+
return xerrors.Errorf("Value in field \"did\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("did"))); err != nil {
+
if _, err := cw.WriteString(string("did")); err != nil {
+
if len(t.Did) > 1000000 {
+
return xerrors.Errorf("Value in field t.Did was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Did))); err != nil {
+
if _, err := cw.WriteString(string(t.Did)); err != nil {
+
// t.Knot (string) (string)
+
if len("knot") > 1000000 {
+
return xerrors.Errorf("Value in field \"knot\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("knot"))); err != nil {
+
if _, err := cw.WriteString(string("knot")); err != nil {
+
if len(t.Knot) > 1000000 {
+
return xerrors.Errorf("Value in field t.Knot was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Knot))); err != nil {
+
if _, err := cw.WriteString(string(t.Knot)); 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.DefaultBranch (string) (string)
+
if len("defaultBranch") > 1000000 {
+
return xerrors.Errorf("Value in field \"defaultBranch\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("defaultBranch"))); err != nil {
+
if _, err := cw.WriteString(string("defaultBranch")); err != nil {
+
if len(t.DefaultBranch) > 1000000 {
+
return xerrors.Errorf("Value in field t.DefaultBranch was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.DefaultBranch))); err != nil {
+
if _, err := cw.WriteString(string(t.DefaultBranch)); err != nil {
+
func (t *Pipeline_TriggerRepo) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = Pipeline_TriggerRepo{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("Pipeline_TriggerRepo: 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)
···
switch string(nameBuf[:nameLen]) {
+
// t.Did (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Knot (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
// t.Repo (string) (string)
···
+
// t.DefaultBranch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.DefaultBranch = string(sval)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *PublicKey) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{164}); err != nil {
+
// t.Key (string) (string)
+
if len("key") > 1000000 {
+
return xerrors.Errorf("Value in field \"key\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("key"))); err != nil {
+
if _, err := cw.WriteString(string("key")); err != nil {
+
if len(t.Key) > 1000000 {
+
return xerrors.Errorf("Value in field t.Key was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
+
if _, err := cw.WriteString(string(t.Key)); err != nil {
+
// t.Name (string) (string)
+
if len("name") > 1000000 {
+
return xerrors.Errorf("Value in field \"name\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
+
if _, err := cw.WriteString(string("name")); err != nil {
+
if len(t.Name) > 1000000 {
+
return xerrors.Errorf("Value in field t.Name was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
+
if _, err := cw.WriteString(string(t.Name)); err != nil {
+
// t.LexiconTypeID (string) (string)
+
if len("$type") > 1000000 {
+
return xerrors.Errorf("Value in field \"$type\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
+
if _, err := cw.WriteString(string("$type")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.publicKey"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.publicKey")); err != nil {
+
// t.CreatedAt (string) (string)
+
if len("createdAt") > 1000000 {
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
+
if len(t.CreatedAt) > 1000000 {
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
+
func (t *PublicKey) 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("PublicKey: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 9)
+
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.Key (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.Name (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
// t.CreatedAt (string) (string)
···
+
func (t *RepoArtifact) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
+
// t.Tag (util.LexBytes) (slice)
+
if len("tag") > 1000000 {
+
return xerrors.Errorf("Value in field \"tag\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("tag"))); err != nil {
+
if _, err := cw.WriteString(string("tag")); err != nil {
+
if len(t.Tag) > 2097152 {
+
return xerrors.Errorf("Byte array in field t.Tag was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Tag))); err != nil {
+
if _, err := cw.Write(t.Tag); err != nil {
+
// t.Name (string) (string)
+
if len("name") > 1000000 {
+
return xerrors.Errorf("Value in field \"name\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("name"))); err != nil {
+
if _, err := cw.WriteString(string("name")); err != nil {
+
if len(t.Name) > 1000000 {
+
return xerrors.Errorf("Value in field t.Name was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
+
if _, err := cw.WriteString(string(t.Name)); 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.LexiconTypeID (string) (string)
+
if len("$type") > 1000000 {
+
return xerrors.Errorf("Value in field \"$type\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
+
if _, err := cw.WriteString(string("$type")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.artifact"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo.artifact")); err != nil {
+
// t.Artifact (util.LexBlob) (struct)
+
if len("artifact") > 1000000 {
+
return xerrors.Errorf("Value in field \"artifact\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("artifact"))); err != nil {
+
if _, err := cw.WriteString(string("artifact")); err != nil {
+
if err := t.Artifact.MarshalCBOR(cw); err != nil {
+
// t.CreatedAt (string) (string)
+
if len("createdAt") > 1000000 {
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
+
if len(t.CreatedAt) > 1000000 {
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
+
func (t *RepoArtifact) 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("RepoArtifact: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 9)
+
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.Tag (util.LexBytes) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.Tag: byte array too large (%d)", extra)
+
if maj != cbg.MajByteString {
+
return fmt.Errorf("expected byte array")
+
t.Tag = make([]uint8, extra)
+
if _, err := io.ReadFull(cr, t.Tag); err != nil {
+
// t.Name (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Repo (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
+
// t.Artifact (util.LexBlob) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Artifact = new(util.LexBlob)
+
if err := t.Artifact.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Artifact pointer: %w", err)
+
// t.CreatedAt (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.CreatedAt = string(sval)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *RepoIssue) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
···
+
// 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.LexiconTypeID (string) (string)
if len("$type") > 1000000 {
return xerrors.Errorf("Value in field \"$type\" was too long")
···
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue")); err != nil {
+
// t.Owner (string) (string)
+
if len("owner") > 1000000 {
+
return xerrors.Errorf("Value in field \"owner\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
+
if _, err := cw.WriteString(string("owner")); err != nil {
+
if len(t.Owner) > 1000000 {
+
return xerrors.Errorf("Value in field t.Owner was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Owner))); err != nil {
+
if _, err := cw.WriteString(string(t.Owner)); err != nil {
···
+
// t.IssueId (int64) (int64)
+
if len("issueId") > 1000000 {
+
return xerrors.Errorf("Value in field \"issueId\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issueId"))); err != nil {
+
if _, err := cw.WriteString(string("issueId")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.IssueId)); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.IssueId-1)); err != nil {
···
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
+
func (t *RepoIssue) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("RepoIssue: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 9)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
t.Body = (*string)(&sval)
+
// t.Repo (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
+
// t.Owner (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
// t.Title (string) (string)
···
+
// t.IssueId (int64) (int64)
maj, extra, err := cr.ReadHeader()
···
return fmt.Errorf("wrong type for int64 field: %d", maj)
+
t.IssueId = int64(extraI)
// t.CreatedAt (string) (string)
···
t.CreatedAt = string(sval)
// Field doesn't exist on this type, so ignore it
···
+
func (t *RepoIssueComment) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
+
if t.CommentId == nil {
···
+
// t.Body (string) (string)
+
if len("body") > 1000000 {
+
return xerrors.Errorf("Value in field \"body\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
+
if _, err := cw.WriteString(string("body")); err != nil {
+
if len(t.Body) > 1000000 {
+
return xerrors.Errorf("Value in field t.Body was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Body))); err != nil {
+
if _, err := cw.WriteString(string(t.Body)); err != nil {
// t.Repo (string) (string)
···
+
// t.LexiconTypeID (string) (string)
+
if len("$type") > 1000000 {
+
return xerrors.Errorf("Value in field \"$type\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
+
if _, err := cw.WriteString(string("$type")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.comment"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue.comment")); err != nil {
+
// t.Issue (string) (string)
+
if len("issue") > 1000000 {
+
return xerrors.Errorf("Value in field \"issue\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
+
if _, err := cw.WriteString(string("issue")); err != nil {
+
if len(t.Issue) > 1000000 {
+
return xerrors.Errorf("Value in field t.Issue was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
+
if _, err := cw.WriteString(string(t.Issue)); err != nil {
+
// t.Owner (string) (string)
+
if len("owner") > 1000000 {
+
return xerrors.Errorf("Value in field \"owner\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("owner"))); err != nil {
+
if _, err := cw.WriteString(string("owner")); err != nil {
+
if _, err := cw.Write(cbg.CborNull); err != nil {
+
if len(*t.Owner) > 1000000 {
+
return xerrors.Errorf("Value in field t.Owner was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Owner))); err != nil {
+
if _, err := cw.WriteString(string(*t.Owner)); err != nil {
+
// t.CommentId (int64) (int64)
+
if t.CommentId != nil {
+
if len("commentId") > 1000000 {
+
return xerrors.Errorf("Value in field \"commentId\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("commentId"))); err != nil {
+
if _, err := cw.WriteString(string("commentId")); err != nil {
+
if t.CommentId == nil {
+
if _, err := cw.Write(cbg.CborNull); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(*t.CommentId)); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-*t.CommentId-1)); err != nil {
+
// t.CreatedAt (string) (string)
+
if len("createdAt") > 1000000 {
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
+
if len(t.CreatedAt) > 1000000 {
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
+
func (t *RepoIssueComment) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = RepoIssueComment{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("RepoIssueComment: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 9)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
+
// t.Body (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Repo (string) (string)
···
t.Repo = (*string)(&sval)
+
// t.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
+
// t.Issue (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Owner (string) (string)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Owner = (*string)(&sval)
+
// t.CommentId (int64) (int64)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
maj, extra, err := cr.ReadHeader()
+
case cbg.MajUnsignedInt:
+
return fmt.Errorf("int64 positive overflow")
+
case cbg.MajNegativeInt:
+
return fmt.Errorf("int64 negative overflow")
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
+
t.CommentId = (*int64)(&extraI)
+
// t.CreatedAt (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.CreatedAt = string(sval)
···
+
func (t *RepoIssueState) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
// t.LexiconTypeID (string) (string)
+
if len("$type") > 1000000 {
+
return xerrors.Errorf("Value in field \"$type\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil {
+
if _, err := cw.WriteString(string("$type")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.issue.state"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo.issue.state")); err != nil {
+
// t.Issue (string) (string)
+
if len("issue") > 1000000 {
+
return xerrors.Errorf("Value in field \"issue\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("issue"))); err != nil {
+
if _, err := cw.WriteString(string("issue")); err != nil {
+
if len(t.Issue) > 1000000 {
+
return xerrors.Errorf("Value in field t.Issue was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Issue))); err != nil {
+
if _, err := cw.WriteString(string(t.Issue)); err != nil {
+
// t.State (string) (string)
+
if len("state") > 1000000 {
+
return xerrors.Errorf("Value in field \"state\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("state"))); err != nil {
+
if _, err := cw.WriteString(string("state")); err != nil {
+
if len(t.State) > 1000000 {
+
return xerrors.Errorf("Value in field t.State was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil {
+
if _, err := cw.WriteString(string(t.State)); err != nil {
+
func (t *RepoIssueState) 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("RepoIssueState: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 5)
+
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.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
+
// t.Issue (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.State (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *RepoPull) MarshalCBOR(w io.Writer) error {
+
_, err := w.Write(cbg.CborNull)
+
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write(cbg.CborEncodeMajorType(cbg.MajMap, uint64(fieldCount))); err != nil {
+
// t.Body (string) (string)
+
if len("body") > 1000000 {
+
return xerrors.Errorf("Value in field \"body\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("body"))); err != nil {
+
if _, err := cw.WriteString(string("body")); err != nil {
+
if _, err := cw.Write(cbg.CborNull); err != nil {
+
if len(*t.Body) > 1000000 {
+
return xerrors.Errorf("Value in field t.Body was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Body))); err != nil {
+
if _, err := cw.WriteString(string(*t.Body)); err != nil {
// t.LexiconTypeID (string) (string)
if len("$type") > 1000000 {
return xerrors.Errorf("Value in field \"$type\" was too long")
···
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull")); err != nil {
+
// t.Patch (string) (string)
+
if len("patch") > 1000000 {
+
return xerrors.Errorf("Value in field \"patch\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("patch"))); err != nil {
+
if _, err := cw.WriteString(string("patch")); err != nil {
+
if len(t.Patch) > 1000000 {
+
return xerrors.Errorf("Value in field t.Patch was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Patch))); err != nil {
+
if _, err := cw.WriteString(string(t.Patch)); err != nil {
+
// t.Title (string) (string)
+
if len("title") > 1000000 {
+
return xerrors.Errorf("Value in field \"title\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("title"))); err != nil {
+
if _, err := cw.WriteString(string("title")); err != nil {
+
if len(t.Title) > 1000000 {
+
return xerrors.Errorf("Value in field t.Title was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Title))); err != nil {
+
if _, err := cw.WriteString(string(t.Title)); err != nil {
+
// t.PullId (int64) (int64)
+
if len("pullId") > 1000000 {
+
return xerrors.Errorf("Value in field \"pullId\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pullId"))); err != nil {
+
if _, err := cw.WriteString(string("pullId")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PullId)); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.PullId-1)); err != nil {
+
// t.Source (tangled.RepoPull_Source) (struct)
+
if len("source") > 1000000 {
+
return xerrors.Errorf("Value in field \"source\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("source"))); err != nil {
+
if _, err := cw.WriteString(string("source")); err != nil {
+
if err := t.Source.MarshalCBOR(cw); err != nil {
+
// t.CreatedAt (string) (string)
+
if len("createdAt") > 1000000 {
+
return xerrors.Errorf("Value in field \"createdAt\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil {
+
if _, err := cw.WriteString(string("createdAt")); err != nil {
+
if len(t.CreatedAt) > 1000000 {
+
return xerrors.Errorf("Value in field t.CreatedAt was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil {
+
if _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
+
// t.TargetRepo (string) (string)
+
if len("targetRepo") > 1000000 {
+
return xerrors.Errorf("Value in field \"targetRepo\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetRepo"))); err != nil {
+
if _, err := cw.WriteString(string("targetRepo")); err != nil {
+
if len(t.TargetRepo) > 1000000 {
+
return xerrors.Errorf("Value in field t.TargetRepo was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetRepo))); err != nil {
+
if _, err := cw.WriteString(string(t.TargetRepo)); err != nil {
+
// t.TargetBranch (string) (string)
+
if len("targetBranch") > 1000000 {
+
return xerrors.Errorf("Value in field \"targetBranch\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("targetBranch"))); err != nil {
+
if _, err := cw.WriteString(string("targetBranch")); err != nil {
+
if len(t.TargetBranch) > 1000000 {
+
return xerrors.Errorf("Value in field t.TargetBranch was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.TargetBranch))); err != nil {
+
if _, err := cw.WriteString(string(t.TargetBranch)); err != nil {
+
func (t *RepoPull) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("RepoPull: map struct too large (%d)", extra)
+
nameBuf := make([]byte, 12)
for i := uint64(0); i < n; i++ {
nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000)
···
switch string(nameBuf[:nameLen]) {
+
// t.Body (string) (string)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Body = (*string)(&sval)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
+
// t.Patch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.Title (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.PullId (int64) (int64)
+
maj, extra, err := cr.ReadHeader()
+
case cbg.MajUnsignedInt:
+
return fmt.Errorf("int64 positive overflow")
+
case cbg.MajNegativeInt:
+
return fmt.Errorf("int64 negative overflow")
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
+
t.PullId = int64(extraI)
+
// t.Source (tangled.RepoPull_Source) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Source = new(RepoPull_Source)
+
if err := t.Source.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Source pointer: %w", err)
+
// t.CreatedAt (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.CreatedAt = string(sval)
+
// t.TargetRepo (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.TargetRepo = string(sval)
+
// t.TargetBranch (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.TargetBranch = string(sval)
···
+
func (t *RepoPull_Source) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
···
+
// 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 _, err := cw.Write(cbg.CborNull); 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_Source) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("RepoPull_Source: 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)
···
switch string(nameBuf[:nameLen]) {
+
// t.Repo (string) (string)
···
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Repo = (*string)(&sval)
+
// t.Branch (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.Branch = string(sval)
···
+
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{163}); err != nil {
+
// t.Pull (string) (string)
+
if len("pull") > 1000000 {
+
return xerrors.Errorf("Value in field \"pull\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pull"))); err != nil {
+
if _, err := cw.WriteString(string("pull")); err != nil {
+
if len(t.Pull) > 1000000 {
+
return xerrors.Errorf("Value in field t.Pull was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Pull))); err != nil {
+
if _, err := cw.WriteString(string(t.Pull)); err != nil {
···
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.status"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull.status")); err != nil {
+
// t.Status (string) (string)
+
if len("status") > 1000000 {
+
return xerrors.Errorf("Value in field \"status\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("status"))); err != nil {
+
if _, err := cw.WriteString(string("status")); err != nil {
+
if len(t.Status) > 1000000 {
+
return xerrors.Errorf("Value in field t.Status was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
+
if _, err := cw.WriteString(string(t.Status)); err != nil {
+
func (t *RepoPullStatus) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("RepoPullStatus: 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)
···
switch string(nameBuf[:nameLen]) {
+
// t.Pull (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.LexiconTypeID (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.LexiconTypeID = string(sval)
+
// t.Status (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Status = string(sval)