this repo has no description
0
fork

Configure Feed

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

update other packages for atdata rename

+28 -28
+11 -11
atproto/label/label.go
··· 6 6 7 7 comatproto "github.com/bluesky-social/indigo/api/atproto" 8 8 "github.com/bluesky-social/indigo/atproto/atcrypto" 9 - "github.com/bluesky-social/indigo/atproto/data" 9 + "github.com/bluesky-social/indigo/atproto/atdata" 10 10 "github.com/bluesky-social/indigo/atproto/syntax" 11 11 ) 12 12 ··· 14 14 const ATPROTO_LABEL_VERSION int64 = 1 15 15 16 16 type Label struct { 17 - CID *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 18 - CreatedAt string `json:"cts" cborgen:"cts"` 19 - ExpiresAt *string `json:"exp,omitempty" cborgen:"exp,omitempty"` 20 - Negated *bool `json:"neg,omitempty" cborgen:"neg,omitempty"` 21 - SourceDID string `json:"src" cborgen:"src"` 22 - URI string `json:"uri" cborgen:"uri"` 23 - Val string `json:"val" cborgen:"val"` 24 - Version int64 `json:"ver" cborgen:"ver"` 25 - Sig data.Bytes `json:"sig,omitempty" cborgen:"sig,omitempty"` 17 + CID *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 18 + CreatedAt string `json:"cts" cborgen:"cts"` 19 + ExpiresAt *string `json:"exp,omitempty" cborgen:"exp,omitempty"` 20 + Negated *bool `json:"neg,omitempty" cborgen:"neg,omitempty"` 21 + SourceDID string `json:"src" cborgen:"src"` 22 + URI string `json:"uri" cborgen:"uri"` 23 + Val string `json:"val" cborgen:"val"` 24 + Version int64 `json:"ver" cborgen:"ver"` 25 + Sig atdata.Bytes `json:"sig,omitempty" cborgen:"sig,omitempty"` 26 26 } 27 27 28 28 // converts to map[string]any for printing as JSON ··· 45 45 d["neg"] = l.Negated 46 46 } 47 47 if l.Sig != nil { 48 - d["sig"] = data.Bytes(l.Sig) 48 + d["sig"] = atdata.Bytes(l.Sig) 49 49 } 50 50 return d 51 51 }
+2 -2
atproto/lexicon/cmd/lextool/net.go
··· 7 7 "log/slog" 8 8 "net/http" 9 9 10 - "github.com/bluesky-social/indigo/atproto/data" 10 + "github.com/bluesky-social/indigo/atproto/atdata" 11 11 "github.com/bluesky-social/indigo/atproto/identity" 12 12 "github.com/bluesky-social/indigo/atproto/lexicon" 13 13 "github.com/bluesky-social/indigo/atproto/syntax" ··· 64 64 return err 65 65 } 66 66 67 - body, err := data.UnmarshalJSON(respBytes) 67 + body, err := atdata.UnmarshalJSON(respBytes) 68 68 if err != nil { 69 69 return err 70 70 }
+2 -2
atproto/lexicon/examples_test.go
··· 3 3 import ( 4 4 "fmt" 5 5 6 - atdata "github.com/bluesky-social/indigo/atproto/data" 6 + "github.com/bluesky-social/indigo/atproto/atdata" 7 7 ) 8 8 9 9 func ExampleValidateRecord() { ··· 14 14 panic("failed to load lexicons") 15 15 } 16 16 17 - // Parse record JSON data using atproto/data helper 17 + // Parse record JSON data using atdata helper 18 18 recordJSON := `{ 19 19 "$type": "example.lexicon.record", 20 20 "integer": 123,
+3 -3
atproto/lexicon/interop_record_test.go
··· 7 7 "os" 8 8 "testing" 9 9 10 - "github.com/bluesky-social/indigo/atproto/data" 10 + "github.com/bluesky-social/indigo/atproto/atdata" 11 11 12 12 "github.com/stretchr/testify/assert" 13 13 ) ··· 44 44 45 45 for _, fixture := range fixtures { 46 46 fmt.Println(fixture.Name) 47 - d, err := data.UnmarshalJSON(fixture.Data) 47 + d, err := atdata.UnmarshalJSON(fixture.Data) 48 48 if err != nil { 49 49 t.Fatal(err) 50 50 } ··· 79 79 80 80 for _, fixture := range fixtures { 81 81 fmt.Println(fixture.Name) 82 - d, err := data.UnmarshalJSON(fixture.Data) 82 + d, err := atdata.UnmarshalJSON(fixture.Data) 83 83 if err != nil { 84 84 t.Fatal(err) 85 85 }
+4 -4
atproto/lexicon/language.go
··· 6 6 "reflect" 7 7 "strings" 8 8 9 - "github.com/bluesky-social/indigo/atproto/data" 9 + "github.com/bluesky-social/indigo/atproto/atdata" 10 10 "github.com/bluesky-social/indigo/atproto/syntax" 11 11 12 12 "github.com/rivo/uniseg" ··· 810 810 } 811 811 812 812 func (s *SchemaBytes) Validate(d any) error { 813 - v, ok := d.(data.Bytes) 813 + v, ok := d.(atdata.Bytes) 814 814 if !ok { 815 815 return fmt.Errorf("expecting bytes") 816 816 } ··· 830 830 } 831 831 832 832 func (s *SchemaCIDLink) Validate(d any) error { 833 - _, ok := d.(data.CIDLink) 833 + _, ok := d.(atdata.CIDLink) 834 834 if !ok { 835 835 return fmt.Errorf("expecting a cid-link") 836 836 } ··· 915 915 } 916 916 917 917 func (s *SchemaBlob) Validate(d any, flags ValidateFlags) error { 918 - v, ok := d.(data.Blob) 918 + v, ok := d.(atdata.Blob) 919 919 if !ok { 920 920 return fmt.Errorf("expected a blob") 921 921 }
+2 -2
atproto/lexicon/resolve.go
··· 7 7 "log/slog" 8 8 9 9 "github.com/bluesky-social/indigo/api/agnostic" 10 - "github.com/bluesky-social/indigo/atproto/data" 10 + "github.com/bluesky-social/indigo/atproto/atdata" 11 11 "github.com/bluesky-social/indigo/atproto/identity" 12 12 "github.com/bluesky-social/indigo/atproto/syntax" 13 13 "github.com/bluesky-social/indigo/xrpc" ··· 25 25 return nil, err 26 26 } 27 27 28 - d, err := data.UnmarshalJSON(*record) 28 + d, err := atdata.UnmarshalJSON(*record) 29 29 if err != nil { 30 30 return nil, fmt.Errorf("fetched Lexicon schema record was invalid: %w", err) 31 31 }
+4 -4
atproto/repo/commit.go
··· 5 5 "fmt" 6 6 7 7 "github.com/bluesky-social/indigo/atproto/atcrypto" 8 - "github.com/bluesky-social/indigo/atproto/data" 8 + "github.com/bluesky-social/indigo/atproto/atdata" 9 9 "github.com/bluesky-social/indigo/atproto/syntax" 10 10 11 11 "github.com/ipfs/go-cid" ··· 45 45 d := map[string]any{ 46 46 "did": c.DID, 47 47 "version": c.Version, 48 - "prev": (*data.CIDLink)(c.Prev), 49 - "data": data.CIDLink(c.Data), 48 + "prev": (*atdata.CIDLink)(c.Prev), 49 + "data": atdata.CIDLink(c.Data), 50 50 } 51 51 if c.Sig != nil { 52 - d["sig"] = data.Bytes(c.Sig) 52 + d["sig"] = atdata.Bytes(c.Sig) 53 53 } 54 54 if c.Rev != "" { 55 55 d["rev"] = c.Rev