this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Import atproto Repo Dependency (#1034)

authored by

Jim Calabro and committed by
GitHub
c41fea6b 4fe62dbd

+258
+232
api/bsky/cbor_gen.go
··· 8508 8508 8509 8509 return nil 8510 8510 } 8511 + func (t *GraphVerification) MarshalCBOR(w io.Writer) error { 8512 + if t == nil { 8513 + _, err := w.Write(cbg.CborNull) 8514 + return err 8515 + } 8516 + 8517 + cw := cbg.NewCborWriter(w) 8518 + 8519 + if _, err := cw.Write([]byte{165}); err != nil { 8520 + return err 8521 + } 8522 + 8523 + // t.LexiconTypeID (string) (string) 8524 + if len("$type") > 1000000 { 8525 + return xerrors.Errorf("Value in field \"$type\" was too long") 8526 + } 8527 + 8528 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil { 8529 + return err 8530 + } 8531 + if _, err := cw.WriteString(string("$type")); err != nil { 8532 + return err 8533 + } 8534 + 8535 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("app.bsky.graph.verification"))); err != nil { 8536 + return err 8537 + } 8538 + if _, err := cw.WriteString(string("app.bsky.graph.verification")); err != nil { 8539 + return err 8540 + } 8541 + 8542 + // t.Handle (string) (string) 8543 + if len("handle") > 1000000 { 8544 + return xerrors.Errorf("Value in field \"handle\" was too long") 8545 + } 8546 + 8547 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("handle"))); err != nil { 8548 + return err 8549 + } 8550 + if _, err := cw.WriteString(string("handle")); err != nil { 8551 + return err 8552 + } 8553 + 8554 + if len(t.Handle) > 1000000 { 8555 + return xerrors.Errorf("Value in field t.Handle was too long") 8556 + } 8557 + 8558 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Handle))); err != nil { 8559 + return err 8560 + } 8561 + if _, err := cw.WriteString(string(t.Handle)); err != nil { 8562 + return err 8563 + } 8564 + 8565 + // t.Subject (string) (string) 8566 + if len("subject") > 1000000 { 8567 + return xerrors.Errorf("Value in field \"subject\" was too long") 8568 + } 8569 + 8570 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("subject"))); err != nil { 8571 + return err 8572 + } 8573 + if _, err := cw.WriteString(string("subject")); err != nil { 8574 + return err 8575 + } 8576 + 8577 + if len(t.Subject) > 1000000 { 8578 + return xerrors.Errorf("Value in field t.Subject was too long") 8579 + } 8580 + 8581 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Subject))); err != nil { 8582 + return err 8583 + } 8584 + if _, err := cw.WriteString(string(t.Subject)); err != nil { 8585 + return err 8586 + } 8587 + 8588 + // t.CreatedAt (string) (string) 8589 + if len("createdAt") > 1000000 { 8590 + return xerrors.Errorf("Value in field \"createdAt\" was too long") 8591 + } 8592 + 8593 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil { 8594 + return err 8595 + } 8596 + if _, err := cw.WriteString(string("createdAt")); err != nil { 8597 + return err 8598 + } 8599 + 8600 + if len(t.CreatedAt) > 1000000 { 8601 + return xerrors.Errorf("Value in field t.CreatedAt was too long") 8602 + } 8603 + 8604 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil { 8605 + return err 8606 + } 8607 + if _, err := cw.WriteString(string(t.CreatedAt)); err != nil { 8608 + return err 8609 + } 8610 + 8611 + // t.DisplayName (string) (string) 8612 + if len("displayName") > 1000000 { 8613 + return xerrors.Errorf("Value in field \"displayName\" was too long") 8614 + } 8615 + 8616 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("displayName"))); err != nil { 8617 + return err 8618 + } 8619 + if _, err := cw.WriteString(string("displayName")); err != nil { 8620 + return err 8621 + } 8622 + 8623 + if len(t.DisplayName) > 1000000 { 8624 + return xerrors.Errorf("Value in field t.DisplayName was too long") 8625 + } 8626 + 8627 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.DisplayName))); err != nil { 8628 + return err 8629 + } 8630 + if _, err := cw.WriteString(string(t.DisplayName)); err != nil { 8631 + return err 8632 + } 8633 + return nil 8634 + } 8635 + 8636 + func (t *GraphVerification) UnmarshalCBOR(r io.Reader) (err error) { 8637 + *t = GraphVerification{} 8638 + 8639 + cr := cbg.NewCborReader(r) 8640 + 8641 + maj, extra, err := cr.ReadHeader() 8642 + if err != nil { 8643 + return err 8644 + } 8645 + defer func() { 8646 + if err == io.EOF { 8647 + err = io.ErrUnexpectedEOF 8648 + } 8649 + }() 8650 + 8651 + if maj != cbg.MajMap { 8652 + return fmt.Errorf("cbor input should be of type map") 8653 + } 8654 + 8655 + if extra > cbg.MaxLength { 8656 + return fmt.Errorf("GraphVerification: map struct too large (%d)", extra) 8657 + } 8658 + 8659 + n := extra 8660 + 8661 + nameBuf := make([]byte, 11) 8662 + for i := uint64(0); i < n; i++ { 8663 + nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000) 8664 + if err != nil { 8665 + return err 8666 + } 8667 + 8668 + if !ok { 8669 + // Field doesn't exist on this type, so ignore it 8670 + if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil { 8671 + return err 8672 + } 8673 + continue 8674 + } 8675 + 8676 + switch string(nameBuf[:nameLen]) { 8677 + // t.LexiconTypeID (string) (string) 8678 + case "$type": 8679 + 8680 + { 8681 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 8682 + if err != nil { 8683 + return err 8684 + } 8685 + 8686 + t.LexiconTypeID = string(sval) 8687 + } 8688 + // t.Handle (string) (string) 8689 + case "handle": 8690 + 8691 + { 8692 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 8693 + if err != nil { 8694 + return err 8695 + } 8696 + 8697 + t.Handle = string(sval) 8698 + } 8699 + // t.Subject (string) (string) 8700 + case "subject": 8701 + 8702 + { 8703 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 8704 + if err != nil { 8705 + return err 8706 + } 8707 + 8708 + t.Subject = string(sval) 8709 + } 8710 + // t.CreatedAt (string) (string) 8711 + case "createdAt": 8712 + 8713 + { 8714 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 8715 + if err != nil { 8716 + return err 8717 + } 8718 + 8719 + t.CreatedAt = string(sval) 8720 + } 8721 + // t.DisplayName (string) (string) 8722 + case "displayName": 8723 + 8724 + { 8725 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 8726 + if err != nil { 8727 + return err 8728 + } 8729 + 8730 + t.DisplayName = string(sval) 8731 + } 8732 + 8733 + default: 8734 + // Field doesn't exist on this type, so ignore it 8735 + if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil { 8736 + return err 8737 + } 8738 + } 8739 + } 8740 + 8741 + return nil 8742 + }
+25
api/bsky/graphverification.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.verification 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.graph.verification", &GraphVerification{}) 13 + } // 14 + // RECORDTYPE: GraphVerification 15 + type GraphVerification struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.graph.verification" cborgen:"$type,const=app.bsky.graph.verification"` 17 + // createdAt: Date of when the verification was created. 18 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 19 + // displayName: Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. 20 + DisplayName string `json:"displayName" cborgen:"displayName"` 21 + // handle: Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. 22 + Handle string `json:"handle" cborgen:"handle"` 23 + // subject: DID of the subject the verification applies to. 24 + Subject string `json:"subject" cborgen:"subject"` 25 + }
+1
gen/main.go
··· 74 74 bsky.EmbedVideo{}, bsky.EmbedVideo_Caption{}, 75 75 bsky.FeedPostgate{}, 76 76 bsky.FeedPostgate_DisableRule{}, 77 + bsky.GraphVerification{}, 77 78 /*bsky.EmbedImages_View{}, 78 79 bsky.EmbedRecord_View{}, bsky.EmbedRecordWithMedia_View{}, 79 80 bsky.EmbedExternal_View{}, bsky.EmbedImages_ViewImage{},