···
+
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{162}); err != nil {
+
// t.Count (int64) (int64)
+
if len("count") > 1000000 {
+
return xerrors.Errorf("Value in field \"count\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("count"))); err != nil {
+
if _, err := cw.WriteString(string("count")); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Count)); err != nil {
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Count-1)); err != nil {
+
// t.Email (string) (string)
+
if len("email") > 1000000 {
+
return xerrors.Errorf("Value in field \"email\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("email"))); err != nil {
+
if _, err := cw.WriteString(string("email")); err != nil {
+
if len(t.Email) > 1000000 {
+
return xerrors.Errorf("Value in field t.Email was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Email))); err != nil {
+
if _, err := cw.WriteString(string(t.Email)); err != nil {
+
func (t *GitRefUpdate_Meta_CommitCount_ByEmail_Elem) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = GitRefUpdate_Meta_CommitCount_ByEmail_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("GitRefUpdate_Meta_CommitCount_ByEmail_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.Count (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.Count = int64(extraI)
+
// t.Email (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 *GitRefUpdate_Meta_CommitCount) 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.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
+
if len("byEmail") > 1000000 {
+
return xerrors.Errorf("Value in field \"byEmail\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("byEmail"))); err != nil {
+
if _, err := cw.WriteString(string("byEmail")); err != nil {
+
if len(t.ByEmail) > 8192 {
+
return xerrors.Errorf("Slice value in field t.ByEmail was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.ByEmail))); err != nil {
+
for _, v := range t.ByEmail {
+
if err := v.MarshalCBOR(cw); err != nil {
+
func (t *GitRefUpdate_Meta_CommitCount) UnmarshalCBOR(r io.Reader) (err error) {
+
*t = GitRefUpdate_Meta_CommitCount{}
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("GitRefUpdate_Meta_CommitCount: 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)
···
switch string(nameBuf[:nameLen]) {
+
// t.ByEmail ([]*tangled.GitRefUpdate_Meta_CommitCount_ByEmail_Elem) (slice)
+
maj, extra, err = cr.ReadHeader()
+
return fmt.Errorf("t.ByEmail: array too large (%d)", extra)
+
if maj != cbg.MajArray {
+
return fmt.Errorf("expected cbor array")
+
t.ByEmail = make([]*GitRefUpdate_Meta_CommitCount_ByEmail_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.ByEmail[i] = new(GitRefUpdate_Meta_CommitCount_ByEmail_Elem)
+
if err := t.ByEmail[i].UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.ByEmail[i] pointer: %w", err)
···
+
func (t *GitRefUpdate) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
+
if _, err := cw.Write([]byte{168}); 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.Meta (tangled.GitRefUpdate_Meta) (struct)
+
if len("meta") > 1000000 {
+
return xerrors.Errorf("Value in field \"meta\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("meta"))); err != nil {
+
if _, err := cw.WriteString(string("meta")); err != nil {
+
if err := t.Meta.MarshalCBOR(cw); 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)
···
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)
···
switch string(nameBuf[:nameLen]) {
+
// t.Ref (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Meta (tangled.GitRefUpdate_Meta) (struct)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
t.Meta = new(GitRefUpdate_Meta)
+
if err := t.Meta.UnmarshalCBOR(cr); err != nil {
+
return xerrors.Errorf("unmarshaling t.Meta pointer: %w", err)
+
// 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)
···
func (t *Pipeline_CloneOpts) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
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)
···
+
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)
···
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)
···
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)
···
+
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_Workflow) 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)
···
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)
···
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)
···
+
func (t *RepoArtifact) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
···
+
// 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)
···
+
// 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 _, err := cw.WriteString(string(t.CreatedAt)); err != nil {
+
func (t *RepoArtifact) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
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)
···
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)
···
+
// 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)
···
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)
···
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 {
+
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 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)
+
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.LexiconTypeID (string) (string)
···
+
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")
···
+
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)
···
switch string(nameBuf[:nameLen]) {
+
// t.Body (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
// t.Repo (string) (string)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Repo = (*string)(&sval)
// t.LexiconTypeID (string) (string)
···
t.LexiconTypeID = string(sval)
+
// t.Issue (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
// t.Owner (string) (string)
···
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)
···
+
func (t *RepoIssueState) 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.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 *RepoIssue) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
func (t *RepoPullComment) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
// 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 {
// t.Repo (string) (string)
···
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sh.tangled.repo.pull.comment"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo.pull.comment")); err != nil {
···
+
func (t *RepoPullComment) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("RepoPullComment: map struct too large (%d)", extra)
···
+
// t.Pull (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
// t.Repo (string) (string)
···
t.LexiconTypeID = string(sval)
// t.Owner (string) (string)
···
+
func (t *RepoPullStatus) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
+
// 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 {
+
// 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.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)
···
t.LexiconTypeID = string(sval)
+
// t.Status (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.Status = string(sval)
+
// Field doesn't exist on this type, so ignore it
+
if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil {
+
func (t *RepoPull_Source) 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.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)
+
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_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)
+
// 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)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
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 *Repo) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
···
cw := cbg.NewCborWriter(w)
+
if t.Description == 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.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("sh.tangled.repo"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.repo")); 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.Source (string) (string)
+
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 := cw.Write(cbg.CborNull); err != nil {
+
if len(*t.Source) > 1000000 {
+
return xerrors.Errorf("Value in field t.Source was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Source))); err != nil {
+
if _, err := cw.WriteString(string(*t.Source)); err != nil {
// t.CreatedAt (string) (string)
···
if _, err := cw.WriteString(string(t.CreatedAt)); 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 {
+
func (t *Repo) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("Repo: 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)
···
switch string(nameBuf[:nameLen]) {
+
// t.Knot (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.Owner (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
// t.Source (string) (string)
···
+
t.Source = (*string)(&sval)
+
// t.CreatedAt (string) (string)
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.CreatedAt = string(sval)
+
// t.Description (string) (string)
···
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Description = (*string)(&sval)
···
+
func (t *SpindleMember) MarshalCBOR(w io.Writer) error {
_, err := w.Write(cbg.CborNull)
cw := cbg.NewCborWriter(w)
···
+
// 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.spindle.member"))); err != nil {
+
if _, err := cw.WriteString(string("sh.tangled.spindle.member")); err != nil {
+
// t.Subject (string) (string)
+
if len("subject") > 1000000 {
+
return xerrors.Errorf("Value in field \"subject\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("subject"))); err != nil {
+
if _, err := cw.WriteString(string("subject")); err != nil {
+
if len(t.Subject) > 1000000 {
+
return xerrors.Errorf("Value in field t.Subject was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Subject))); err != nil {
+
if _, err := cw.WriteString(string(t.Subject)); err != nil {
+
// t.Instance (string) (string)
+
if len("instance") > 1000000 {
+
return xerrors.Errorf("Value in field \"instance\" was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("instance"))); err != nil {
+
if _, err := cw.WriteString(string("instance")); err != nil {
+
if _, err := cw.Write(cbg.CborNull); err != nil {
+
if len(*t.Instance) > 1000000 {
+
return xerrors.Errorf("Value in field t.Instance was too long")
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Instance))); err != nil {
+
if _, err := cw.WriteString(string(*t.Instance)); 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 *SpindleMember) UnmarshalCBOR(r io.Reader) (err error) {
cr := cbg.NewCborReader(r)
···
if extra > cbg.MaxLength {
+
return fmt.Errorf("SpindleMember: 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.LexiconTypeID (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.LexiconTypeID = string(sval)
+
// t.Subject (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.Subject = string(sval)
+
// t.Instance (string) (string)
+
b, err := cr.ReadByte()
+
if b != cbg.CborNull[0] {
+
if err := cr.UnreadByte(); err != nil {
+
sval, err := cbg.ReadStringWithMax(cr, 1000000)
+
t.Instance = (*string)(&sval)
+
// t.CreatedAt (string) (string)
sval, err := cbg.ReadStringWithMax(cr, 1000000)
···
+
t.CreatedAt = string(sval)