this repo has no description
0
fork

Configure Feed

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

lexgen run against current atproto Lexicons; rename pkgs

This updates several lexicons, and switches the package names from
'schemagen' to 'bsky' and 'atproto'.

+275 -758
+1 -1
api/atproto/accountcreate.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/accountcreateInviteCode.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+11 -3
api/atproto/accountdelete.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context" ··· 10 10 11 11 func init() { 12 12 } 13 - func AccountDelete(ctx context.Context, c *xrpc.Client) error { 14 - if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.account.delete", nil, nil, nil); err != nil { 13 + 14 + type AccountDelete_Input struct { 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Did string `json:"did" cborgen:"did"` 17 + Password string `json:"password" cborgen:"password"` 18 + Token string `json:"token" cborgen:"token"` 19 + } 20 + 21 + func AccountDelete(ctx context.Context, c *xrpc.Client, input *AccountDelete_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.account.delete", nil, input, nil); err != nil { 15 23 return err 16 24 } 17 25
+1 -1
api/atproto/accountget.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+19
api/atproto/accountrequestDelete.go
··· 1 + package atproto 2 + 3 + import ( 4 + "context" 5 + 6 + "github.com/bluesky-social/indigo/xrpc" 7 + ) 8 + 9 + // schema: com.atproto.account.requestDelete 10 + 11 + func init() { 12 + } 13 + func AccountRequestDelete(ctx context.Context, c *xrpc.Client) error { 14 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.account.requestDelete", nil, nil, nil); err != nil { 15 + return err 16 + } 17 + 18 + return nil 19 + }
+1 -1
api/atproto/accountrequestPasswordReset.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/accountresetPassword.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/blobupload.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/cbor_gen.go
··· 1 1 // Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT. 2 2 3 - package schemagen 3 + package atproto 4 4 5 5 import ( 6 6 "fmt"
+1 -1
api/atproto/handleresolve.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
-25
api/atproto/peeringfollow.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.follow 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringFollow_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Users []string `json:"users" cborgen:"users"` 17 - } 18 - 19 - func PeeringFollow(ctx context.Context, c *xrpc.Client, input *PeeringFollow_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.peering.follow", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }
-25
api/atproto/peeringinit.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.init 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringInit_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Pds string `json:"pds" cborgen:"pds"` 17 - } 18 - 19 - func PeeringInit(ctx context.Context, c *xrpc.Client, input *PeeringInit_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.peering.init", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }
-32
api/atproto/peeringlist.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.list 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringList_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Peerings []*PeeringList_Peering `json:"peerings" cborgen:"peerings"` 17 - } 18 - 19 - type PeeringList_Peering struct { 20 - LexiconTypeID string `json:"$type,omitempty"` 21 - Host *string `json:"host" cborgen:"host"` 22 - Status *string `json:"status" cborgen:"status"` 23 - } 24 - 25 - func PeeringList(ctx context.Context, c *xrpc.Client) (*PeeringList_Output, error) { 26 - var out PeeringList_Output 27 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.peering.list", nil, nil, &out); err != nil { 28 - return nil, err 29 - } 30 - 31 - return &out, nil 32 - }
-37
api/atproto/peeringpropose.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.propose 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringPropose_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Proposal *PeeringPropose_Proposal `json:"proposal" cborgen:"proposal"` 17 - Signature string `json:"signature" cborgen:"signature"` 18 - } 19 - 20 - type PeeringPropose_Output struct { 21 - LexiconTypeID string `json:"$type,omitempty"` 22 - Rejected bool `json:"rejected" cborgen:"rejected"` 23 - } 24 - 25 - type PeeringPropose_Proposal struct { 26 - LexiconTypeID string `json:"$type,omitempty"` 27 - Proposer *string `json:"proposer" cborgen:"proposer"` 28 - } 29 - 30 - func PeeringPropose(ctx context.Context, c *xrpc.Client, input *PeeringPropose_Input) (*PeeringPropose_Output, error) { 31 - var out PeeringPropose_Output 32 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.peering.propose", nil, input, &out); err != nil { 33 - return nil, err 34 - } 35 - 36 - return &out, nil 37 - }
+1 -1
api/atproto/repobatchWrite.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/repocreateRecord.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/repodeleteRecord.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/repodescribe.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/repogetRecord.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/repolistRecords.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/repoputRecord.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+12
api/atproto/reporecordRef.go
··· 1 + package atproto 2 + 3 + // schema: com.atproto.repo.recordRef 4 + 5 + func init() { 6 + } 7 + 8 + type RepoRecordRef struct { 9 + LexiconTypeID string `json:"$type,omitempty"` 10 + Cid *string `json:"cid,omitempty" cborgen:"cid"` 11 + Uri string `json:"uri" cborgen:"uri"` 12 + }
+11
api/atproto/reporepoRef.go
··· 1 + package atproto 2 + 3 + // schema: com.atproto.repo.repoRef 4 + 5 + func init() { 6 + } 7 + 8 + type RepoRepoRef struct { 9 + LexiconTypeID string `json:"$type,omitempty"` 10 + Did string `json:"did" cborgen:"did"` 11 + }
+1 -1
api/atproto/repostrongRef.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 // schema: com.atproto.repo.strongRef 4 4
+1 -1
api/atproto/servergetAccountsConfig.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+4 -4
api/atproto/sessioncreate.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context" ··· 12 12 } 13 13 14 14 type SessionCreate_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Handle string `json:"handle" cborgen:"handle"` 17 - Password string `json:"password" cborgen:"password"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Identifier *string `json:"identifier,omitempty" cborgen:"identifier"` 17 + Password string `json:"password" cborgen:"password"` 18 18 } 19 19 20 20 type SessionCreate_Output struct {
+1 -1
api/atproto/sessiondelete.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/sessionget.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+1 -1
api/atproto/sessionrefresh.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "context"
+26
api/atproto/syncgetCheckout.go
··· 1 + package atproto 2 + 3 + import ( 4 + "bytes" 5 + "context" 6 + 7 + "github.com/bluesky-social/indigo/xrpc" 8 + ) 9 + 10 + // schema: com.atproto.sync.getCheckout 11 + 12 + func init() { 13 + } 14 + func SyncGetCheckout(ctx context.Context, c *xrpc.Client, commit string, did string) ([]byte, error) { 15 + buf := new(bytes.Buffer) 16 + 17 + params := map[string]interface{}{ 18 + "commit": commit, 19 + "did": did, 20 + } 21 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getCheckout", params, nil, buf); err != nil { 22 + return nil, err 23 + } 24 + 25 + return buf.Bytes(), nil 26 + }
+32
api/atproto/syncgetCommitPath.go
··· 1 + package atproto 2 + 3 + import ( 4 + "context" 5 + 6 + "github.com/bluesky-social/indigo/xrpc" 7 + ) 8 + 9 + // schema: com.atproto.sync.getCommitPath 10 + 11 + func init() { 12 + } 13 + 14 + type SyncGetCommitPath_Output struct { 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Commits []string `json:"commits" cborgen:"commits"` 17 + } 18 + 19 + func SyncGetCommitPath(ctx context.Context, c *xrpc.Client, did string, earliest string, latest string) (*SyncGetCommitPath_Output, error) { 20 + var out SyncGetCommitPath_Output 21 + 22 + params := map[string]interface{}{ 23 + "did": did, 24 + "earliest": earliest, 25 + "latest": latest, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getCommitPath", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+30
api/atproto/syncgetHead.go
··· 1 + package atproto 2 + 3 + import ( 4 + "context" 5 + 6 + "github.com/bluesky-social/indigo/xrpc" 7 + ) 8 + 9 + // schema: com.atproto.sync.getHead 10 + 11 + func init() { 12 + } 13 + 14 + type SyncGetHead_Output struct { 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Root string `json:"root" cborgen:"root"` 17 + } 18 + 19 + func SyncGetHead(ctx context.Context, c *xrpc.Client, did string) (*SyncGetHead_Output, error) { 20 + var out SyncGetHead_Output 21 + 22 + params := map[string]interface{}{ 23 + "did": did, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHead", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+28
api/atproto/syncgetRecord.go
··· 1 + package atproto 2 + 3 + import ( 4 + "bytes" 5 + "context" 6 + 7 + "github.com/bluesky-social/indigo/xrpc" 8 + ) 9 + 10 + // schema: com.atproto.sync.getRecord 11 + 12 + func init() { 13 + } 14 + func SyncGetRecord(ctx context.Context, c *xrpc.Client, collection string, commit string, did string, rkey string) ([]byte, error) { 15 + buf := new(bytes.Buffer) 16 + 17 + params := map[string]interface{}{ 18 + "collection": collection, 19 + "commit": commit, 20 + "did": did, 21 + "rkey": rkey, 22 + } 23 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRecord", params, nil, buf); err != nil { 24 + return nil, err 25 + } 26 + 27 + return buf.Bytes(), nil 28 + }
+1 -1
api/atproto/syncgetRepo.go
··· 1 - package schemagen 1 + package atproto 2 2 3 3 import ( 4 4 "bytes"
-30
api/atproto/syncgetRoot.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.sync.getRoot 10 - 11 - func init() { 12 - } 13 - 14 - type SyncGetRoot_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Root string `json:"root" cborgen:"root"` 17 - } 18 - 19 - func SyncGetRoot(ctx context.Context, c *xrpc.Client, did string) (*SyncGetRoot_Output, error) { 20 - var out SyncGetRoot_Output 21 - 22 - params := map[string]interface{}{ 23 - "did": did, 24 - } 25 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRoot", params, nil, &out); err != nil { 26 - return nil, err 27 - } 28 - 29 - return &out, nil 30 - }
-24
api/atproto/syncupdateRepo.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - "io" 6 - 7 - "github.com/bluesky-social/indigo/xrpc" 8 - ) 9 - 10 - // schema: com.atproto.sync.updateRepo 11 - 12 - func init() { 13 - } 14 - func SyncUpdateRepo(ctx context.Context, c *xrpc.Client, input io.Reader, did string) error { 15 - 16 - params := map[string]interface{}{ 17 - "did": did, 18 - } 19 - if err := c.Do(ctx, xrpc.Procedure, "application/cbor", "com.atproto.sync.updateRepo", params, input, nil); err != nil { 20 - return err 21 - } 22 - 23 - return nil 24 - }
-34
api/bsky/actorcreateScene.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: app.bsky.actor.createScene 10 - 11 - func init() { 12 - } 13 - 14 - type ActorCreateScene_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Handle string `json:"handle" cborgen:"handle"` 17 - RecoveryKey *string `json:"recoveryKey,omitempty" cborgen:"recoveryKey"` 18 - } 19 - 20 - type ActorCreateScene_Output struct { 21 - LexiconTypeID string `json:"$type,omitempty"` 22 - Declaration *SystemDeclRef `json:"declaration" cborgen:"declaration"` 23 - Did string `json:"did" cborgen:"did"` 24 - Handle string `json:"handle" cborgen:"handle"` 25 - } 26 - 27 - func ActorCreateScene(ctx context.Context, c *xrpc.Client, input *ActorCreateScene_Input) (*ActorCreateScene_Output, error) { 28 - var out ActorCreateScene_Output 29 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.actor.createScene", nil, input, &out); err != nil { 30 - return nil, err 31 - } 32 - 33 - return &out, nil 34 - }
+1 -3
api/bsky/actorgetProfile.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context" ··· 14 14 type ActorGetProfile_MyState struct { 15 15 LexiconTypeID string `json:"$type,omitempty"` 16 16 Follow *string `json:"follow,omitempty" cborgen:"follow"` 17 - Member *string `json:"member,omitempty" cborgen:"member"` 18 17 Muted *bool `json:"muted,omitempty" cborgen:"muted"` 19 18 } 20 19 ··· 30 29 FollowersCount int64 `json:"followersCount" cborgen:"followersCount"` 31 30 FollowsCount int64 `json:"followsCount" cborgen:"followsCount"` 32 31 Handle string `json:"handle" cborgen:"handle"` 33 - MembersCount int64 `json:"membersCount" cborgen:"membersCount"` 34 32 MyState *ActorGetProfile_MyState `json:"myState,omitempty" cborgen:"myState"` 35 33 PostsCount int64 `json:"postsCount" cborgen:"postsCount"` 36 34 }
+9 -15
api/bsky/actorgetSuggestions.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context" ··· 12 12 } 13 13 14 14 type ActorGetSuggestions_Actor struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 17 - Declaration *SystemDeclRef `json:"declaration" cborgen:"declaration"` 18 - Description *string `json:"description,omitempty" cborgen:"description"` 19 - Did string `json:"did" cborgen:"did"` 20 - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 21 - Handle string `json:"handle" cborgen:"handle"` 22 - IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt"` 23 - MyState *ActorGetSuggestions_MyState `json:"myState,omitempty" cborgen:"myState"` 24 - } 25 - 26 - type ActorGetSuggestions_MyState struct { 27 - LexiconTypeID string `json:"$type,omitempty"` 28 - Follow *string `json:"follow,omitempty" cborgen:"follow"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 17 + Declaration *SystemDeclRef `json:"declaration" cborgen:"declaration"` 18 + Description *string `json:"description,omitempty" cborgen:"description"` 19 + Did string `json:"did" cborgen:"did"` 20 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 21 + Handle string `json:"handle" cborgen:"handle"` 22 + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt"` 29 23 } 30 24 31 25 type ActorGetSuggestions_Output struct {
+1 -1
api/bsky/actorprofile.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "github.com/bluesky-social/indigo/lex/util"
+1 -1
api/bsky/actorref.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 // schema: app.bsky.actor.ref 4 4
+1 -1
api/bsky/actorsearch.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/actorsearchTypeahead.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -2
api/bsky/actorupdateProfile.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context" ··· 17 17 Avatar *util.Blob `json:"avatar,omitempty" cborgen:"avatar"` 18 18 Banner *util.Blob `json:"banner,omitempty" cborgen:"banner"` 19 19 Description *string `json:"description,omitempty" cborgen:"description"` 20 - Did *string `json:"did,omitempty" cborgen:"did"` 21 20 DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 22 21 } 23 22
+35 -196
api/bsky/cbor_gen.go
··· 1 1 // Code generated by github.com/whyrusleeping/cbor-gen. DO NOT EDIT. 2 2 3 - package schemagen 3 + package bsky 4 4 5 5 import ( 6 6 "fmt" ··· 8 8 "math" 9 9 "sort" 10 10 11 - schemagen "github.com/bluesky-social/indigo/api/atproto" 11 + atproto "github.com/bluesky-social/indigo/api/atproto" 12 12 util "github.com/bluesky-social/indigo/lex/util" 13 13 cid "github.com/ipfs/go-cid" 14 14 cbg "github.com/whyrusleeping/cbor-gen" ··· 74 74 return err 75 75 } 76 76 77 - // t.Embed (schemagen.FeedPost_Embed) (struct) 77 + // t.Embed (bsky.FeedPost_Embed) (struct) 78 78 if len("embed") > cbg.MaxLength { 79 79 return xerrors.Errorf("Value in field \"embed\" was too long") 80 80 } ··· 90 90 return err 91 91 } 92 92 93 - // t.Reply (schemagen.FeedPost_ReplyRef) (struct) 93 + // t.Reply (bsky.FeedPost_ReplyRef) (struct) 94 94 if len("reply") > cbg.MaxLength { 95 95 return xerrors.Errorf("Value in field \"reply\" was too long") 96 96 } ··· 106 106 return err 107 107 } 108 108 109 - // t.Entities ([]*schemagen.FeedPost_Entity) (slice) 109 + // t.Entities ([]*bsky.FeedPost_Entity) (slice) 110 110 if len("entities") > cbg.MaxLength { 111 111 return xerrors.Errorf("Value in field \"entities\" was too long") 112 112 } ··· 216 216 217 217 t.LexiconTypeID = string(sval) 218 218 } 219 - // t.Embed (schemagen.FeedPost_Embed) (struct) 219 + // t.Embed (bsky.FeedPost_Embed) (struct) 220 220 case "embed": 221 221 222 222 { ··· 236 236 } 237 237 238 238 } 239 - // t.Reply (schemagen.FeedPost_ReplyRef) (struct) 239 + // t.Reply (bsky.FeedPost_ReplyRef) (struct) 240 240 case "reply": 241 241 242 242 { ··· 256 256 } 257 257 258 258 } 259 - // t.Entities ([]*schemagen.FeedPost_Entity) (slice) 259 + // t.Entities ([]*bsky.FeedPost_Entity) (slice) 260 260 case "entities": 261 261 262 262 maj, extra, err = cr.ReadHeader() ··· 337 337 return err 338 338 } 339 339 340 - // t.Subject (schemagen.RepoStrongRef) (struct) 340 + // t.Subject (atproto.RepoStrongRef) (struct) 341 341 if len("subject") > cbg.MaxLength { 342 342 return xerrors.Errorf("Value in field \"subject\" was too long") 343 343 } ··· 427 427 428 428 t.LexiconTypeID = string(sval) 429 429 } 430 - // t.Subject (schemagen.RepoStrongRef) (struct) 430 + // t.Subject (atproto.RepoStrongRef) (struct) 431 431 case "subject": 432 432 433 433 { ··· 440 440 if err := cr.UnreadByte(); err != nil { 441 441 return err 442 442 } 443 - t.Subject = new(schemagen.RepoStrongRef) 444 - if err := t.Subject.UnmarshalCBOR(cr); err != nil { 445 - return xerrors.Errorf("unmarshaling t.Subject pointer: %w", err) 446 - } 447 - } 448 - 449 - } 450 - // t.CreatedAt (string) (string) 451 - case "createdAt": 452 - 453 - { 454 - sval, err := cbg.ReadString(cr) 455 - if err != nil { 456 - return err 457 - } 458 - 459 - t.CreatedAt = string(sval) 460 - } 461 - 462 - default: 463 - // Field doesn't exist on this type, so ignore it 464 - cbg.ScanForLinks(r, func(cid.Cid) {}) 465 - } 466 - } 467 - 468 - return nil 469 - } 470 - func (t *FeedTrend) MarshalCBOR(w io.Writer) error { 471 - if t == nil { 472 - _, err := w.Write(cbg.CborNull) 473 - return err 474 - } 475 - 476 - cw := cbg.NewCborWriter(w) 477 - 478 - if _, err := cw.Write([]byte{163}); err != nil { 479 - return err 480 - } 481 - 482 - // t.LexiconTypeID (string) (string) 483 - if len("$type") > cbg.MaxLength { 484 - return xerrors.Errorf("Value in field \"$type\" was too long") 485 - } 486 - 487 - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil { 488 - return err 489 - } 490 - if _, err := io.WriteString(w, string("$type")); err != nil { 491 - return err 492 - } 493 - 494 - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("app.bsky.feed.trend"))); err != nil { 495 - return err 496 - } 497 - if _, err := io.WriteString(w, string("app.bsky.feed.trend")); err != nil { 498 - return err 499 - } 500 - 501 - // t.Subject (schemagen.RepoStrongRef) (struct) 502 - if len("subject") > cbg.MaxLength { 503 - return xerrors.Errorf("Value in field \"subject\" was too long") 504 - } 505 - 506 - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("subject"))); err != nil { 507 - return err 508 - } 509 - if _, err := io.WriteString(w, string("subject")); err != nil { 510 - return err 511 - } 512 - 513 - if err := t.Subject.MarshalCBOR(cw); err != nil { 514 - return err 515 - } 516 - 517 - // t.CreatedAt (string) (string) 518 - if len("createdAt") > cbg.MaxLength { 519 - return xerrors.Errorf("Value in field \"createdAt\" was too long") 520 - } 521 - 522 - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("createdAt"))); err != nil { 523 - return err 524 - } 525 - if _, err := io.WriteString(w, string("createdAt")); err != nil { 526 - return err 527 - } 528 - 529 - if len(t.CreatedAt) > cbg.MaxLength { 530 - return xerrors.Errorf("Value in field t.CreatedAt was too long") 531 - } 532 - 533 - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.CreatedAt))); err != nil { 534 - return err 535 - } 536 - if _, err := io.WriteString(w, string(t.CreatedAt)); err != nil { 537 - return err 538 - } 539 - return nil 540 - } 541 - 542 - func (t *FeedTrend) UnmarshalCBOR(r io.Reader) (err error) { 543 - *t = FeedTrend{} 544 - 545 - cr := cbg.NewCborReader(r) 546 - 547 - maj, extra, err := cr.ReadHeader() 548 - if err != nil { 549 - return err 550 - } 551 - defer func() { 552 - if err == io.EOF { 553 - err = io.ErrUnexpectedEOF 554 - } 555 - }() 556 - 557 - if maj != cbg.MajMap { 558 - return fmt.Errorf("cbor input should be of type map") 559 - } 560 - 561 - if extra > cbg.MaxLength { 562 - return fmt.Errorf("FeedTrend: map struct too large (%d)", extra) 563 - } 564 - 565 - var name string 566 - n := extra 567 - 568 - for i := uint64(0); i < n; i++ { 569 - 570 - { 571 - sval, err := cbg.ReadString(cr) 572 - if err != nil { 573 - return err 574 - } 575 - 576 - name = string(sval) 577 - } 578 - 579 - switch name { 580 - // t.LexiconTypeID (string) (string) 581 - case "$type": 582 - 583 - { 584 - sval, err := cbg.ReadString(cr) 585 - if err != nil { 586 - return err 587 - } 588 - 589 - t.LexiconTypeID = string(sval) 590 - } 591 - // t.Subject (schemagen.RepoStrongRef) (struct) 592 - case "subject": 593 - 594 - { 595 - 596 - b, err := cr.ReadByte() 597 - if err != nil { 598 - return err 599 - } 600 - if b != cbg.CborNull[0] { 601 - if err := cr.UnreadByte(); err != nil { 602 - return err 603 - } 604 - t.Subject = new(schemagen.RepoStrongRef) 443 + t.Subject = new(atproto.RepoStrongRef) 605 444 if err := t.Subject.UnmarshalCBOR(cr); err != nil { 606 445 return xerrors.Errorf("unmarshaling t.Subject pointer: %w", err) 607 446 } ··· 659 498 return err 660 499 } 661 500 662 - // t.Subject (schemagen.RepoStrongRef) (struct) 501 + // t.Subject (atproto.RepoStrongRef) (struct) 663 502 if len("subject") > cbg.MaxLength { 664 503 return xerrors.Errorf("Value in field \"subject\" was too long") 665 504 } ··· 772 611 773 612 t.LexiconTypeID = string(sval) 774 613 } 775 - // t.Subject (schemagen.RepoStrongRef) (struct) 614 + // t.Subject (atproto.RepoStrongRef) (struct) 776 615 case "subject": 777 616 778 617 { ··· 785 624 if err := cr.UnreadByte(); err != nil { 786 625 return err 787 626 } 788 - t.Subject = new(schemagen.RepoStrongRef) 627 + t.Subject = new(atproto.RepoStrongRef) 789 628 if err := t.Subject.UnmarshalCBOR(cr); err != nil { 790 629 return xerrors.Errorf("unmarshaling t.Subject pointer: %w", err) 791 630 } ··· 858 697 return err 859 698 } 860 699 861 - // t.Index (schemagen.FeedPost_TextSlice) (struct) 700 + // t.Index (bsky.FeedPost_TextSlice) (struct) 862 701 if len("index") > cbg.MaxLength { 863 702 return xerrors.Errorf("Value in field \"index\" was too long") 864 703 } ··· 971 810 972 811 t.Type = string(sval) 973 812 } 974 - // t.Index (schemagen.FeedPost_TextSlice) (struct) 813 + // t.Index (bsky.FeedPost_TextSlice) (struct) 975 814 case "index": 976 815 977 816 { ··· 1034 873 return err 1035 874 } 1036 875 1037 - // t.Root (schemagen.RepoStrongRef) (struct) 876 + // t.Root (atproto.RepoStrongRef) (struct) 1038 877 if len("root") > cbg.MaxLength { 1039 878 return xerrors.Errorf("Value in field \"root\" was too long") 1040 879 } ··· 1050 889 return err 1051 890 } 1052 891 1053 - // t.Parent (schemagen.RepoStrongRef) (struct) 892 + // t.Parent (atproto.RepoStrongRef) (struct) 1054 893 if len("parent") > cbg.MaxLength { 1055 894 return xerrors.Errorf("Value in field \"parent\" was too long") 1056 895 } ··· 1129 968 } 1130 969 1131 970 switch name { 1132 - // t.Root (schemagen.RepoStrongRef) (struct) 971 + // t.Root (atproto.RepoStrongRef) (struct) 1133 972 case "root": 1134 973 1135 974 { ··· 1142 981 if err := cr.UnreadByte(); err != nil { 1143 982 return err 1144 983 } 1145 - t.Root = new(schemagen.RepoStrongRef) 984 + t.Root = new(atproto.RepoStrongRef) 1146 985 if err := t.Root.UnmarshalCBOR(cr); err != nil { 1147 986 return xerrors.Errorf("unmarshaling t.Root pointer: %w", err) 1148 987 } 1149 988 } 1150 989 1151 990 } 1152 - // t.Parent (schemagen.RepoStrongRef) (struct) 991 + // t.Parent (atproto.RepoStrongRef) (struct) 1153 992 case "parent": 1154 993 1155 994 { ··· 1162 1001 if err := cr.UnreadByte(); err != nil { 1163 1002 return err 1164 1003 } 1165 - t.Parent = new(schemagen.RepoStrongRef) 1004 + t.Parent = new(atproto.RepoStrongRef) 1166 1005 if err := t.Parent.UnmarshalCBOR(cr); err != nil { 1167 1006 return xerrors.Errorf("unmarshaling t.Parent pointer: %w", err) 1168 1007 } ··· 1392 1231 return err 1393 1232 } 1394 1233 1395 - // t.Images ([]*schemagen.EmbedImages_Image) (slice) 1234 + // t.Images ([]*bsky.EmbedImages_Image) (slice) 1396 1235 if len("images") > cbg.MaxLength { 1397 1236 return xerrors.Errorf("Value in field \"images\" was too long") 1398 1237 } ··· 1480 1319 } 1481 1320 1482 1321 switch name { 1483 - // t.Images ([]*schemagen.EmbedImages_Image) (slice) 1322 + // t.Images ([]*bsky.EmbedImages_Image) (slice) 1484 1323 case "images": 1485 1324 1486 1325 maj, extra, err = cr.ReadHeader() ··· 1739 1578 return err 1740 1579 } 1741 1580 1742 - // t.External (schemagen.EmbedExternal_External) (struct) 1581 + // t.External (bsky.EmbedExternal_External) (struct) 1743 1582 if len("external") > cbg.MaxLength { 1744 1583 return xerrors.Errorf("Value in field \"external\" was too long") 1745 1584 } ··· 1818 1657 } 1819 1658 1820 1659 switch name { 1821 - // t.External (schemagen.EmbedExternal_External) (struct) 1660 + // t.External (bsky.EmbedExternal_External) (struct) 1822 1661 case "external": 1823 1662 1824 1663 { ··· 2287 2126 return err 2288 2127 } 2289 2128 2290 - // t.Subject (schemagen.ActorRef) (struct) 2129 + // t.Subject (bsky.ActorRef) (struct) 2291 2130 if len("subject") > cbg.MaxLength { 2292 2131 return xerrors.Errorf("Value in field \"subject\" was too long") 2293 2132 } ··· 2377 2216 2378 2217 t.LexiconTypeID = string(sval) 2379 2218 } 2380 - // t.Subject (schemagen.ActorRef) (struct) 2219 + // t.Subject (bsky.ActorRef) (struct) 2381 2220 case "subject": 2382 2221 2383 2222 { ··· 2983 2822 return err 2984 2823 } 2985 2824 2986 - // t.Subject (schemagen.ActorRef) (struct) 2825 + // t.Subject (bsky.ActorRef) (struct) 2987 2826 if len("subject") > cbg.MaxLength { 2988 2827 return xerrors.Errorf("Value in field \"subject\" was too long") 2989 2828 } ··· 3096 2935 3097 2936 t.LexiconTypeID = string(sval) 3098 2937 } 3099 - // t.Subject (schemagen.ActorRef) (struct) 2938 + // t.Subject (bsky.ActorRef) (struct) 3100 2939 case "subject": 3101 2940 3102 2941 { ··· 3178 3017 return err 3179 3018 } 3180 3019 3181 - // t.Assertion (schemagen.RepoStrongRef) (struct) 3020 + // t.Assertion (atproto.RepoStrongRef) (struct) 3182 3021 if len("assertion") > cbg.MaxLength { 3183 3022 return xerrors.Errorf("Value in field \"assertion\" was too long") 3184 3023 } ··· 3217 3056 return err 3218 3057 } 3219 3058 3220 - // t.Originator (schemagen.ActorRef) (struct) 3059 + // t.Originator (bsky.ActorRef) (struct) 3221 3060 if len("originator") > cbg.MaxLength { 3222 3061 return xerrors.Errorf("Value in field \"originator\" was too long") 3223 3062 } ··· 3284 3123 3285 3124 t.LexiconTypeID = string(sval) 3286 3125 } 3287 - // t.Assertion (schemagen.RepoStrongRef) (struct) 3126 + // t.Assertion (atproto.RepoStrongRef) (struct) 3288 3127 case "assertion": 3289 3128 3290 3129 { ··· 3297 3136 if err := cr.UnreadByte(); err != nil { 3298 3137 return err 3299 3138 } 3300 - t.Assertion = new(schemagen.RepoStrongRef) 3139 + t.Assertion = new(atproto.RepoStrongRef) 3301 3140 if err := t.Assertion.UnmarshalCBOR(cr); err != nil { 3302 3141 return xerrors.Errorf("unmarshaling t.Assertion pointer: %w", err) 3303 3142 } ··· 3315 3154 3316 3155 t.CreatedAt = string(sval) 3317 3156 } 3318 - // t.Originator (schemagen.ActorRef) (struct) 3157 + // t.Originator (bsky.ActorRef) (struct) 3319 3158 case "originator": 3320 3159 3321 3160 {
+1 -1
api/bsky/embedexternal.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "github.com/bluesky-social/indigo/lex/util"
+1 -1
api/bsky/embedimages.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "github.com/bluesky-social/indigo/lex/util"
-77
api/bsky/feedembed.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "encoding/json" 5 - "fmt" 6 - 7 - "github.com/bluesky-social/indigo/lex/util" 8 - ) 9 - 10 - // schema: app.bsky.feed.embed 11 - 12 - func init() { 13 - } 14 - 15 - type FeedEmbed_Record struct { 16 - Record any `json:"record" cborgen:"record"` 17 - Type string `json:"type" cborgen:"type"` 18 - Author *ActorRef_WithInfo `json:"author" cborgen:"author"` 19 - } 20 - 21 - type FeedEmbed_External struct { 22 - ImageUri string `json:"imageUri" cborgen:"imageUri"` 23 - Type string `json:"type" cborgen:"type"` 24 - Uri string `json:"uri" cborgen:"uri"` 25 - Title string `json:"title" cborgen:"title"` 26 - Description string `json:"description" cborgen:"description"` 27 - } 28 - 29 - type FeedEmbed struct { 30 - Items []*FeedEmbed_Items_Elem `json:"items" cborgen:"items"` 31 - } 32 - 33 - type FeedEmbed_Items_Elem struct { 34 - FeedEmbed_Media *FeedEmbed_Media 35 - FeedEmbed_Record *FeedEmbed_Record 36 - FeedEmbed_External *FeedEmbed_External 37 - } 38 - 39 - func (t *FeedEmbed_Items_Elem) MarshalJSON() ([]byte, error) { 40 - if t.FeedEmbed_Media != nil { 41 - return json.Marshal(t.FeedEmbed_Media) 42 - } 43 - if t.FeedEmbed_Record != nil { 44 - return json.Marshal(t.FeedEmbed_Record) 45 - } 46 - if t.FeedEmbed_External != nil { 47 - return json.Marshal(t.FeedEmbed_External) 48 - } 49 - return nil, fmt.Errorf("cannot marshal empty enum") 50 - } 51 - func (t *FeedEmbed_Items_Elem) UnmarshalJSON(b []byte) error { 52 - typ, err := util.TypeExtract(b) 53 - if err != nil { 54 - return err 55 - } 56 - 57 - switch typ { 58 - case "app.bsky.feed.embed#media": 59 - t.FeedEmbed_Media = new(FeedEmbed_Media) 60 - return json.Unmarshal(b, t.FeedEmbed_Media) 61 - case "app.bsky.feed.embed#record": 62 - t.FeedEmbed_Record = new(FeedEmbed_Record) 63 - return json.Unmarshal(b, t.FeedEmbed_Record) 64 - case "app.bsky.feed.embed#external": 65 - t.FeedEmbed_External = new(FeedEmbed_External) 66 - return json.Unmarshal(b, t.FeedEmbed_External) 67 - 68 - default: 69 - return nil 70 - } 71 - } 72 - 73 - type FeedEmbed_Media struct { 74 - Alt *string `json:"alt" cborgen:"alt"` 75 - Thumb *util.Blob `json:"thumb" cborgen:"thumb"` 76 - Original *util.Blob `json:"original" cborgen:"original"` 77 - }
+1 -15
api/bsky/feedfeedViewPost.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "encoding/json" ··· 20 20 } 21 21 22 22 type FeedFeedViewPost_Reason struct { 23 - FeedFeedViewPost_ReasonTrend *FeedFeedViewPost_ReasonTrend 24 23 FeedFeedViewPost_ReasonRepost *FeedFeedViewPost_ReasonRepost 25 24 } 26 25 27 26 func (t *FeedFeedViewPost_Reason) MarshalJSON() ([]byte, error) { 28 - if t.FeedFeedViewPost_ReasonTrend != nil { 29 - t.FeedFeedViewPost_ReasonTrend.LexiconTypeID = "app.bsky.feed.feedViewPost#reasonTrend" 30 - return json.Marshal(t.FeedFeedViewPost_ReasonTrend) 31 - } 32 27 if t.FeedFeedViewPost_ReasonRepost != nil { 33 28 t.FeedFeedViewPost_ReasonRepost.LexiconTypeID = "app.bsky.feed.feedViewPost#reasonRepost" 34 29 return json.Marshal(t.FeedFeedViewPost_ReasonRepost) ··· 42 37 } 43 38 44 39 switch typ { 45 - case "app.bsky.feed.feedViewPost#reasonTrend": 46 - t.FeedFeedViewPost_ReasonTrend = new(FeedFeedViewPost_ReasonTrend) 47 - return json.Unmarshal(b, t.FeedFeedViewPost_ReasonTrend) 48 40 case "app.bsky.feed.feedViewPost#reasonRepost": 49 41 t.FeedFeedViewPost_ReasonRepost = new(FeedFeedViewPost_ReasonRepost) 50 42 return json.Unmarshal(b, t.FeedFeedViewPost_ReasonRepost) ··· 55 47 } 56 48 57 49 type FeedFeedViewPost_ReasonRepost struct { 58 - LexiconTypeID string `json:"$type,omitempty"` 59 - By *ActorRef_WithInfo `json:"by" cborgen:"by"` 60 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 61 - } 62 - 63 - type FeedFeedViewPost_ReasonTrend struct { 64 50 LexiconTypeID string `json:"$type,omitempty"` 65 51 By *ActorRef_WithInfo `json:"by" cborgen:"by"` 66 52 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
+1 -1
api/bsky/feedgetAuthorFeed.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/feedgetPostThread.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/feedgetRepostedBy.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/feedgetTimeline.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/feedgetVotes.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -2
api/bsky/feedpost.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "bytes" ··· 167 167 type FeedPost_ViewerState struct { 168 168 LexiconTypeID string `json:"$type,omitempty"` 169 169 Downvote *string `json:"downvote,omitempty" cborgen:"downvote"` 170 - Muted *bool `json:"muted,omitempty" cborgen:"muted"` 171 170 Repost *string `json:"repost,omitempty" cborgen:"repost"` 172 171 Upvote *string `json:"upvote,omitempty" cborgen:"upvote"` 173 172 }
+1 -1
api/bsky/feedrepost.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 comatprototypes "github.com/bluesky-social/indigo/api/atproto"
+1 -1
api/bsky/feedsetVote.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
-19
api/bsky/feedtrend.go
··· 1 - package schemagen 2 - 3 - import ( 4 - comatprototypes "github.com/bluesky-social/indigo/api/atproto" 5 - "github.com/bluesky-social/indigo/lex/util" 6 - ) 7 - 8 - // schema: app.bsky.feed.trend 9 - 10 - func init() { 11 - util.RegisterType("app.bsky.feed.trend", &FeedTrend{}) 12 - } 13 - 14 - // RECORDTYPE: FeedTrend 15 - type FeedTrend struct { 16 - LexiconTypeID string `json:"$type" cborgen:"$type,const=app.bsky.feed.trend"` 17 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 - Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` 19 - }
+1 -1
api/bsky/feedvote.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 comatprototypes "github.com/bluesky-social/indigo/api/atproto"
+1 -1
api/bsky/graphassertCreator.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 // schema: app.bsky.graph.assertCreator 4 4
+1 -1
api/bsky/graphassertMember.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 // schema: app.bsky.graph.assertMember 4 4
+1 -1
api/bsky/graphassertion.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "github.com/bluesky-social/indigo/lex/util"
+1 -1
api/bsky/graphconfirmation.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 comatprototypes "github.com/bluesky-social/indigo/api/atproto"
+1 -1
api/bsky/graphfollow.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "github.com/bluesky-social/indigo/lex/util"
-56
api/bsky/graphgetAssertions.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: app.bsky.graph.getAssertions 10 - 11 - func init() { 12 - } 13 - 14 - type GraphGetAssertions_Assertion struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Assertion string `json:"assertion" cborgen:"assertion"` 17 - Author *ActorRef_WithInfo `json:"author" cborgen:"author"` 18 - Cid string `json:"cid" cborgen:"cid"` 19 - Confirmation *GraphGetAssertions_Confirmation `json:"confirmation,omitempty" cborgen:"confirmation"` 20 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 21 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 22 - Subject *ActorRef_WithInfo `json:"subject" cborgen:"subject"` 23 - Uri string `json:"uri" cborgen:"uri"` 24 - } 25 - 26 - type GraphGetAssertions_Confirmation struct { 27 - LexiconTypeID string `json:"$type,omitempty"` 28 - Cid string `json:"cid" cborgen:"cid"` 29 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 30 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 31 - Uri string `json:"uri" cborgen:"uri"` 32 - } 33 - 34 - type GraphGetAssertions_Output struct { 35 - LexiconTypeID string `json:"$type,omitempty"` 36 - Assertions []*GraphGetAssertions_Assertion `json:"assertions" cborgen:"assertions"` 37 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 38 - } 39 - 40 - func GraphGetAssertions(ctx context.Context, c *xrpc.Client, assertion string, author string, before string, confirmed bool, limit int64, subject string) (*GraphGetAssertions_Output, error) { 41 - var out GraphGetAssertions_Output 42 - 43 - params := map[string]interface{}{ 44 - "assertion": assertion, 45 - "author": author, 46 - "before": before, 47 - "confirmed": confirmed, 48 - "limit": limit, 49 - "subject": subject, 50 - } 51 - if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getAssertions", params, nil, &out); err != nil { 52 - return nil, err 53 - } 54 - 55 - return &out, nil 56 - }
+1 -1
api/bsky/graphgetFollowers.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+2 -1
api/bsky/graphgetFollows.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context" ··· 13 13 14 14 type GraphGetFollows_Follow struct { 15 15 LexiconTypeID string `json:"$type,omitempty"` 16 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 16 17 CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt"` 17 18 Declaration *SystemDeclRef `json:"declaration" cborgen:"declaration"` 18 19 Did string `json:"did" cborgen:"did"`
-44
api/bsky/graphgetMembers.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: app.bsky.graph.getMembers 10 - 11 - func init() { 12 - } 13 - 14 - type GraphGetMembers_Member struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt"` 17 - Declaration *SystemDeclRef `json:"declaration" cborgen:"declaration"` 18 - Did string `json:"did" cborgen:"did"` 19 - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 20 - Handle string `json:"handle" cborgen:"handle"` 21 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 22 - } 23 - 24 - type GraphGetMembers_Output struct { 25 - LexiconTypeID string `json:"$type,omitempty"` 26 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 27 - Members []*GraphGetMembers_Member `json:"members" cborgen:"members"` 28 - Subject *ActorRef_WithInfo `json:"subject" cborgen:"subject"` 29 - } 30 - 31 - func GraphGetMembers(ctx context.Context, c *xrpc.Client, actor string, before string, limit int64) (*GraphGetMembers_Output, error) { 32 - var out GraphGetMembers_Output 33 - 34 - params := map[string]interface{}{ 35 - "actor": actor, 36 - "before": before, 37 - "limit": limit, 38 - } 39 - if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getMembers", params, nil, &out); err != nil { 40 - return nil, err 41 - } 42 - 43 - return &out, nil 44 - }
-44
api/bsky/graphgetMemberships.go
··· 1 - package schemagen 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: app.bsky.graph.getMemberships 10 - 11 - func init() { 12 - } 13 - 14 - type GraphGetMemberships_Membership struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt"` 17 - Declaration *SystemDeclRef `json:"declaration" cborgen:"declaration"` 18 - Did string `json:"did" cborgen:"did"` 19 - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 20 - Handle string `json:"handle" cborgen:"handle"` 21 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 22 - } 23 - 24 - type GraphGetMemberships_Output struct { 25 - LexiconTypeID string `json:"$type,omitempty"` 26 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 27 - Memberships []*GraphGetMemberships_Membership `json:"memberships" cborgen:"memberships"` 28 - Subject *ActorRef_WithInfo `json:"subject" cborgen:"subject"` 29 - } 30 - 31 - func GraphGetMemberships(ctx context.Context, c *xrpc.Client, actor string, before string, limit int64) (*GraphGetMemberships_Output, error) { 32 - var out GraphGetMemberships_Output 33 - 34 - params := map[string]interface{}{ 35 - "actor": actor, 36 - "before": before, 37 - "limit": limit, 38 - } 39 - if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getMemberships", params, nil, &out); err != nil { 40 - return nil, err 41 - } 42 - 43 - return &out, nil 44 - }
+1 -1
api/bsky/graphgetMutes.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/graphmute.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/graphunmute.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/notificationgetCount.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/notificationlist.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
+1 -1
api/bsky/notificationupdateSeen.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "context"
-8
api/bsky/systemactorScene.go
··· 1 - package schemagen 2 - 3 - // schema: app.bsky.system.actorScene 4 - 5 - func init() { 6 - } 7 - 8 - const SystemActorScene = "app.bsky.system.actorScene"
+1 -1
api/bsky/systemactorUser.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 // schema: app.bsky.system.actorUser 4 4
+1 -1
api/bsky/systemdeclRef.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 // schema: app.bsky.system.declRef 4 4
+1 -1
api/bsky/systemdeclaration.go
··· 1 - package schemagen 1 + package bsky 2 2 3 3 import ( 4 4 "github.com/bluesky-social/indigo/lex/util"
+2 -12
gen/main.go
··· 24 24 panic(err) 25 25 } 26 26 27 - // RECORDTYPE: GraphFollow 28 - // RECORDTYPE: GraphAssertion 29 - // RECORDTYPE: GraphConfirmation 30 - // RECORDTYPE: SystemDeclaration 31 - // RECORDTYPE: ActorProfile 32 - // RECORDTYPE: FeedVote 33 - // RECORDTYPE: FeedTrend 34 - // RECORDTYPE: FeedRepost 35 - // RECORDTYPE: FeedPost 36 - 37 - if err := cbg.WriteMapEncodersToFile("api/bsky/cbor_gen.go", "schemagen", bsky.FeedPost{}, bsky.FeedRepost{}, bsky.FeedTrend{}, bsky.FeedVote{}, bsky.FeedPost_Entity{}, bsky.FeedPost_ReplyRef{}, bsky.FeedPost_TextSlice{}, bsky.EmbedImages{}, bsky.EmbedImages_PresentedImage{}, bsky.EmbedExternal{}, bsky.EmbedExternal_External{}, bsky.EmbedImages_Image{}, bsky.GraphFollow{}, bsky.ActorRef{}, bsky.ActorProfile{}, bsky.SystemDeclaration{}, bsky.GraphAssertion{}, bsky.GraphConfirmation{}); err != nil { 27 + if err := cbg.WriteMapEncodersToFile("api/bsky/cbor_gen.go", "bsky", bsky.FeedPost{}, bsky.FeedRepost{}, bsky.FeedVote{}, bsky.FeedPost_Entity{}, bsky.FeedPost_ReplyRef{}, bsky.FeedPost_TextSlice{}, bsky.EmbedImages{}, bsky.EmbedImages_PresentedImage{}, bsky.EmbedExternal{}, bsky.EmbedExternal_External{}, bsky.EmbedImages_Image{}, bsky.GraphFollow{}, bsky.ActorRef{}, bsky.ActorProfile{}, bsky.SystemDeclaration{}, bsky.GraphAssertion{}, bsky.GraphConfirmation{}); err != nil { 38 28 panic(err) 39 29 } 40 30 41 - if err := cbg.WriteMapEncodersToFile("api/atproto/cbor_gen.go", "schemagen", atproto.RepoStrongRef{}); err != nil { 31 + if err := cbg.WriteMapEncodersToFile("api/atproto/cbor_gen.go", "atproto", atproto.RepoStrongRef{}); err != nil { 42 32 panic(err) 43 33 } 44 34