this repo has no description
0
fork

Configure Feed

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

remove old account.* methods

+11 -196
-38
api/atproto/accountcreate.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.account.create 10 - 11 - func init() { 12 - } 13 - 14 - type AccountCreate_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Email string `json:"email" cborgen:"email"` 17 - Handle string `json:"handle" cborgen:"handle"` 18 - InviteCode *string `json:"inviteCode,omitempty" cborgen:"inviteCode"` 19 - Password string `json:"password" cborgen:"password"` 20 - RecoveryKey *string `json:"recoveryKey,omitempty" cborgen:"recoveryKey"` 21 - } 22 - 23 - type AccountCreate_Output struct { 24 - LexiconTypeID string `json:"$type,omitempty"` 25 - AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 26 - Did string `json:"did" cborgen:"did"` 27 - Handle string `json:"handle" cborgen:"handle"` 28 - RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 29 - } 30 - 31 - func AccountCreate(ctx context.Context, c *xrpc.Client, input *AccountCreate_Input) (*AccountCreate_Output, error) { 32 - var out AccountCreate_Output 33 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.account.create", nil, input, &out); err != nil { 34 - return nil, err 35 - } 36 - 37 - return &out, nil 38 - }
-31
api/atproto/accountcreateInviteCode.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.account.createInviteCode 10 - 11 - func init() { 12 - } 13 - 14 - type AccountCreateInviteCode_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - UseCount int64 `json:"useCount" cborgen:"useCount"` 17 - } 18 - 19 - type AccountCreateInviteCode_Output struct { 20 - LexiconTypeID string `json:"$type,omitempty"` 21 - Code string `json:"code" cborgen:"code"` 22 - } 23 - 24 - func AccountCreateInviteCode(ctx context.Context, c *xrpc.Client, input *AccountCreateInviteCode_Input) (*AccountCreateInviteCode_Output, error) { 25 - var out AccountCreateInviteCode_Output 26 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.account.createInviteCode", nil, input, &out); err != nil { 27 - return nil, err 28 - } 29 - 30 - return &out, nil 31 - }
-27
api/atproto/accountdelete.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.account.delete 10 - 11 - func init() { 12 - } 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 { 23 - return err 24 - } 25 - 26 - return nil 27 - }
-19
api/atproto/accountget.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.account.get 10 - 11 - func init() { 12 - } 13 - func AccountGet(ctx context.Context, c *xrpc.Client) error { 14 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.account.get", nil, nil, nil); err != nil { 15 - return err 16 - } 17 - 18 - return nil 19 - }
-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 - }
-25
api/atproto/accountrequestPasswordReset.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.account.requestPasswordReset 10 - 11 - func init() { 12 - } 13 - 14 - type AccountRequestPasswordReset_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Email string `json:"email" cborgen:"email"` 17 - } 18 - 19 - func AccountRequestPasswordReset(ctx context.Context, c *xrpc.Client, input *AccountRequestPasswordReset_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.account.requestPasswordReset", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }
-26
api/atproto/accountresetPassword.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.account.resetPassword 10 - 11 - func init() { 12 - } 13 - 14 - type AccountResetPassword_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Password string `json:"password" cborgen:"password"` 17 - Token string `json:"token" cborgen:"token"` 18 - } 19 - 20 - func AccountResetPassword(ctx context.Context, c *xrpc.Client, input *AccountResetPassword_Input) error { 21 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.account.resetPassword", nil, input, nil); err != nil { 22 - return err 23 - } 24 - 25 - return nil 26 - }
+7 -7
cmd/fakermaker/main.go
··· 313 313 email := gofakeit.Email() 314 314 password := gofakeit.Password(true, true, true, true, true, 24) 315 315 ctx := context.TODO() 316 - resp, err := comatproto.AccountCreate(ctx, xrpcc, &comatproto.AccountCreate_Input{ 316 + resp, err := comatproto.ServerCreateAccount(ctx, xrpcc, &comatproto.ServerCreateAccount_Input{ 317 317 Email: email, 318 318 Handle: handle, 319 319 Password: password, ··· 418 418 var avatar *lexutil.Blob 419 419 if genAvatar { 420 420 img := gofakeit.ImagePng(200, 200) 421 - resp, err := comatproto.BlobUpload(context.TODO(), xrpcc, bytes.NewReader(img)) 421 + resp, err := comatproto.RepoUploadBlob(context.TODO(), xrpcc, bytes.NewReader(img)) 422 422 if err != nil { 423 423 return err 424 424 } 425 425 avatar = &lexutil.Blob{ 426 - Cid: resp.Cid, 426 + Cid: resp.Blob.Cid, 427 427 MimeType: "image/png", 428 428 } 429 429 } 430 430 var banner *lexutil.Blob 431 431 if genBanner { 432 432 img := gofakeit.ImageJpeg(800, 200) 433 - resp, err := comatproto.BlobUpload(context.TODO(), xrpcc, bytes.NewReader(img)) 433 + resp, err := comatproto.RepoUploadBlob(context.TODO(), xrpcc, bytes.NewReader(img)) 434 434 if err != nil { 435 435 return err 436 436 } 437 437 avatar = &lexutil.Blob{ 438 - Cid: resp.Cid, 438 + Cid: resp.Blob.Cid, 439 439 MimeType: "image/jpeg", 440 440 } 441 441 } ··· 534 534 var images []*appbsky.EmbedImages_Image 535 535 if fracImage > 0.0 && rand.Float64() < fracImage { 536 536 img := gofakeit.ImageJpeg(800, 800) 537 - resp, err := comatproto.BlobUpload(context.TODO(), xrpcc, bytes.NewReader(img)) 537 + resp, err := comatproto.RepoUploadBlob(context.TODO(), xrpcc, bytes.NewReader(img)) 538 538 if err != nil { 539 539 return err 540 540 } 541 541 images = append(images, &appbsky.EmbedImages_Image{ 542 542 Alt: gofakeit.Lunch(), 543 543 Image: &lexutil.Blob{ 544 - Cid: resp.Cid, 544 + Cid: resp.Blob.Cid, 545 545 MimeType: "image/jpeg", 546 546 }, 547 547 })
+3 -3
cmd/gosky/main.go
··· 106 106 invite = &inv 107 107 } 108 108 109 - acc, err := comatproto.AccountCreate(context.TODO(), xrpcc, &comatproto.AccountCreate_Input{ 109 + acc, err := comatproto.ServerCreateAccount(context.TODO(), xrpcc, &comatproto.ServerCreateAccount_Input{ 110 110 Email: email, 111 111 Handle: handle, 112 112 InviteCode: invite, ··· 799 799 800 800 email := cctx.Args().Get(0) 801 801 802 - err = comatproto.AccountRequestPasswordReset(ctx, xrpcc, &comatproto.AccountRequestPasswordReset_Input{ 802 + err = comatproto.ServerRequestPasswordReset(ctx, xrpcc, &comatproto.ServerRequestPasswordReset_Input{ 803 803 Email: email, 804 804 }) 805 805 if err != nil { ··· 815 815 inp.Scan() 816 816 npass := inp.Text() 817 817 818 - if err := comatproto.AccountResetPassword(ctx, xrpcc, &comatproto.AccountResetPassword_Input{ 818 + if err := comatproto.ServerResetPassword(ctx, xrpcc, &comatproto.ServerResetPassword_Input{ 819 819 Password: npass, 820 820 Token: code, 821 821 }); err != nil {
+1 -1
cmd/stress/main.go
··· 103 103 domain := cfg.AvailableUserDomains[0] 104 104 fmt.Println("domain: ", domain) 105 105 106 - resp, err := comatproto.AccountCreate(ctx, xrpcc, &comatproto.AccountCreate_Input{ 106 + resp, err := comatproto.ServerCreateAccount(ctx, xrpcc, &comatproto.ServerCreateAccount_Input{ 107 107 Email: fmt.Sprintf("user-%s@test.com", id), 108 108 Handle: "user-" + id + domain, 109 109 Password: "password",