From ce01dc2b75205eefcf98776cf9497c4373a305b6 Mon Sep 17 00:00:00 2001 From: Eli Mallon Date: Fri, 10 Jul 2026 14:08:06 -0700 Subject: [PATCH] Fix firehose/subscription interop and remaining type mismatches - Firehose callbacks: use indigo's atproto types (indigoatproto alias) for subscription callback signatures, since indigo's RepoStreamCallbacks expects indigo types. Handler functions changed to accept indigo types. - Labeler: fix double-pointer in FromLexicon call. - All remaining pointer-vs-value mismatches in model, atproto, vod, director, replication, viewlog, spxrpc packages. - Makefile: separate type generation (all namespaces) from server stub generation (only place/stream + games) to avoid generating stubs for unimplemented atproto/bsky endpoints. - Remove atproto/bsky handler registration from spxrpc.go (those endpoints are handled differently). Remaining: ~10 handler naming mismatches in spxrpc (generated stub names vs hand-written handler names) and a few pointer issues in multistream/storage. These need manual resolution. --- Makefile | 8 +- pkg/atproto/firehose.go | 15 +- pkg/atproto/firehose_moq.go | 6 +- pkg/atproto/labeler_firehose.go | 6 +- pkg/atproto/lexicon_repo.go | 20 +- pkg/atproto/lexicon_repo_queries.go | 4 +- pkg/atproto/server_repo.go | 8 +- pkg/atproto/sync.go | 34 +- pkg/badges/badges.go | 18 +- pkg/director/stream_session.go | 10 +- pkg/media/key_revocation.go | 2 +- pkg/media/manifest_builder.go | 2 +- pkg/model/label.go | 2 +- pkg/model/model.go | 2 +- pkg/moderation/permissions.go | 2 +- pkg/replication/iroh_replicator/kv.go | 2 +- .../websocketrep/websocket_replicator.go | 2 +- pkg/spxrpc/app_bsky_actor.go | 2 +- pkg/spxrpc/app_bsky_feed.go | 2 +- pkg/spxrpc/beta_invite_test.go | 2 +- pkg/spxrpc/com_atproto_identity.go | 10 +- pkg/spxrpc/com_atproto_moderation.go | 6 +- pkg/spxrpc/com_atproto_repo.go | 7 +- pkg/spxrpc/com_atproto_server.go | 6 +- pkg/spxrpc/com_atproto_sync.go | 16 +- pkg/spxrpc/feed_test.go | 12 +- pkg/spxrpc/graph.go | 15 +- pkg/spxrpc/labels_test.go | 8 +- pkg/spxrpc/og.go | 2 +- pkg/spxrpc/place_stream_badge.go | 22 +- pkg/spxrpc/place_stream_branding.go | 5 +- pkg/spxrpc/place_stream_config.go | 4 +- pkg/spxrpc/place_stream_game.go | 6 +- pkg/spxrpc/place_stream_ingest.go | 14 +- pkg/spxrpc/place_stream_live.go | 58 +- ...place_stream_live_searchActorsTypeahead.go | 14 +- pkg/spxrpc/place_stream_media.go | 6 +- pkg/spxrpc/place_stream_media_getvideo.go | 4 +- pkg/spxrpc/place_stream_media_getvideolist.go | 2 +- pkg/spxrpc/place_stream_media_publishvideo.go | 2 +- pkg/spxrpc/place_stream_moderation.go | 10 +- pkg/spxrpc/place_stream_multistream.go | 4 +- pkg/spxrpc/place_stream_playback_getvideo.go | 14 +- .../place_stream_playback_getvideo_test.go | 26 +- pkg/spxrpc/place_stream_vod.go | 8 +- pkg/spxrpc/place_stream_vod_drafts.go | 20 +- pkg/spxrpc/spxrpc.go | 12 +- pkg/spxrpc/storage.go | 4 +- pkg/spxrpc/stubs.go | 3363 ----------------- pkg/spxrpc/webhook.go | 2 +- pkg/viewlog/aggregate.go | 6 +- pkg/viewlog/publish.go | 4 +- pkg/vod/publish.go | 4 +- pkg/vod/publish_draft.go | 22 +- pkg/vod/publish_video.go | 12 +- 55 files changed, 264 insertions(+), 3615 deletions(-) diff --git a/Makefile b/Makefile index 95274d75..0ae1860f 100644 --- a/Makefile +++ b/Makefile @@ -399,11 +399,17 @@ go-lexicons: --lexicons-dir .build/golexmerge \ --output-dir .build/goout \ --module-path stream.place/streamplace/pkg \ - --gen-server spxrpc \ .build/golexmerge/place/stream \ .build/golexmerge/games \ .build/golexmerge/com/atproto \ .build/golexmerge/app/bsky \ + && GOTOOLCHAIN=auto go run $(GO_LEXICON_GEN) build \ + --lexicons-dir .build/golexmerge \ + --output-dir .build/goout \ + --module-path stream.place/streamplace/pkg \ + --gen-server spxrpc \ + .build/golexmerge/place/stream \ + .build/golexmerge/games \ && rm -rf ./pkg/placestream ./pkg/gamesgamesgamesgamesgames ./pkg/comatproto ./pkg/appbsky \ && mkdir -p ./pkg/placestream ./pkg/gamesgamesgamesgamesgames ./pkg/comatproto ./pkg/appbsky \ && cp .build/goout/placestream/*.go ./pkg/placestream/ \ diff --git a/pkg/atproto/firehose.go b/pkg/atproto/firehose.go index 1336ab91..afd01c28 100644 --- a/pkg/atproto/firehose.go +++ b/pkg/atproto/firehose.go @@ -12,7 +12,8 @@ import ( "sync/atomic" "time" - "stream.place/streamplace/pkg/comatproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" + "github.com/ipfs/go-cid" "github.com/bluesky-social/indigo/atproto/identity" "github.com/bluesky-social/indigo/atproto/syntax" "github.com/bluesky-social/indigo/events" @@ -315,7 +316,7 @@ func (atsync *ATProtoSynchronizer) repoStreamCallbacks(ctx context.Context, rela spmetrics.FirehoseRelayHighSeq.WithLabelValues(relay, protocol).Set(float64(cursor.highSeq())) } return &events.RepoStreamCallbacks{ - RepoCommit: func(evt *comatproto.SyncSubscribeRepos_Commit) error { + RepoCommit: func(evt *indigoatproto.SyncSubscribeRepos_Commit) error { atsync.markSeen() observeSeq(evt.Seq) spmetrics.FirehoseEventsReceivedTotal.WithLabelValues(relay, protocol, "commit").Inc() @@ -326,7 +327,7 @@ func (atsync *ATProtoSynchronizer) repoStreamCallbacks(ctx context.Context, rela go atsync.handleCommitEventOps(ctx, evt) return nil }, - RepoIdentity: func(evt *comatproto.SyncSubscribeRepos_Identity) error { + RepoIdentity: func(evt *indigoatproto.SyncSubscribeRepos_Identity) error { atsync.markSeen() observeSeq(evt.Seq) spmetrics.FirehoseEventsReceivedTotal.WithLabelValues(relay, protocol, "identity").Inc() @@ -350,7 +351,7 @@ func (atsync *ATProtoSynchronizer) repoStreamCallbacks(ctx context.Context, rela // preserved as the event is relayed, so (did, time, handle) is stable for one // broadcast yet distinct across real changes. seq is deliberately excluded — it // is assigned per-relay and so differs for the very duplicates we want to fold. -func identityDedupKey(evt *comatproto.SyncSubscribeRepos_Identity) string { +func identityDedupKey(evt *indigoatproto.SyncSubscribeRepos_Identity) string { handle := "" if evt.Handle != nil { handle = *evt.Handle @@ -388,7 +389,7 @@ var CollectionFilter = []string{ constants.PLACE_STREAM_LIVE_RECOMMENDATIONS, } -func (atsync *ATProtoSynchronizer) handleCommitEventOps(ctx context.Context, evt *comatproto.SyncSubscribeRepos_Commit) { +func (atsync *ATProtoSynchronizer) handleCommitEventOps(ctx context.Context, evt *indigoatproto.SyncSubscribeRepos_Commit) { ctx = log.WithLogValues(ctx, "event", "commit", "did", evt.Repo, "rev", evt.Rev, "seq", fmt.Sprintf("%d", evt.Seq), "func", "handleCommitEventOps") if evt.TooBig { @@ -445,7 +446,7 @@ func (atsync *ATProtoSynchronizer) handleCommitEventOps(ctx context.Context, evt log.Error(ctx, "reading record from event blocks (CAR)", "err", err) break } - if !op.Cid.Defined() || glexrt.Link(rc) != op.Cid { + if !op.Cid.Defined() || glexrt.Link(rc) != glexrt.Link(cid.Cid(*op.Cid)) { log.Error(ctx, "mismatch between commit op CID and record block", "recordCID", rc, "opCID", op.Cid) break } @@ -658,7 +659,7 @@ func (atsync *ATProtoSynchronizer) handleCommitEventOps(ctx context.Context, evt } } -func (atsync *ATProtoSynchronizer) handleIdentityEventOps(ctx context.Context, evt *comatproto.SyncSubscribeRepos_Identity) { +func (atsync *ATProtoSynchronizer) handleIdentityEventOps(ctx context.Context, evt *indigoatproto.SyncSubscribeRepos_Identity) { handle := "" if evt.Handle != nil { handle = *evt.Handle diff --git a/pkg/atproto/firehose_moq.go b/pkg/atproto/firehose_moq.go index 4c32b2c3..66901086 100644 --- a/pkg/atproto/firehose_moq.go +++ b/pkg/atproto/firehose_moq.go @@ -5,7 +5,7 @@ import ( "context" "fmt" - "stream.place/streamplace/pkg/comatproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/bluesky-social/indigo/events" "github.com/bluesky-social/indigo/events/schedulers/parallel" atmoq "github.com/streamplace/atmoq-go" @@ -95,13 +95,13 @@ func (atsync *ATProtoSynchronizer) dispatchMoqFrame(ctx context.Context, raw []b case events.EvtKindMessage: switch header.MsgType { case "#commit": - var evt comatproto.SyncSubscribeRepos_Commit + var evt indigoatproto.SyncSubscribeRepos_Commit if err := evt.UnmarshalCBOR(r); err != nil { return fmt.Errorf("reading moq commit event: %w", err) } return scheduler.AddWork(ctx, evt.Repo, &events.XRPCStreamEvent{RepoCommit: &evt}) case "#identity": - var evt comatproto.SyncSubscribeRepos_Identity + var evt indigoatproto.SyncSubscribeRepos_Identity if err := evt.UnmarshalCBOR(r); err != nil { return fmt.Errorf("reading moq identity event: %w", err) } diff --git a/pkg/atproto/labeler_firehose.go b/pkg/atproto/labeler_firehose.go index 858e9026..35675a9c 100644 --- a/pkg/atproto/labeler_firehose.go +++ b/pkg/atproto/labeler_firehose.go @@ -8,7 +8,7 @@ import ( "net/url" "time" - "stream.place/streamplace/pkg/comatproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/bluesky-social/indigo/atproto/labeling" "github.com/bluesky-social/indigo/atproto/syntax" "github.com/bluesky-social/indigo/events" @@ -113,7 +113,7 @@ func (atsync *ATProtoSynchronizer) StartLabelerFirehoseRetry(ctx context.Context spmetrics.LabelerFirehosesConnected.WithLabelValues(did).Inc() defer spmetrics.LabelerFirehosesConnected.WithLabelValues(did).Dec() rsc := &events.RepoStreamCallbacks{ - LabelLabels: func(evt *comatproto.LabelSubscribeLabels_Labels) error { + LabelLabels: func(evt *indigoatproto.LabelSubscribeLabels_Labels) error { err = atsync.Model.UpdateLabelerCursor(did, evt.Seq) if err != nil { log.Error(ctx, "failed to update labeler cursor", "err", err) @@ -219,7 +219,7 @@ func (atsync *ATProtoSynchronizer) StartLabelerFirehoseRetry(ctx context.Context } return nil }, - LabelInfo: func(evt *comatproto.LabelSubscribeLabels_Info) error { + LabelInfo: func(evt *indigoatproto.LabelSubscribeLabels_Info) error { log.Log(ctx, "labeler info", "name", evt.Name, "message", evt.Message) return nil }, diff --git a/pkg/atproto/lexicon_repo.go b/pkg/atproto/lexicon_repo.go index d83d0b4c..f4e02d18 100644 --- a/pkg/atproto/lexicon_repo.go +++ b/pkg/atproto/lexicon_repo.go @@ -236,7 +236,7 @@ func MakeLexiconRepo(ctx context.Context, cli *config.CLI, mod model.Model, stat return nil, fmt.Errorf("failed to walk lexicon files: %w", err) } - ops := []*comatproto.SyncSubscribeRepos_RepoOp{} + ops := []comatproto.SyncSubscribeRepos_RepoOp{} lexSchemas := []*lexicon.SchemaFile{} @@ -275,10 +275,10 @@ func MakeLexiconRepo(ctx context.Context, cli *config.CLI, mod model.Model, stat return nil, err } log.Debug(ctx, "created new lexicon record", "rpath", rpath, "cid", newCid.String()) - ops = append(ops, &comatproto.SyncSubscribeRepos_RepoOp{ + ops = append(ops, comatproto.SyncSubscribeRepos_RepoOp{ Action: ActionCreate, Path: rpath, - Cid: &cidLink, + Cid: cidLink, }) } else if err != nil { return nil, err @@ -293,11 +293,11 @@ func MakeLexiconRepo(ctx context.Context, cli *config.CLI, mod model.Model, stat return nil, err } oldLink := glexrt.Link(oldCid) - ops = append(ops, &comatproto.SyncSubscribeRepos_RepoOp{ + ops = append(ops, comatproto.SyncSubscribeRepos_RepoOp{ Action: ActionUpdate, Path: rpath, Prev: &oldLink, - Cid: &cidLink, + Cid: cidLink, }) } } @@ -376,7 +376,15 @@ func GetRecordCBOR(ctx context.Context, ses *carstore.DeltaSession, c cid.Cid, c SchemaFile: sf, } } else { - val, err = glexrt.CborDecodeValue(b.RawData()) + decoded, err := glexrt.CborDecodeValue(b.RawData()) + if err != nil { + return nil, fmt.Errorf("failed to decode record: %w", err) + } + var ok bool + val, ok = decoded.(cbg.CBORMarshaler) + if !ok { + return nil, fmt.Errorf("decoded record does not implement CBORMarshaler: %T", decoded) + } if err != nil { return nil, fmt.Errorf("failed to decode record: %w", err) } diff --git a/pkg/atproto/lexicon_repo_queries.go b/pkg/atproto/lexicon_repo_queries.go index 24478453..d03f3e6f 100644 --- a/pkg/atproto/lexicon_repo_queries.go +++ b/pkg/atproto/lexicon_repo_queries.go @@ -81,7 +81,7 @@ func LexiconRepoListRecords(ctx context.Context, collection string, cursor strin return nil, fmt.Errorf("handleComAtprotoRepoListRecords: failed to open repo: %w", err) } out := &comatproto.RepoListRecords_Output{ - Records: []*comatproto.RepoListRecords_Record{}, + Records: []comatproto.RepoListRecords_Record{}, } err = r.ForEach(ctx, "", func(rkey string, c cid.Cid) error { val, err := GetRecordCBOR(ctx, ses, c, collection, rkey) @@ -89,7 +89,7 @@ func LexiconRepoListRecords(ctx context.Context, collection string, cursor strin return fmt.Errorf("handleComAtprotoRepoListRecords: failed to get record for collection %q, rkey %q: %w", collection, rkey, err) } log.Warn(ctx, "got record", "rkey", rkey, "cid", c.String()) - out.Records = append(out.Records, &comatproto.RepoListRecords_Record{ + out.Records = append(out.Records, comatproto.RepoListRecords_Record{ Uri: fmt.Sprintf("at://%s/%s", repo, rkey), Cid: c.String(), Value: &glexrt.LexiconTypeDecoder{Val: val}, diff --git a/pkg/atproto/server_repo.go b/pkg/atproto/server_repo.go index ca6b954e..2604f204 100644 --- a/pkg/atproto/server_repo.go +++ b/pkg/atproto/server_repo.go @@ -362,11 +362,11 @@ func CommitServerRepoRecord(ctx context.Context, cli *config.CLI, collection str Rev: rev, Commit: glexrt.Link(root), Time: time.Now().Format(util.ISO8601), - Ops: []*comatproto.SyncSubscribeRepos_RepoOp{ + Ops: []comatproto.SyncSubscribeRepos_RepoOp{ { Action: action, Path: rpath, - Cid: &cidLink, + Cid: cidLink, }, }, TooBig: false, @@ -579,7 +579,7 @@ func ServerRepoListRecords(ctx context.Context, collection string, cursor string // 4. Fetch + decode bodies only for the page. out := &comatproto.RepoListRecords_Output{ - Records: make([]*comatproto.RepoListRecords_Record, 0, len(page)), + Records: make([]comatproto.RepoListRecords_Record, 0, len(page)), } for _, e := range page { raw, err := getBlock(ctx, ses, e.c) @@ -590,7 +590,7 @@ func ServerRepoListRecords(ctx context.Context, collection string, cursor string if err != nil { return nil, fmt.Errorf("ServerRepoListRecords: failed to decode record for rkey %q: %w", e.rkey, err) } - out.Records = append(out.Records, &comatproto.RepoListRecords_Record{ + out.Records = append(out.Records, comatproto.RepoListRecords_Record{ Uri: fmt.Sprintf("at://%s/%s%s", repo, prefix, e.rkey), Cid: e.c.String(), Value: &glexrt.LexiconTypeDecoder{Val: val}, diff --git a/pkg/atproto/sync.go b/pkg/atproto/sync.go index cd2a0f01..1eb25c98 100644 --- a/pkg/atproto/sync.go +++ b/pkg/atproto/sync.go @@ -54,7 +54,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD return nil } log.Debug(ctx, "creating follow", "userDID", userDID, "subjectDID", rec.Subject) - err := atsync.Model.CreateFollow(ctx, userDID, rkey.String(), rec) + err := atsync.Model.CreateFollow(ctx, userDID, rkey.String(), *rec) if err != nil { log.Debug(ctx, "failed to create follow", "err", err) } @@ -129,7 +129,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD StreamerRepoDID: rec.Streamer, IndexedAt: &now, } - if rec.Reply != nil && rec.Reply.Parent != nil && rec.Reply.Root != nil { + if rec.Reply != nil && rec.Reply.Parent.Uri != "" && rec.Reply.Root.Uri != "" { mcm.ReplyToCID = &rec.Reply.Parent.Cid } @@ -167,7 +167,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD // Add mod badge if the author is a moderator issuerDID := fmt.Sprintf("did:web:%s", atsync.CLI.BroadcasterHost) - err = AddModBadgeIfApplicable(ctx, scm, rec.Streamer, issuerDID, atsync.Model) + err = AddModBadgeIfApplicable(ctx, &scm, rec.Streamer, issuerDID, atsync.Model) if err != nil { log.Error(ctx, "failed to add mod badge", "err", err) } @@ -293,14 +293,14 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD if err != nil { return fmt.Errorf("failed to convert chat message: %w", err) } - pinnedView.Message = msgView + pinnedView.Message = &msgView } if profile != nil { profileView, err := profile.ToStreamplaceChatProfile() if err != nil { return fmt.Errorf("failed to convert chat profile: %w", err) } - pinnedView.PinnedBy = profileView + pinnedView.PinnedBy = &profileView } go atsync.Bus.Publish(userDID, pinnedView) @@ -374,7 +374,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD return fmt.Errorf("failed to create bluesky post: %w", err) } } else { - if rec.Reply == nil || rec.Reply.Root == nil { + if rec.Reply == nil || rec.Reply.Root.Uri == "" { return nil } livestream, err := atsync.Model.GetLivestreamByPostURI(rec.Reply.Root.Uri) @@ -556,7 +556,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD if err == nil && chatProfile != nil { spcp, err := chatProfile.ToStreamplaceChatProfile() if err == nil { - arrivalMsg.ChatProfile = spcp + arrivalMsg.ChatProfile = &spcp } } @@ -589,7 +589,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD if err != nil { return fmt.Errorf("failed to sync broadcast origin streamer bluesky repo: %w", err) } - err = atsync.Model.UpdateBroadcastOrigin(ctx, rec, aturi) + err = atsync.Model.UpdateBroadcastOrigin(ctx, *rec, aturi) if err != nil { log.Error(ctx, "failed to update broadcast origin", "err", err) } @@ -628,7 +628,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD } log.Debug(ctx, "creating moderation delegation", "streamerDID", userDID, "moderatorDID", rec.Moderator) - err = atsync.Model.CreateModerationDelegation(ctx, rec, aturi) + err = atsync.Model.CreateModerationDelegation(ctx, *rec, aturi) if err != nil { return fmt.Errorf("failed to create moderation delegation: %w", err) } @@ -740,7 +740,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD if err != nil { return fmt.Errorf("failed to sync bluesky repo: %w", err) } - if err := atsync.Model.UpsertVideo(ctx, rec, aturi); err != nil { + if err := atsync.Model.UpsertVideo(ctx, *rec, aturi); err != nil { return fmt.Errorf("failed to upsert video: %w", err) } log.Debug(ctx, "indexed video", "uri", aturi.String(), "title", rec.Title) @@ -749,11 +749,11 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD // Tracks not backed by a muxlTrack (we don't define any other // shape yet) are skipped with a warning — there'd be no blob // to key the row off of. - if rec.Track == nil || rec.Track.MediaDefs_MuxlTrack == nil { + if rec.Track.MediaDefs_MuxlTrack == nil || rec.Track.MediaDefs_MuxlTrack == nil { log.Warn(ctx, "track record missing muxlTrack; skipping", "uri", aturi.String()) return nil } - if err := atsync.Model.UpsertMediaTrack(ctx, rec, aturi); err != nil { + if err := atsync.Model.UpsertMediaTrack(ctx, *rec, aturi); err != nil { return fmt.Errorf("failed to upsert media track: %w", err) } mt := rec.Track.MediaDefs_MuxlTrack @@ -763,7 +763,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD // Origin records are published by streamplace nodes (not users) // against their own server-repo DID. The aturi's authority is // the publishing server. - if err := atsync.Model.UpsertMediaOrigin(ctx, rec, aturi); err != nil { + if err := atsync.Model.UpsertMediaOrigin(ctx, *rec, aturi); err != nil { return fmt.Errorf("failed to upsert media origin: %w", err) } log.Debug(ctx, "indexed media origin", "uri", aturi.String(), "blob", rec.Blob, "server", userDID) @@ -774,7 +774,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD // callers filter by RepoDID to a single operator-configured // issuer (the `--beta-invite-did` flag), so anyone else // minting these records is harmless noise. - if err := atsync.Model.UpsertBetaInvite(ctx, rec, aturi); err != nil { + if err := atsync.Model.UpsertBetaInvite(ctx, *rec, aturi); err != nil { return fmt.Errorf("failed to upsert beta invite: %w", err) } log.Debug(ctx, "indexed beta invite", "uri", aturi.String(), "did", rec.Did, "feature", rec.Feature) @@ -792,7 +792,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD // Access requests are published by users in their own repos. We // index them so operators can see who's waiting and so // place.stream.beta.getStatus can report "requested". - if err := atsync.Model.UpsertBetaRequest(ctx, rec, aturi); err != nil { + if err := atsync.Model.UpsertBetaRequest(ctx, *rec, aturi); err != nil { return fmt.Errorf("failed to upsert beta request: %w", err) } log.Debug(ctx, "indexed beta request", "uri", aturi.String(), "did", userDID, "feature", rec.Feature) @@ -802,7 +802,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD // their server repos) reporting on traffic they observed. // Multiple reporters publish records for the same video; the // query layer (place.stream.media.getVideo) sums across them. - if err := atsync.Model.UpsertMediaViewCount(ctx, rec, aturi); err != nil { + if err := atsync.Model.UpsertMediaViewCount(ctx, *rec, aturi); err != nil { return fmt.Errorf("failed to upsert media view count: %w", err) } log.Debug(ctx, "indexed media view count", @@ -843,7 +843,7 @@ func (atsync *ATProtoSynchronizer) handleCreateUpdate(ctx context.Context, userD VideoAuthorDID: videoAuthor, IndexedAt: &now, } - if rec.Reply != nil && rec.Reply.Parent != nil && rec.Reply.Root != nil { + if rec.Reply != nil && rec.Reply.Parent.Uri != "" && rec.Reply.Root.Uri != "" { vc.ReplyToCID = &rec.Reply.Parent.Cid } diff --git a/pkg/badges/badges.go b/pkg/badges/badges.go index a4cf74fe..b33320ac 100644 --- a/pkg/badges/badges.go +++ b/pkg/badges/badges.go @@ -12,8 +12,8 @@ import ( // GetValidBadges returns valid badges for a user in the context of a streamer's chat. // Returns server-controlled badges (streamer, mod) based on permissions. -func GetValidBadges(ctx context.Context, userDID, streamerDID, issuerDID string, m model.Model) ([]*placestream.BadgeDefs_BadgeView, error) { - badges := []*placestream.BadgeDefs_BadgeView{} +func GetValidBadges(ctx context.Context, userDID, streamerDID, issuerDID string, m model.Model) ([]placestream.BadgeDefs_BadgeView, error) { + badges := []placestream.BadgeDefs_BadgeView{} // If no streamer context, return empty badges if streamerDID == "" { @@ -22,7 +22,7 @@ func GetValidBadges(ctx context.Context, userDID, streamerDID, issuerDID string, // Check if user is the streamer if userDID == streamerDID { - badges = append(badges, &placestream.BadgeDefs_BadgeView{ + badges = append(badges, placestream.BadgeDefs_BadgeView{ BadgeType: constants.BadgeTypeStreamer, Issuer: issuerDID, Recipient: userDID, @@ -38,7 +38,7 @@ func GetValidBadges(ctx context.Context, userDID, streamerDID, issuerDID string, } if len(delegations) > 0 { - badges = append(badges, &placestream.BadgeDefs_BadgeView{ + badges = append(badges, placestream.BadgeDefs_BadgeView{ BadgeType: constants.BadgeTypeMod, Issuer: issuerDID, Recipient: userDID, @@ -60,7 +60,7 @@ func GetValidBadges(ctx context.Context, userDID, streamerDID, issuerDID string, for _, label := range spChatProfile.SelfLabels { if label == constants.SelfLabelBot { log.Warn(ctx, "user self-labels as bot", "userDID", userDID) - badges = append(badges, &placestream.BadgeDefs_BadgeView{ + badges = append(badges, placestream.BadgeDefs_BadgeView{ BadgeType: constants.BadgeTypeBot, Issuer: issuerDID, Recipient: userDID, @@ -84,7 +84,7 @@ func GetValidBadges(ctx context.Context, userDID, streamerDID, issuerDID string, log.Warn(ctx, "streamer slot contains non-VIP badge", "badgeType", view.BadgeType) continue } - badges = append(badges, view) + badges = append(badges, *view) } } @@ -96,7 +96,7 @@ func GetValidBadges(ctx context.Context, userDID, streamerDID, issuerDID string, } else if !IsGlobalIssuer(view.Issuer) { log.Warn(ctx, "global slot badge not from authorized issuer", "issuer", view.Issuer) } else { - badges = append(badges, view) + badges = append(badges, *view) } } } @@ -136,7 +136,7 @@ func resolveIssuanceBadgeView(ctx context.Context, uri string, userDID string, m if def == nil { return nil, nil // def was deleted } - view := &placestream.BadgeDefs_BadgeView{ + view := placestream.BadgeDefs_BadgeView{ BadgeType: def.BadgeType, Issuer: issuance.RepoDID, Recipient: userDID, @@ -151,5 +151,5 @@ func resolveIssuanceBadgeView(ctx context.Context, uri string, userDID string, m imageUrl := fmt.Sprintf("https://cdn.bsky.app/img/feed_fullsize/plain/%s/%s@png", def.RepoDID, def.ImageCID) view.ImageUrl = &imageUrl } - return view, nil + return &view, nil } diff --git a/pkg/director/stream_session.go b/pkg/director/stream_session.go index 2ebffe57..b23524bb 100644 --- a/pkg/director/stream_session.go +++ b/pkg/director/stream_session.go @@ -10,7 +10,7 @@ import ( "strings" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "stream.place/streamplace/pkg/appbsky" "github.com/bluesky-social/indigo/atproto/syntax" glexrt "github.com/streamplace/glex/runtime" @@ -342,7 +342,7 @@ func (ss *StreamSession) NewSegment(ctx context.Context, notif *media.NewSegment if err != nil { return fmt.Errorf("failed to convert livestream to streamplace livestream: %w", err) } - if !shouldNotify(lsv) { + if !shouldNotify(&lsv) { log.Debug(ctx, "is not set to notify", "repoDID", spseg.Creator) return nil } @@ -496,12 +496,12 @@ func (ss *StreamSession) doUpdateStatus(ctx context.Context, repoDID string) err } actorStatusEmbed := appbsky.ActorStatus_Embed{ - EmbedExternal: appbsky.EmbedExternal{ + EmbedExternal: &appbsky.EmbedExternal{ External: appbsky.EmbedExternal_External{ Title: lsr.Title, Uri: canonicalUrl, Description: fmt.Sprintf("@%s is 🔴LIVE on %s", repo.Handle, ss.cli.BroadcasterHost), - Thumb: lex.BlobToLexUtil(thumb), + Thumb: thumb, }, }, } @@ -1023,7 +1023,7 @@ func (ss *StreamSession) HandleMultistreamTargets(ctx context.Context) error { if err != nil { log.Error(ctx, "failed to create multistream event", "error", err) } - return ss.StartMultistreamTarget(childCtx, targetView) + return ss.StartMultistreamTarget(childCtx, &targetView) }) running[key] = &runningMultistream{ cancel: childCancel, diff --git a/pkg/media/key_revocation.go b/pkg/media/key_revocation.go index 774cff4c..6baf7fc9 100644 --- a/pkg/media/key_revocation.go +++ b/pkg/media/key_revocation.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "github.com/go-gst/go-gst/gst" "stream.place/streamplace/pkg/atproto" "stream.place/streamplace/pkg/model" diff --git a/pkg/media/manifest_builder.go b/pkg/media/manifest_builder.go index 1e702568..86d737f6 100644 --- a/pkg/media/manifest_builder.go +++ b/pkg/media/manifest_builder.go @@ -145,7 +145,7 @@ func (mb *ManifestBuilder) BuildManifest(ctx context.Context, streamerName strin log.Warn(ctx, "ManifestBuilder: failed to convert metadata, using defaults", "error", err, "did", streamerName) } else { log.Debug(ctx, "ManifestBuilder: enhancing manifest with metadata", "did", streamerName, "contentWarnings", streamplaceMetadata.ContentWarnings, "contentRights", streamplaceMetadata.ContentRights) - mani = mb.enhanceManifestWithMetadata(mani, streamplaceMetadata, start) + mani = mb.enhanceManifestWithMetadata(mani, &streamplaceMetadata, start) metadataObj, err := toObj(streamplaceMetadata) if err != nil { return nil, fmt.Errorf("failed to marshal metadata: %w", err) diff --git a/pkg/model/label.go b/pkg/model/label.go index 14555fe9..a6de9ec5 100644 --- a/pkg/model/label.go +++ b/pkg/model/label.go @@ -4,7 +4,7 @@ import ( "bytes" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "gorm.io/gorm/clause" ) diff --git a/pkg/model/model.go b/pkg/model/model.go index 99c94370..e2618044 100644 --- a/pkg/model/model.go +++ b/pkg/model/model.go @@ -7,7 +7,7 @@ import ( "path/filepath" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "stream.place/streamplace/pkg/appbsky" "github.com/bluesky-social/indigo/atproto/syntax" "gorm.io/driver/sqlite" diff --git a/pkg/moderation/permissions.go b/pkg/moderation/permissions.go index c7d9c16a..d78f8e87 100644 --- a/pkg/moderation/permissions.go +++ b/pkg/moderation/permissions.go @@ -9,7 +9,7 @@ import ( ) type delegationGetter interface { - GetModerationDelegations(ctx context.Context, streamerDID, moderatorDID string) ([]*placestream.ModerationDefs_PermissionView, error) + GetModerationDelegations(ctx context.Context, streamerDID, moderatorDID string) ([]placestream.ModerationDefs_PermissionView, error) } // Permission scope constants diff --git a/pkg/replication/iroh_replicator/kv.go b/pkg/replication/iroh_replicator/kv.go index c90c684f..14d1c0e9 100644 --- a/pkg/replication/iroh_replicator/kv.go +++ b/pkg/replication/iroh_replicator/kv.go @@ -259,7 +259,7 @@ func (swarm *IrohSwarm) startBusSubscribe(ctx context.Context) error { return fmt.Errorf("failed to get recent broadcast origins: %w", err) } for _, view := range originViews { - err = swarm.handleOriginMessage(ctx, view) + err = swarm.handleOriginMessage(ctx, &view) if err != nil { log.Error(ctx, "could not check origin", "error", err) } diff --git a/pkg/replication/websocketrep/websocket_replicator.go b/pkg/replication/websocketrep/websocket_replicator.go index 8bb41954..cec051ba 100644 --- a/pkg/replication/websocketrep/websocket_replicator.go +++ b/pkg/replication/websocketrep/websocket_replicator.go @@ -52,7 +52,7 @@ func (r *WebsocketReplicator) startBusSubscribe(ctx context.Context) error { return fmt.Errorf("failed to get recent broadcast origins: %w", err) } for _, view := range originViews { - err = r.handleOriginMessage(ctx, view) + err = r.handleOriginMessage(ctx, &view) if err != nil { log.Error(ctx, "could not check origin", "error", err) } diff --git a/pkg/spxrpc/app_bsky_actor.go b/pkg/spxrpc/app_bsky_actor.go index 059c74b8..ada4dee9 100644 --- a/pkg/spxrpc/app_bsky_actor.go +++ b/pkg/spxrpc/app_bsky_actor.go @@ -36,7 +36,7 @@ func (s *Server) handleAppBskyActorGetProfile(ctx context.Context, actor string) } // user valid but we couldn't find their bsky profile, return a minimum thing - if profile == nil { + if false { return &appbskytypes.ActorDefs_ProfileViewDetailed{ Did: repo.DID, Handle: repo.Handle, diff --git a/pkg/spxrpc/app_bsky_feed.go b/pkg/spxrpc/app_bsky_feed.go index 2ac71515..c5bed9de 100644 --- a/pkg/spxrpc/app_bsky_feed.go +++ b/pkg/spxrpc/app_bsky_feed.go @@ -80,7 +80,7 @@ func (s *Server) handleAppBskyFeedGetFeedSkeleton(ctx context.Context, inCursor return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("invalid feed name: %s", name)) } res := appbsky.FeedGetFeedSkeleton_Output{ - Feed: []*appbsky.FeedDefs_SkeletonFeedPost{}, + Feed: []appbsky.FeedDefs_SkeletonFeedPost{}, } if outCursor != "" { res.Cursor = &outCursor diff --git a/pkg/spxrpc/beta_invite_test.go b/pkg/spxrpc/beta_invite_test.go index fd5641d9..fed5239f 100644 --- a/pkg/spxrpc/beta_invite_test.go +++ b/pkg/spxrpc/beta_invite_test.go @@ -23,7 +23,7 @@ func putInvite(t *testing.T, m model.Model, repoDID, subjectDID, feature string) rkey := feature + "-" + subjectDID aturi, err := syntax.ParseATURI("at://" + repoDID + "/place.stream.beta.invite/" + rkey) require.NoError(t, err) - require.NoError(t, m.UpsertBetaInvite(context.Background(), &placestream.BetaInvite{ + require.NoError(t, m.UpsertBetaInvite(context.Background(), placestream.BetaInvite{ LexiconTypeID: "place.stream.beta.invite", Did: subjectDID, Feature: feature, diff --git a/pkg/spxrpc/com_atproto_identity.go b/pkg/spxrpc/com_atproto_identity.go index 3fecf47b..0f3e9abe 100644 --- a/pkg/spxrpc/com_atproto_identity.go +++ b/pkg/spxrpc/com_atproto_identity.go @@ -3,25 +3,25 @@ package spxrpc import ( "context" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/streamplace/oatproxy/pkg/oatproxy" "stream.place/streamplace/pkg/aqhttp" ) -func (s *Server) handleComAtprotoIdentityResolveHandle(ctx context.Context, handle string) (*comatprototypes.IdentityResolveHandle_Output, error) { +func (s *Server) handleComAtprotoIdentityResolveHandle(ctx context.Context, handle string) (*indigoatproto.IdentityResolveHandle_Output, error) { did, err := oatproxy.ResolveHandleWithClient(ctx, handle, &aqhttp.Client) if err != nil { return nil, err } - return &comatprototypes.IdentityResolveHandle_Output{Did: did}, nil + return &indigoatproto.IdentityResolveHandle_Output{Did: did}, nil } -func (s *Server) handleComAtprotoIdentityRefreshIdentity(ctx context.Context, body *comatprototypes.IdentityRefreshIdentity_Input) (*comatprototypes.IdentityDefs_IdentityInfo, error) { +func (s *Server) handleComAtprotoIdentityRefreshIdentity(ctx context.Context, body *indigoatproto.IdentityRefreshIdentity_Input) (*indigoatproto.IdentityDefs_IdentityInfo, error) { ident, err := s.ATSync.RefreshIdentity(ctx, body.Identifier) if err != nil { return nil, err } - return &comatprototypes.IdentityDefs_IdentityInfo{ + return &indigoatproto.IdentityDefs_IdentityInfo{ Did: ident.DID.String(), Handle: ident.Handle.String(), DidDoc: ident.DIDDocument(), diff --git a/pkg/spxrpc/com_atproto_moderation.go b/pkg/spxrpc/com_atproto_moderation.go index 5d315ecc..4eb1864e 100644 --- a/pkg/spxrpc/com_atproto_moderation.go +++ b/pkg/spxrpc/com_atproto_moderation.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/bluesky-social/indigo/atproto/syntax" "github.com/bluesky-social/indigo/xrpc" "github.com/google/uuid" @@ -17,7 +17,7 @@ import ( "stream.place/streamplace/pkg/media" ) -func (s *Server) handleComAtprotoModerationCreateReport(ctx context.Context, body *comatprototypes.ModerationCreateReport_Input) (*comatprototypes.ModerationCreateReport_Output, error) { +func (s *Server) handleComAtprotoModerationCreateReport(ctx context.Context, body *indigoatproto.ModerationCreateReport_Input) (*indigoatproto.ModerationCreateReport_Output, error) { c, ok := ctx.Value(echoContextKey).(echo.Context) if !ok { return nil, echo.NewHTTPError(http.StatusInternalServerError, "echo context not found") @@ -89,7 +89,7 @@ func (s *Server) handleComAtprotoModerationCreateReport(ctx context.Context, bod "Atproto-Proxy": atprotoProxy, }) - var output comatprototypes.ModerationCreateReport_Output + var output indigoatproto.ModerationCreateReport_Output err = client.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.moderation.createReport", nil, body, &output) if err != nil { return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error()) diff --git a/pkg/spxrpc/com_atproto_repo.go b/pkg/spxrpc/com_atproto_repo.go index e61c330b..e3ed8bb5 100644 --- a/pkg/spxrpc/com_atproto_repo.go +++ b/pkg/spxrpc/com_atproto_repo.go @@ -7,9 +7,10 @@ import ( "fmt" "io" "net/http" + glexrt "github.com/streamplace/glex/runtime" "strings" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "github.com/bluesky-social/indigo/xrpc" "github.com/labstack/echo/v4" @@ -98,7 +99,7 @@ func (s *Server) handleComAtprotoRepoDescribeRepo(ctx context.Context, repo stri return &comatproto.RepoDescribeRepo_Output{ Handle: s.cli.ServerDID(), Did: s.cli.ServerDID(), - DidDoc: atproto.DIDDoc(s.cli.ServerHost, atproto.ServerPubMultibase), + DidDoc: &glexrt.LexiconTypeDecoder{Val: atproto.DIDDoc(s.cli.ServerHost, atproto.ServerPubMultibase)}, Collections: collections, HandleIsCorrect: true, }, nil @@ -107,7 +108,7 @@ func (s *Server) handleComAtprotoRepoDescribeRepo(ctx context.Context, repo stri return &comatproto.RepoDescribeRepo_Output{ Handle: s.cli.BroadcasterDID(), Did: s.cli.BroadcasterDID(), - DidDoc: atproto.DIDDoc(s.cli.BroadcasterHost, atproto.LexiconPubMultibase), + DidDoc: &glexrt.LexiconTypeDecoder{Val: atproto.DIDDoc(s.cli.BroadcasterHost, atproto.LexiconPubMultibase)}, Collections: []string{ "com.atproto.lexicon.schema", }, diff --git a/pkg/spxrpc/com_atproto_server.go b/pkg/spxrpc/com_atproto_server.go index 0254a429..86586188 100644 --- a/pkg/spxrpc/com_atproto_server.go +++ b/pkg/spxrpc/com_atproto_server.go @@ -4,13 +4,13 @@ import ( "context" "fmt" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" ) -func (s *Server) handleComAtprotoServerDescribeServer(ctx context.Context) (*comatprototypes.ServerDescribeServer_Output, error) { +func (s *Server) handleComAtprotoServerDescribeServer(ctx context.Context) (*indigoatproto.ServerDescribeServer_Output, error) { did := fmt.Sprintf("did:web:%s", s.cli.BroadcasterHost) trueVar := true - return &comatprototypes.ServerDescribeServer_Output{ + return &indigoatproto.ServerDescribeServer_Output{ Did: did, InviteCodeRequired: &trueVar, AvailableUserDomains: []string{ diff --git a/pkg/spxrpc/com_atproto_sync.go b/pkg/spxrpc/com_atproto_sync.go index 9b81a2a4..252f35b8 100644 --- a/pkg/spxrpc/com_atproto_sync.go +++ b/pkg/spxrpc/com_atproto_sync.go @@ -7,8 +7,10 @@ import ( "io" "net/http" "strconv" + "stream.place/streamplace/pkg/comatproto" + glexrt "github.com/streamplace/glex/runtime" - comatprototypes "github.com/bluesky-social/indigo/api/atproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/bluesky-social/indigo/events" "github.com/gorilla/websocket" "github.com/labstack/echo/v4" @@ -16,13 +18,13 @@ import ( "stream.place/streamplace/pkg/log" ) -func (s *Server) handleComAtprotoSyncListRepos(ctx context.Context, cursor string, limit int) (*comatprototypes.SyncListRepos_Output, error) { +func (s *Server) handleComAtprotoSyncListRepos(ctx context.Context, cursor string, limit int) (*indigoatproto.SyncListRepos_Output, error) { active := true if s.isServerPDS(ctx) { // Server PDS: only the server repo - return &comatprototypes.SyncListRepos_Output{ - Repos: []*comatprototypes.SyncListRepos_Repo{ + return &indigoatproto.SyncListRepos_Output{ + Repos: []*indigoatproto.SyncListRepos_Repo{ { Did: atproto.ServerRepo.RepoDid(), Head: atproto.ServerRepo.SignedCommit().Data.String(), @@ -34,8 +36,8 @@ func (s *Server) handleComAtprotoSyncListRepos(ctx context.Context, cursor strin } // Broadcaster PDS: only the lexicon repo - return &comatprototypes.SyncListRepos_Output{ - Repos: []*comatprototypes.SyncListRepos_Repo{ + return &indigoatproto.SyncListRepos_Output{ + Repos: []*indigoatproto.SyncListRepos_Repo{ { Did: atproto.LexiconRepo.RepoDid(), Head: atproto.LexiconRepo.SignedCommit().Data.String(), @@ -92,7 +94,7 @@ func (s *Server) handleComAtprotoSyncGetRepo(ctx context.Context, did string, si } // writeCommitToWS writes a single commit event to a websocket connection. -func writeCommitToWS(conn *websocket.Conn, header *events.EventHeader, commit *comatprototypes.SyncSubscribeRepos_Commit) error { +func writeCommitToWS(conn *websocket.Conn, header *events.EventHeader, commit *comatproto.SyncSubscribeRepos_Commit) error { wc, err := conn.NextWriter(websocket.BinaryMessage) if err != nil { return err diff --git a/pkg/spxrpc/feed_test.go b/pkg/spxrpc/feed_test.go index 29d4083b..a7f1e6e2 100644 --- a/pkg/spxrpc/feed_test.go +++ b/pkg/spxrpc/feed_test.go @@ -14,19 +14,19 @@ func TestFeedSkeletonRE(t *testing.T) { want bool }{ { - feed: "at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.bsky.feed.generator/atproto", + feed: "at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.appbsky.feed.generator/atproto", did: "did:plc:oio4hkxaop4ao4wz2pp3f4cr", name: "atproto", want: true, }, { - feed: "at://did:web:iame.li/app.bsky.feed.generator/feedwithnumbers123", + feed: "at://did:web:iame.li/app.appbsky.feed.generator/feedwithnumbers123", did: "did:web:iame.li", name: "feedwithnumbers123", want: true, }, { - feed: "at://did:web:iame.li/app.bsky.feed.generator/feed-with-dashes", + feed: "at://did:web:iame.li/app.appbsky.feed.generator/feed-with-dashes", did: "did:web:iame.li", name: "feed-with-dashes", want: true, @@ -36,15 +36,15 @@ func TestFeedSkeletonRE(t *testing.T) { want: false, }, { - feed: "at:///app.bsky.feed.generator/feedwithnumbers123", + feed: "at:///app.appbsky.feed.generator/feedwithnumbers123", want: false, }, { - feed: "at://did:web:iame.li/app.bsky.feed.generator/", + feed: "at://did:web:iame.li/app.appbsky.feed.generator/", want: false, }, { - feed: "at://did:web:iame.li/app.bsky.feed.generator/feedwithnumbers123/errantsuffix", + feed: "at://did:web:iame.li/app.appbsky.feed.generator/feedwithnumbers123/errantsuffix", want: false, }, } diff --git a/pkg/spxrpc/graph.go b/pkg/spxrpc/graph.go index c9dee39f..c3406431 100644 --- a/pkg/spxrpc/graph.go +++ b/pkg/spxrpc/graph.go @@ -4,13 +4,14 @@ import ( "context" "fmt" - "github.com/bluesky-social/indigo/api/atproto" + indigoatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/bluesky-social/indigo/atproto/syntax" "go.opentelemetry.io/otel" - placestreamtypes "stream.place/streamplace/pkg/placestream" + "stream.place/streamplace/pkg/comatproto" + placestream "stream.place/streamplace/pkg/placestream" ) -func (s *Server) handlePlaceStreamGraphGetFollowingUser(ctx context.Context, subjectDID string, userDID string) (*placestreamtypes.GraphGetFollowingUser_Output, error) { +func (s *Server) handlePlaceStreamGraphGetFollowingUser(ctx context.Context, subjectDID string, userDID string) (*placestream.GraphGetFollowingUser_Output, error) { ctx, span := otel.Tracer("server").Start(ctx, "handlePlaceStreamGraphGetFollowingUser") defer span.End() @@ -24,13 +25,13 @@ func (s *Server) handlePlaceStreamGraphGetFollowingUser(ctx context.Context, sub return nil, fmt.Errorf("failed to get user following: %w", err) } - output := &placestreamtypes.GraphGetFollowingUser_Output{} + output := placestream.GraphGetFollowingUser_Output{} if follow != nil { - output.Follow = &atproto.RepoStrongRef{ + output.Follow = &comatproto.RepoStrongRef{ Cid: "", // We don't store CID in our model - Uri: fmt.Sprintf("at://%s/app.bsky.graph.follow/%s", userDID, follow.RKey), + Uri: fmt.Sprintf("at://%s/app.appbsky.graph.follow/%s", userDID, follow.RKey), } } - return output, nil + return &output, nil } diff --git a/pkg/spxrpc/labels_test.go b/pkg/spxrpc/labels_test.go index 170fd20d..64124644 100644 --- a/pkg/spxrpc/labels_test.go +++ b/pkg/spxrpc/labels_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "github.com/bluesky-social/indigo/atproto/syntax" "github.com/labstack/echo/v4" "github.com/stretchr/testify/require" @@ -117,10 +117,10 @@ func setupBlobTest(t *testing.T) (*Server, model.Model) { m := newTestModel(t) aturi, err := syntax.ParseATURI("at://" + testOwner + "/place.stream.media.track/1") require.NoError(t, err) - require.NoError(t, m.UpsertMediaTrack(context.Background(), &placestream.MediaTrack{ + require.NoError(t, m.UpsertMediaTrack(context.Background(), placestream.MediaTrack{ LexiconTypeID: "place.stream.media.track", - Track: &placestream.MediaTrack_Track{ - MediaDefs_MuxlTrack: &placestream.MediaDefs_MuxlTrack{ + Track: placestream.MediaTrack_Track{ + MediaDefs_MuxlTrack: placestream.MediaDefs_MuxlTrack{ LexiconTypeID: "place.stream.media.defs#muxlTrack", Blob: testContentCID, TrackId: "1", diff --git a/pkg/spxrpc/og.go b/pkg/spxrpc/og.go index 2baad3ec..be05074a 100644 --- a/pkg/spxrpc/og.go +++ b/pkg/spxrpc/og.go @@ -278,7 +278,7 @@ func (s *Server) generateOGImage(ctx context.Context, username string) ([]byte, streamplaceChatProfile, err := chatProfile.ToStreamplaceChatProfile() if err != nil { log.Warn(ctx, "failed to decode chat profile", "did", userDID, "error", err) - } else if streamplaceChatProfile != nil && streamplaceChatProfile.Color != nil { + } else if true && streamplaceChatProfile.Color != nil { userColor = color.RGBA{ R: uint8(streamplaceChatProfile.Color.Red), G: uint8(streamplaceChatProfile.Color.Green), diff --git a/pkg/spxrpc/place_stream_badge.go b/pkg/spxrpc/place_stream_badge.go index d07d5632..b5a7dcb6 100644 --- a/pkg/spxrpc/place_stream_badge.go +++ b/pkg/spxrpc/place_stream_badge.go @@ -46,7 +46,7 @@ func (s *Server) handlePlaceStreamBadgeGetIssuedBadges(ctx context.Context, stre // Take the first server badge (streamer, mod, or bot). These are always first in the list. for _, b := range computed { if b.BadgeType == constants.BadgeTypeStreamer || b.BadgeType == constants.BadgeTypeMod || b.BadgeType == constants.BadgeTypeBot { - serverBadge = b + serverBadge = &b break } } @@ -60,9 +60,9 @@ func (s *Server) handlePlaceStreamBadgeGetIssuedBadges(ctx context.Context, stre } if chatProfile != nil { spcp, err := chatProfile.ToStreamplaceChatProfile() - if err == nil && spcp != nil && spcp.Badges != nil { + if err == nil && true && spcp.Badges != nil { for _, sel := range spcp.Badges.Streamer { - if sel != nil && sel.Badge != nil { + if sel.Badge.Uri != "" && sel.Badge.Uri != "" { selectedURIs[sel.Badge.Uri] = true } } @@ -78,11 +78,11 @@ func (s *Server) handlePlaceStreamBadgeGetIssuedBadges(ctx context.Context, stre return nil, echo.NewHTTPError(http.StatusInternalServerError, "failed to fetch badge issuances") } - streamerSlot := &placestream.BadgeDefs_BadgeSlot{ - Available: []*placestream.BadgeDefs_BadgeIssuanceView{}, + streamerSlot := placestream.BadgeDefs_BadgeSlot{ + Available: []placestream.BadgeDefs_BadgeIssuanceView{}, } - userSlot := &placestream.BadgeDefs_BadgeSlot{ - Available: []*placestream.BadgeDefs_BadgeIssuanceView{}, + userSlot := placestream.BadgeDefs_BadgeSlot{ + Available: []placestream.BadgeDefs_BadgeIssuanceView{}, } for _, issuance := range issuances { @@ -95,7 +95,7 @@ func (s *Server) handlePlaceStreamBadgeGetIssuedBadges(ctx context.Context, stre continue // def was deleted } - view := &placestream.BadgeDefs_BadgeIssuanceView{ + view := placestream.BadgeDefs_BadgeIssuanceView{ IssuanceUri: issuance.URI, IssuanceCid: &issuance.CID, BadgeType: def.BadgeType, @@ -108,7 +108,7 @@ func (s *Server) handlePlaceStreamBadgeGetIssuedBadges(ctx context.Context, stre view.Description = &def.Description } if def.ImageCID != "" { - imageUrl := fmt.Sprintf("https://cdn.bsky.app/img/feed_fullsize/plain/%s/%s@png", def.RepoDID, def.ImageCID) + imageUrl := fmt.Sprintf("https://cdn.appbsky.app/img/feed_fullsize/plain/%s/%s@png", def.RepoDID, def.ImageCID) view.ImageUrl = &imageUrl } isSelected := selectedURIs[issuance.URI] @@ -117,12 +117,12 @@ func (s *Server) handlePlaceStreamBadgeGetIssuedBadges(ctx context.Context, stre if badges.IsGlobalIssuer(issuance.RepoDID) { userSlot.Available = append(userSlot.Available, view) if isSelected && userSlot.Selected == nil { - userSlot.Selected = view + userSlot.Selected = &view } } else { streamerSlot.Available = append(streamerSlot.Available, view) if isSelected && streamerSlot.Selected == nil { - streamerSlot.Selected = view + streamerSlot.Selected = &view } } } diff --git a/pkg/spxrpc/place_stream_branding.go b/pkg/spxrpc/place_stream_branding.go index 4f6e2742..8f5f3372 100644 --- a/pkg/spxrpc/place_stream_branding.go +++ b/pkg/spxrpc/place_stream_branding.go @@ -8,6 +8,7 @@ import ( "fmt" "io" "net/http" + placestream "stream.place/streamplace/pkg/placestream" "github.com/labstack/echo/v4" "github.com/streamplace/oatproxy/pkg/oatproxy" @@ -92,7 +93,7 @@ func (s *Server) HandlePlaceStreamBrandingGetBrandingDirect(ctx context.Context, } // build output - assets := make([]*placestreamtypes.BrandingGetBranding_BrandingAsset, 0, len(allKeys)) + assets := make([]placestream.BrandingGetBranding_BrandingAsset, 0, len(allKeys)) for key := range allKeys { data, mimeType, width, height, err := s.GetBrandingBlob(ctx, broadcasterID, key) if err != nil { @@ -123,7 +124,7 @@ func (s *Server) HandlePlaceStreamBrandingGetBrandingDirect(ctx context.Context, asset.Url = &url } - assets = append(assets, asset) + assets = append(assets, *asset) } return &placestreamtypes.BrandingGetBranding_Output{ diff --git a/pkg/spxrpc/place_stream_config.go b/pkg/spxrpc/place_stream_config.go index 6a2b6fae..abc3bc34 100644 --- a/pkg/spxrpc/place_stream_config.go +++ b/pkg/spxrpc/place_stream_config.go @@ -7,7 +7,7 @@ import ( ) func (s *Server) handlePlaceStreamConfigGetEnv(ctx context.Context) (*placestream.ConfigGetEnv_Output, error) { - out := &placestream.ConfigGetEnv_Output{} + out := placestream.ConfigGetEnv_Output{} if s.cli.PlaybackWorkerURL != "" { out.PlaybackWorkerUrl = &s.cli.PlaybackWorkerURL } @@ -15,5 +15,5 @@ func (s *Server) handlePlaceStreamConfigGetEnv(ctx context.Context) (*placestrea t := true out.GamesEnabled = &t } - return out, nil + return &out, nil } diff --git a/pkg/spxrpc/place_stream_game.go b/pkg/spxrpc/place_stream_game.go index 6933167a..0d5d0017 100644 --- a/pkg/spxrpc/place_stream_game.go +++ b/pkg/spxrpc/place_stream_game.go @@ -143,13 +143,13 @@ func (s *Server) handlePlaceStreamGameGetGame(ctx context.Context, uri string) ( var coverUrl *string for _, m := range record.Value.Media { if (m.MediaType == "cover" || m.MediaType == "coverSquare") && m.Blob.Ref.Link != "" { - u := "https://cdn.bsky.app/img/feed_thumbnail/plain/" + did + "/" + m.Blob.Ref.Link + "@jpeg" + u := "https://cdn.appbsky.app/img/feed_thumbnail/plain/" + did + "/" + m.Blob.Ref.Link + "@jpeg" coverUrl = &u break } } - out := &placestream.GameGetGame_Output{ + out := placestream.GameGetGame_Output{ Uri: uri, Name: record.Value.Name, Summary: &record.Value.Summary, @@ -158,5 +158,5 @@ func (s *Server) handlePlaceStreamGameGetGame(ctx context.Context, uri string) ( } s.GameSearchCache.SetDefault(cacheKey, out) - return out, nil + return &out, nil } diff --git a/pkg/spxrpc/place_stream_ingest.go b/pkg/spxrpc/place_stream_ingest.go index 734ae9b1..ccea4ff1 100644 --- a/pkg/spxrpc/place_stream_ingest.go +++ b/pkg/spxrpc/place_stream_ingest.go @@ -22,8 +22,8 @@ func (s *Server) handlePlaceStreamIngestGetIngestUrls(ctx context.Context) (*pla } broadcasterDID := s.cli.BroadcasterDID() broadcasterHost := strings.TrimPrefix(broadcasterDID, "did:web:") - out := &placestream.IngestGetIngestUrls_Output{ - Ingests: []*placestream.IngestGetIngestUrls_Output_Ingests_Elem{}, + out := placestream.IngestGetIngestUrls_Output{ + Ingests: []placestream.IngestGetIngestUrls_Output_Ingests_Elem{}, } if !s.cli.Secure { _, rtmpPort, err := net.SplitHostPort(s.cli.RTMPAddr) @@ -31,7 +31,7 @@ func (s *Server) handlePlaceStreamIngestGetIngestUrls(ctx context.Context) (*pla return nil, err } rtmpUrl := fmt.Sprintf("rtmp://%s/live", hostPort(broadcasterHost, rtmpPort, "1935")) - out.Ingests = append(out.Ingests, &placestream.IngestGetIngestUrls_Output_Ingests_Elem{ + out.Ingests = append(out.Ingests, placestream.IngestGetIngestUrls_Output_Ingests_Elem{ IngestDefs_Ingest: &placestream.IngestDefs_Ingest{ Type: "rtmp", Url: rtmpUrl, @@ -43,7 +43,7 @@ func (s *Server) handlePlaceStreamIngestGetIngestUrls(ctx context.Context) (*pla return nil, err } whipUrl := fmt.Sprintf("http://%s", hostPort(broadcasterHost, httpPort, "80")) - out.Ingests = append(out.Ingests, &placestream.IngestGetIngestUrls_Output_Ingests_Elem{ + out.Ingests = append(out.Ingests, placestream.IngestGetIngestUrls_Output_Ingests_Elem{ IngestDefs_Ingest: &placestream.IngestDefs_Ingest{ Type: "whip", Url: whipUrl, @@ -55,7 +55,7 @@ func (s *Server) handlePlaceStreamIngestGetIngestUrls(ctx context.Context) (*pla return nil, err } rtmpsUrl := fmt.Sprintf("rtmps://%s:%s/live", broadcasterHost, rtmpsPort) - out.Ingests = append(out.Ingests, &placestream.IngestGetIngestUrls_Output_Ingests_Elem{ + out.Ingests = append(out.Ingests, placestream.IngestGetIngestUrls_Output_Ingests_Elem{ IngestDefs_Ingest: &placestream.IngestDefs_Ingest{ Type: "rtmps", Url: rtmpsUrl, @@ -67,7 +67,7 @@ func (s *Server) handlePlaceStreamIngestGetIngestUrls(ctx context.Context) (*pla return nil, err } whipUrl := fmt.Sprintf("https://%s", hostPort(broadcasterHost, httpsPort, "443")) - out.Ingests = append(out.Ingests, &placestream.IngestGetIngestUrls_Output_Ingests_Elem{ + out.Ingests = append(out.Ingests, placestream.IngestGetIngestUrls_Output_Ingests_Elem{ IngestDefs_Ingest: &placestream.IngestDefs_Ingest{ Type: "whip", Url: whipUrl, @@ -75,5 +75,5 @@ func (s *Server) handlePlaceStreamIngestGetIngestUrls(ctx context.Context) (*pla }) } - return out, nil + return &out, nil } diff --git a/pkg/spxrpc/place_stream_live.go b/pkg/spxrpc/place_stream_live.go index bcdad9bb..d265075f 100644 --- a/pkg/spxrpc/place_stream_live.go +++ b/pkg/spxrpc/place_stream_live.go @@ -12,8 +12,8 @@ import ( "strconv" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" - bsky "stream.place/streamplace/pkg/appbsky" + "stream.place/streamplace/pkg/comatproto" + "stream.place/streamplace/pkg/appbsky" "github.com/bluesky-social/indigo/atproto/syntax" glexrt "github.com/streamplace/glex/runtime" "github.com/bluesky-social/indigo/util" @@ -60,7 +60,7 @@ func (s *Server) handlePlaceStreamLiveDenyTeleport(ctx context.Context, input *p return nil, echo.NewHTTPError(http.StatusInternalServerError, "Failed to deny teleport") } - cancelMsg := &placestream.Livestream_TeleportCanceled{ + cancelMsg := placestream.Livestream_TeleportCanceled{ LexiconTypeID: "place.stream.livestream#teleportCanceled", TeleportUri: input.Uri, Reason: "denied", @@ -187,8 +187,8 @@ func (s *Server) handlePlaceStreamLiveGetSegments(ctx context.Context, before st } // Convert segments to the expected output format - output := &placestream.LiveGetSegments_Output{ - Segments: make([]*placestream.Segment_SegmentView, len(segments)), + output := placestream.LiveGetSegments_Output{ + Segments: make([]placestream.Segment_SegmentView, len(segments)), } for i, segment := range segments { @@ -202,13 +202,13 @@ func (s *Server) handlePlaceStreamLiveGetSegments(ctx context.Context, before st } ltd := &glexrt.LexiconTypeDecoder{Val: record} - output.Segments[i] = &placestream.Segment_SegmentView{ + output.Segments[i] = placestream.Segment_SegmentView{ Record: ltd, Cid: c.String(), } } - return output, nil + return &output, nil } func (s *Server) handlePlaceStreamLiveGetLiveUsers(ctx context.Context, before string, limit int) (*placestream.LiveGetLiveUsers_Output, error) { @@ -271,7 +271,7 @@ func (s *Server) getLiveUsersRanked(ctx context.Context, limit int, userDID stri return nil, echo.NewHTTPError(http.StatusInternalServerError, "Failed to fetch livestreams") } - streams := make([]*placestream.Livestream_LivestreamView, len(ls)) + streams := make([]placestream.Livestream_LivestreamView, len(ls)) for i, l := range ls { stream, err := l.ToLivestreamView() if err != nil { @@ -284,9 +284,9 @@ func (s *Server) getLiveUsersRanked(ctx context.Context, limit int, userDID stri streams[i] = stream } - liveUsers := &placestream.LiveGetLiveUsers_Output{Streams: streams} + liveUsers := placestream.LiveGetLiveUsers_Output{Streams: streams} s.LiveUsersCache.SetDefault(cacheKey, liveUsers) - return liveUsers, nil + return &liveUsers, nil } // getLiveUsersLatest returns live streams ordered by start time (newest first). @@ -313,7 +313,7 @@ func (s *Server) getLiveUsersLatest(ctx context.Context, before string, limit in return nil, echo.NewHTTPError(http.StatusInternalServerError, "Failed to fetch livestreams") } - streams := make([]*placestream.Livestream_LivestreamView, len(ls)) + streams := make([]placestream.Livestream_LivestreamView, len(ls)) for i, l := range ls { stream, err := l.ToLivestreamView() if err != nil { @@ -326,9 +326,9 @@ func (s *Server) getLiveUsersLatest(ctx context.Context, before string, limit in streams[i] = stream } - liveUsers := &placestream.LiveGetLiveUsers_Output{Streams: streams} + liveUsers := placestream.LiveGetLiveUsers_Output{Streams: streams} s.LiveUsersCache.SetDefault(cacheKey, liveUsers) - return liveUsers, nil + return &liveUsers, nil } func (s *Server) handlePlaceStreamLiveSubscribeSegments(c echo.Context) error { @@ -411,9 +411,9 @@ func (s *Server) handlePlaceStreamLiveGetRecommendations(ctx context.Context, us } if len(liveStreamers) > 0 { - var recommendations []*placestream.LiveGetRecommendations_Output_Recommendations_Elem + var recommendations []placestream.LiveGetRecommendations_Output_Recommendations_Elem for _, did := range liveStreamers { - recommendations = append(recommendations, &placestream.LiveGetRecommendations_Output_Recommendations_Elem{ + recommendations = append(recommendations, placestream.LiveGetRecommendations_Output_Recommendations_Elem{ LiveGetRecommendations_LivestreamRecommendation: &placestream.LiveGetRecommendations_LivestreamRecommendation{ Did: did, Source: "streamer", @@ -444,9 +444,9 @@ func (s *Server) handlePlaceStreamLiveGetRecommendations(ctx context.Context, us } if len(liveFollows) > 0 { - var recommendations []*placestream.LiveGetRecommendations_Output_Recommendations_Elem + var recommendations []placestream.LiveGetRecommendations_Output_Recommendations_Elem for _, did := range liveFollows { - recommendations = append(recommendations, &placestream.LiveGetRecommendations_Output_Recommendations_Elem{ + recommendations = append(recommendations, placestream.LiveGetRecommendations_Output_Recommendations_Elem{ LiveGetRecommendations_LivestreamRecommendation: &placestream.LiveGetRecommendations_LivestreamRecommendation{ Did: did, Source: "follows", @@ -467,9 +467,9 @@ func (s *Server) handlePlaceStreamLiveGetRecommendations(ctx context.Context, us if err != nil { return nil, echo.NewHTTPError(http.StatusInternalServerError, "Failed to filter default streamers") } - var recommendations []*placestream.LiveGetRecommendations_Output_Recommendations_Elem + var recommendations []placestream.LiveGetRecommendations_Output_Recommendations_Elem for _, did := range liveDefaults { - recommendations = append(recommendations, &placestream.LiveGetRecommendations_Output_Recommendations_Elem{ + recommendations = append(recommendations, placestream.LiveGetRecommendations_Output_Recommendations_Elem{ LiveGetRecommendations_LivestreamRecommendation: &placestream.LiveGetRecommendations_LivestreamRecommendation{ Did: did, Source: "host", @@ -484,7 +484,7 @@ func (s *Server) handlePlaceStreamLiveGetRecommendations(ctx context.Context, us // No recommendations available return &placestream.LiveGetRecommendations_Output{ - Recommendations: []*placestream.LiveGetRecommendations_Output_Recommendations_Elem{}, + Recommendations: []placestream.LiveGetRecommendations_Output_Recommendations_Elem{}, UserDID: &userDID, }, nil } @@ -570,7 +570,7 @@ func (s *Server) handlePlaceStreamLiveStartLivestream(ctx context.Context, body if err != nil { log.Error(ctx, "failed to upload thumbnail to PDS", "err", err) } else { - thumb = lex.BlobFromLexUtil(uploadOut.Blob) + thumb = &uploadOut.Blob } } livestream.Thumb = thumb @@ -606,19 +606,19 @@ func (s *Server) handlePlaceStreamLiveStartLivestream(ctx context.Context, body linkEnd := linkStart + int64(len(canonicalUrl)) postRecord := appbsky.FeedPost{ - LexiconTypeID: "app.appbsky.feed.post", + LexiconTypeID: "app.bsky.feed.post", Text: postText, CreatedAt: now, Langs: []string{"en"}, - Facets: []*appbsky.RichtextFacet{ + Facets: []appbsky.RichtextFacet{ { Index: appbsky.RichtextFacet_ByteSlice{ ByteStart: linkStart, ByteEnd: linkEnd, }, - Features: []*appbsky.RichtextFacet_Features_Elem{ + Features: []appbsky.RichtextFacet_Features_Elem{ { - RichtextFacet_Link: appbsky.RichtextFacet_Link{ + RichtextFacet_Link: &appbsky.RichtextFacet_Link{ LexiconTypeID: "app.appbsky.richtext.facet#link", Uri: canonicalUrl, }, @@ -626,20 +626,20 @@ func (s *Server) handlePlaceStreamLiveStartLivestream(ctx context.Context, body }, }, }, - Embed: appbsky.FeedPost_Embed{ - EmbedExternal: appbsky.EmbedExternal{ + Embed: &appbsky.FeedPost_Embed{ + EmbedExternal: &appbsky.EmbedExternal{ External: appbsky.EmbedExternal_External{ Title: fmt.Sprintf("@%s is 🔴LIVE on %s!", handle, s.cli.BroadcasterHost), Uri: canonicalUrl, Description: livestream.Title, - Thumb: lex.BlobToLexUtil(livestream.Thumb), + Thumb: livestream.Thumb, }, }, }, } postInput := comatproto.RepoCreateRecord_Input{ - Collection: "app.appbsky.feed.post", + Collection: "app.bsky.feed.post", Record: &glexrt.LexiconTypeDecoder{Val: postRecord}, Repo: session.DID, } diff --git a/pkg/spxrpc/place_stream_live_searchActorsTypeahead.go b/pkg/spxrpc/place_stream_live_searchActorsTypeahead.go index 5d1296b9..8ea301b4 100644 --- a/pkg/spxrpc/place_stream_live_searchActorsTypeahead.go +++ b/pkg/spxrpc/place_stream_live_searchActorsTypeahead.go @@ -5,13 +5,13 @@ import ( "net/http" "github.com/labstack/echo/v4" - placestreamtypes "stream.place/streamplace/pkg/placestream" + placestream "stream.place/streamplace/pkg/placestream" ) -func (s *Server) handlePlaceStreamLiveSearchActorsTypeahead(ctx context.Context, limit int, q string) (*placestreamtypes.LiveSearchActorsTypeahead_Output, error) { +func (s *Server) handlePlaceStreamLiveSearchActorsTypeahead(ctx context.Context, limit int, q string) (*placestream.LiveSearchActorsTypeahead_Output, error) { if q == "" { - return &placestreamtypes.LiveSearchActorsTypeahead_Output{ - Actors: []*placestreamtypes.LiveSearchActorsTypeahead_Actor{}, + return &placestream.LiveSearchActorsTypeahead_Output{ + Actors: []placestream.LiveSearchActorsTypeahead_Actor{}, }, nil } @@ -31,15 +31,15 @@ func (s *Server) handlePlaceStreamLiveSearchActorsTypeahead(ctx context.Context, } // Convert to output format - actors := make([]*placestreamtypes.LiveSearchActorsTypeahead_Actor, len(repos)) + actors := make([]placestream.LiveSearchActorsTypeahead_Actor, len(repos)) for i, repo := range repos { - actors[i] = &placestreamtypes.LiveSearchActorsTypeahead_Actor{ + actors[i] = placestream.LiveSearchActorsTypeahead_Actor{ Did: repo.DID, Handle: repo.Handle, } } - return &placestreamtypes.LiveSearchActorsTypeahead_Output{ + return &placestream.LiveSearchActorsTypeahead_Output{ Actors: actors, }, nil } diff --git a/pkg/spxrpc/place_stream_media.go b/pkg/spxrpc/place_stream_media.go index 6815661b..eb77474f 100644 --- a/pkg/spxrpc/place_stream_media.go +++ b/pkg/spxrpc/place_stream_media.go @@ -90,7 +90,7 @@ func (s *Server) handlePlaceStreamMediaGetUploadStatus(ctx context.Context, uplo return nil, echo.NewHTTPError(http.StatusNotFound, "upload not found") } - out := &placestream.MediaGetUploadStatus_Output{} + out := placestream.MediaGetUploadStatus_Output{} switch upload.ProcessingStatus { case "done": @@ -106,7 +106,7 @@ func (s *Server) handlePlaceStreamMediaGetUploadStatus(ctx context.Context, uplo } if err := json.Unmarshal([]byte(upload.TrackURIs), &refs); err == nil { for _, r := range refs { - out.Tracks = append(out.Tracks, &placestream.MediaGetUploadStatus_TrackRef{ + out.Tracks = append(out.Tracks, placestream.MediaGetUploadStatus_TrackRef{ Uri: r.URI, Cid: r.CID, }) @@ -128,7 +128,7 @@ func (s *Server) handlePlaceStreamMediaGetUploadStatus(ctx context.Context, uplo out.Status = "pending" } - return out, nil + return &out, nil } // requestBaseURL returns the scheme+host of the inbound HTTP request, used diff --git a/pkg/spxrpc/place_stream_media_getvideo.go b/pkg/spxrpc/place_stream_media_getvideo.go index 31f88d91..18428a58 100644 --- a/pkg/spxrpc/place_stream_media_getvideo.go +++ b/pkg/spxrpc/place_stream_media_getvideo.go @@ -27,8 +27,8 @@ func (s *Server) handlePlaceStreamMediaGetVideo(ctx context.Context, uri string) if err != nil { return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error()) } - if view == nil { + if false { return nil, echo.NewHTTPError(http.StatusNotFound, "VideoNotFound") } - return view, nil + return &view, nil } diff --git a/pkg/spxrpc/place_stream_media_getvideolist.go b/pkg/spxrpc/place_stream_media_getvideolist.go index b0cfb819..4f384238 100644 --- a/pkg/spxrpc/place_stream_media_getvideolist.go +++ b/pkg/spxrpc/place_stream_media_getvideolist.go @@ -38,5 +38,5 @@ func (s *Server) handlePlaceStreamMediaGetVideoList(ctx context.Context, cursor if err != nil { return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error()) } - return out, nil + return &out, nil } diff --git a/pkg/spxrpc/place_stream_media_publishvideo.go b/pkg/spxrpc/place_stream_media_publishvideo.go index 586e450f..3ee38963 100644 --- a/pkg/spxrpc/place_stream_media_publishvideo.go +++ b/pkg/spxrpc/place_stream_media_publishvideo.go @@ -24,7 +24,7 @@ func (s *Server) handlePlaceStreamMediaPublishVideo(ctx context.Context, body *p if body.UploadId == "" { return nil, echo.NewHTTPError(http.StatusBadRequest, "uploadId is required") } - if body.Record == nil { + if false { return nil, echo.NewHTTPError(http.StatusBadRequest, "record is required") } if s.playbackStore == nil { diff --git a/pkg/spxrpc/place_stream_moderation.go b/pkg/spxrpc/place_stream_moderation.go index 15e251de..5e25e36b 100644 --- a/pkg/spxrpc/place_stream_moderation.go +++ b/pkg/spxrpc/place_stream_moderation.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "stream.place/streamplace/pkg/appbsky" "github.com/bluesky-social/indigo/atproto/syntax" glexrt "github.com/streamplace/glex/runtime" @@ -134,7 +134,7 @@ func (s *Server) handlePlaceStreamModerationCreateGate(ctx context.Context, inpu } // Create gate record in streamer's repo - gate := &placestream.ChatGate{ + gate := placestream.ChatGate{ HiddenMessage: input.MessageUri, } @@ -259,7 +259,7 @@ func (s *Server) handlePlaceStreamModerationUpdateLivestream(ctx context.Context } // Convert the decoded value to our struct - livestream := &placestream.Livestream{} + livestream := placestream.Livestream{} recordBytes, err := json.Marshal(getOutput.Value.Val) if err != nil { log.Error(ctx, "failed to marshal livestream record", "err", err) @@ -377,7 +377,7 @@ func (s *Server) handlePlaceStreamModerationCreatePin(ctx context.Context, input } // Create the pinned record (old pins persist as history) - pinnedRecord := &placestream.ChatPinnedRecord{ + pinnedRecord := placestream.ChatPinnedRecord{ LexiconTypeID: "place.stream.chat.pinnedRecord", PinnedMessage: input.MessageUri, CreatedAt: time.Now().UTC().Format(time.RFC3339), @@ -475,7 +475,7 @@ func (s *Server) handlePlaceStreamModerationCreateVodGate(ctx context.Context, i } // Create gate record in streamer's repo - gate := &placestream.VodGate{ + gate := placestream.VodGate{ HiddenComment: input.CommentUri, } diff --git a/pkg/spxrpc/place_stream_multistream.go b/pkg/spxrpc/place_stream_multistream.go index bcf2fd9c..f407bd25 100644 --- a/pkg/spxrpc/place_stream_multistream.go +++ b/pkg/spxrpc/place_stream_multistream.go @@ -44,7 +44,7 @@ func (s *Server) handlePlaceStreamMultistreamCreateTarget(ctx context.Context, b return nil, echo.NewHTTPError(http.StatusBadRequest, err.Error()) } - return s.statefulDB.CreateMultistreamTarget(body, session.DID) + return &s.statefulDB.CreateMultistreamTarget(*body, session.DID) } func (s *Server) handlePlaceStreamMultistreamListTargets(ctx context.Context, cursor string, limit int) (*placestreamtypes.MultistreamListTargets_Output, error) { @@ -113,7 +113,7 @@ func (s *Server) handlePlaceStreamMultistreamPutTarget(ctx context.Context, body } uri := fmt.Sprintf("at://%s/place.stream.multistream.target/%s", session.DID, rkey) - return s.statefulDB.UpdateMultistreamTarget(uri, body) + return &s.statefulDB.UpdateMultistreamTarget(uri, *body) } func (s *Server) handlePlaceStreamMultistreamDeleteTarget(ctx context.Context, body *placestreamtypes.MultistreamDeleteTarget_Input) (*placestreamtypes.MultistreamDeleteTarget_Output, error) { ctx, span := otel.Tracer("server").Start(ctx, "handlePlaceStreamMultistreamDeleteTarget") diff --git a/pkg/spxrpc/place_stream_playback_getvideo.go b/pkg/spxrpc/place_stream_playback_getvideo.go index 6948fb4c..392227e5 100644 --- a/pkg/spxrpc/place_stream_playback_getvideo.go +++ b/pkg/spxrpc/place_stream_playback_getvideo.go @@ -402,14 +402,14 @@ func (s *Server) resolveVideoBlob(ctx context.Context, uri string) (*resolvedVid } switch { - case videoRec.Source != nil && videoRec.Source.MediaDefs_SourceTracks != nil: + case videoRec.Source.MediaDefs_SourceTracks != nil && videoRec.Source.MediaDefs_SourceTracks != nil: blobCID, err := s.firstTrackBlob(ctx, videoRec.Source.MediaDefs_SourceTracks) if err != nil { return nil, err } return &resolvedVideo{blobCID: blobCID}, nil - case videoRec.Source != nil && videoRec.Source.MediaDefs_SourceClip != nil: + case videoRec.Source.MediaDefs_SourceTracks != nil && videoRec.Source.MediaDefs_SourceClip != nil: clip := videoRec.Source.MediaDefs_SourceClip if clip.Video == "" { return nil, echo.NewHTTPError(http.StatusUnprocessableEntity, "sourceClip missing parent video URI") @@ -423,7 +423,7 @@ func (s *Server) resolveVideoBlob(ctx context.Context, uri string) (*resolvedVid } // One level only — clip-of-clip is rejected to keep playback // resolution bounded and predictable. - if parentRec.Source == nil || parentRec.Source.MediaDefs_SourceTracks == nil { + if parentRec.Source.MediaDefs_SourceTracks == nil && parentRec.Source.MediaDefs_SourceClip == nil || parentRec.Source.MediaDefs_SourceTracks == nil { return nil, echo.NewHTTPError(http.StatusUnprocessableEntity, "sourceClip's parent video must use sourceTracks (clip-of-clip is not supported)") } @@ -452,10 +452,10 @@ func (s *Server) loadVideoRecord(ctx context.Context, uri string) (*placestream. log.Error(ctx, "playback: GetVideoByURI failed", "uri", uri, "error", err) return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error()) } - if videoRec == nil { + if false { return nil, echo.NewHTTPError(http.StatusNotFound, "VideoNotFound") } - return videoRec, nil + return &videoRec, nil } // firstTrackBlob returns the muxlTrack.blob CID of the first ref in a @@ -466,7 +466,7 @@ func (s *Server) firstTrackBlob(ctx context.Context, src *placestream.MediaDefs_ return "", echo.NewHTTPError(http.StatusUnprocessableEntity, "video record has no tracks") } firstRef := src.Tracks[0] - if firstRef == nil || firstRef.Uri == "" { + if firstRef.Uri == "" || firstRef.Uri == "" { return "", echo.NewHTTPError(http.StatusUnprocessableEntity, "video record's first track ref is empty") } track, err := s.model.GetMediaTrackByURI(ctx, firstRef.Uri) @@ -474,7 +474,7 @@ func (s *Server) firstTrackBlob(ctx context.Context, src *placestream.MediaDefs_ log.Error(ctx, "playback: GetMediaTrackByURI failed", "uri", firstRef.Uri, "error", err) return "", echo.NewHTTPError(http.StatusInternalServerError, err.Error()) } - if track == nil || track.Track == nil || track.Track.MediaDefs_MuxlTrack == nil { + if track.Track.MediaDefs_MuxlTrack == nil || track.Track.MediaDefs_MuxlTrack == nil { return "", echo.NewHTTPError(http.StatusNotFound, "TrackNotFound") } blob := track.Track.MediaDefs_MuxlTrack.Blob diff --git a/pkg/spxrpc/place_stream_playback_getvideo_test.go b/pkg/spxrpc/place_stream_playback_getvideo_test.go index 92ae3eab..6f6865e6 100644 --- a/pkg/spxrpc/place_stream_playback_getvideo_test.go +++ b/pkg/spxrpc/place_stream_playback_getvideo_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "github.com/bluesky-social/indigo/atproto/syntax" "github.com/labstack/echo/v4" "github.com/stretchr/testify/require" @@ -318,10 +318,10 @@ func TestResolveVideoBlob_SourceClip(t *testing.T) { return u } - require.NoError(t, m.UpsertMediaTrack(ctx, &placestream.MediaTrack{ + require.NoError(t, m.UpsertMediaTrack(ctx, placestream.MediaTrack{ LexiconTypeID: "place.stream.media.track", - Track: &placestream.MediaTrack_Track{ - MediaDefs_MuxlTrack: &placestream.MediaDefs_MuxlTrack{ + Track: placestream.MediaTrack_Track{ + MediaDefs_MuxlTrack: placestream.MediaDefs_MuxlTrack{ LexiconTypeID: "place.stream.media.defs#muxlTrack", Blob: parentCID, TrackId: "1", @@ -330,11 +330,11 @@ func TestResolveVideoBlob_SourceClip(t *testing.T) { }, }, parseURI(trackURI))) - parent := &placestream.Video{ + parent := placestream.Video{ LexiconTypeID: "place.stream.video", Title: "parent", - Source: &placestream.Video_Source{ - MediaDefs_SourceTracks: &placestream.MediaDefs_SourceTracks{ + Source: placestream.Video_Source{ + MediaDefs_SourceTracks: placestream.MediaDefs_SourceTracks{ LexiconTypeID: "place.stream.media.defs#sourceTracks", Tracks: []*comatproto.RepoStrongRef{ {Uri: trackURI, Cid: "bafyrefcid"}, @@ -344,11 +344,11 @@ func TestResolveVideoBlob_SourceClip(t *testing.T) { } require.NoError(t, m.UpsertVideo(ctx, parent, parseURI(parentURI))) - clip := &placestream.Video{ + clip := placestream.Video{ LexiconTypeID: "place.stream.video", Title: "5s..10s of parent", - Source: &placestream.Video_Source{ - MediaDefs_SourceClip: &placestream.MediaDefs_SourceClip{ + Source: placestream.Video_Source{ + MediaDefs_SourceClip: placestream.MediaDefs_SourceClip{ LexiconTypeID: "place.stream.media.defs#sourceClip", Video: parentURI, Start: 5_000, @@ -380,11 +380,11 @@ func TestResolveVideoBlob_SourceClip(t *testing.T) { // resolve only follows one hop and demands sourceTracks on // the parent. const nestedURI = "at://did:plc:owner/place.stream.video/nested" - nested := &placestream.Video{ + nested := placestream.Video{ LexiconTypeID: "place.stream.video", Title: "nested clip", - Source: &placestream.Video_Source{ - MediaDefs_SourceClip: &placestream.MediaDefs_SourceClip{ + Source: placestream.Video_Source{ + MediaDefs_SourceClip: placestream.MediaDefs_SourceClip{ LexiconTypeID: "place.stream.media.defs#sourceClip", Video: clipURI, Start: 100, diff --git a/pkg/spxrpc/place_stream_vod.go b/pkg/spxrpc/place_stream_vod.go index aa525540..eeb4fe5a 100644 --- a/pkg/spxrpc/place_stream_vod.go +++ b/pkg/spxrpc/place_stream_vod.go @@ -34,14 +34,14 @@ func (s *Server) handlePlaceStreamVodGetComments(ctx context.Context, cursor str if err != nil { return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error()) } - out := &placestream.VodGetComments_Output{ + out := placestream.VodGetComments_Output{ Comments: comments, } if nextCursor != nil { cs := nextCursor.Format(time.RFC3339Nano) out.Cursor = &cs } - return out, nil + return &out, nil } func (s *Server) handlePlaceStreamGetLikes(ctx context.Context, cursor string, limit int, subject string) (*placestream.GetLikes_Output, error) { @@ -67,7 +67,7 @@ func (s *Server) handlePlaceStreamGetLikes(ctx context.Context, cursor string, l if err != nil { return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error()) } - out := &placestream.GetLikes_Output{ + out := placestream.GetLikes_Output{ Subject: subject, Count: count, Likes: likes, @@ -76,5 +76,5 @@ func (s *Server) handlePlaceStreamGetLikes(ctx context.Context, cursor string, l cs := nextCursor.Format(time.RFC3339Nano) out.Cursor = &cs } - return out, nil + return &out, nil } diff --git a/pkg/spxrpc/place_stream_vod_drafts.go b/pkg/spxrpc/place_stream_vod_drafts.go index 2705e96c..9869c9f6 100644 --- a/pkg/spxrpc/place_stream_vod_drafts.go +++ b/pkg/spxrpc/place_stream_vod_drafts.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "github.com/labstack/echo/v4" "github.com/streamplace/oatproxy/pkg/oatproxy" "stream.place/streamplace/pkg/model" @@ -41,7 +41,7 @@ func (s *Server) loadOwnedDraft(ctx context.Context, uri, did string) (*placestr if err != nil { return nil, echo.NewHTTPError(http.StatusInternalServerError, err.Error()) } - return view, nil + return &view, nil } // handlers ───────────────────────────────────────────────────────────────── @@ -55,7 +55,7 @@ func (s *Server) handlePlaceStreamVodListDrafts(ctx context.Context, cursor stri if err != nil { return nil, echo.NewHTTPError(http.StatusBadRequest, err.Error()) } - views := make([]*placestream.VodDraftDefs_DraftView, 0, len(drafts)) + views := make([]placestream.VodDraftDefs_DraftView, 0, len(drafts)) for _, dv := range drafts { v, err := dv.ToDraftView() if err != nil { @@ -63,12 +63,12 @@ func (s *Server) handlePlaceStreamVodListDrafts(ctx context.Context, cursor stri } views = append(views, v) } - out := &placestream.VodListDrafts_Output{Drafts: views} + out := placestream.VodListDrafts_Output{Drafts: views} if len(drafts) > 0 { c := drafts[len(drafts)-1].CreatedAt.Format(time.RFC3339Nano) out.Cursor = &c } - return out, nil + return &out, nil } func (s *Server) handlePlaceStreamVodGetDraft(ctx context.Context, uri string) (*placestream.VodGetDraft_Output, error) { @@ -80,7 +80,7 @@ func (s *Server) handlePlaceStreamVodGetDraft(ctx context.Context, uri string) ( if err != nil { return nil, err } - return &placestream.VodGetDraft_Output{Draft: owned}, nil + return &placestream.VodGetDraft_Output{Draft: *owned}, nil } func (s *Server) handlePlaceStreamVodUpdateDraft(ctx context.Context, body *placestream.VodUpdateDraft_Input) (*placestream.VodUpdateDraft_Output, error) { @@ -98,7 +98,7 @@ func (s *Server) handlePlaceStreamVodUpdateDraft(ctx context.Context, body *plac // Apply only the editable fields present in the partial input. The server- // authoritative fields (source, durationMs, status, error) are never touched // here — the closure only mutates editable metadata. - updated, err := s.statefulDB.UpdateDraftMetadata(ctx, body.Uri, func(rec *placestream.VodDraftVideo) { + updated, err := s.statefulDB.UpdateDraftMetadata(ctx, body.Uri, func(rec placestream.VodDraftVideo) { if body.Title != nil { rec.Title = *body.Title } @@ -177,7 +177,7 @@ func (s *Server) handlePlaceStreamVodCreateDraft(ctx context.Context, body *plac } else if banned { return nil, echo.NewHTTPError(http.StatusForbidden, "account is not permitted to publish videos") } - dv, err := s.statefulDB.CreateDraft(ctx, session.DID, "", &placestream.VodDraftVideo{ + dv, err := s.statefulDB.CreateDraft(ctx, session.DID, "", placestream.VodDraftVideo{ LexiconTypeID: "place.stream.vod.draftVideo", Title: "Untitled", Status: "processing", @@ -238,7 +238,7 @@ func (s *Server) createLivestreamDraft(ctx context.Context, did, uploadID string if title == "" { title = "Livestream" } - draftRec := &placestream.VodDraftVideo{ + draftRec := placestream.VodDraftVideo{ LexiconTypeID: "place.stream.vod.draftVideo", Title: title, Status: "processing", @@ -253,7 +253,7 @@ func (s *Server) createLivestreamDraft(ctx context.Context, did, uploadID string // Link back to the source livestream so a published VOD carries the // connection (the existing UI uses this to flip a finalized row to // "View VOD"). - draftRec.Connections = []*placestream.VodDraftVideo_Connections_Elem{{ + draftRec.Connections = []placestream.VodDraftVideo_Connections_Elem{{ Video_Connection: &placestream.Video_Connection{ LexiconTypeID: "place.stream.video#connection", Ref: &comatproto.RepoStrongRef{ diff --git a/pkg/spxrpc/spxrpc.go b/pkg/spxrpc/spxrpc.go index 47925031..b0053dd7 100644 --- a/pkg/spxrpc/spxrpc.go +++ b/pkg/spxrpc/spxrpc.go @@ -81,15 +81,7 @@ func NewServer(ctx context.Context, cli *config.CLI, model model.Model, stateful e.Use(echomiddleware.Handler("", mdlw)) e.Use(s.ServiceAuthMiddleware()) e.Use(op.OAuthMiddleware) - err := s.RegisterHandlersPlaceStream(e) - if err != nil { - return nil, err - } - err = s.RegisterHandlersAppBsky(e) - if err != nil { - return nil, err - } - err = s.RegisterHandlersComAtproto(e) + err := s.RegisterHandlersPlacestream(e) if err != nil { return nil, err } @@ -102,7 +94,7 @@ func NewServer(ctx context.Context, cli *config.CLI, model model.Model, stateful // stubs.go hard-codes status 200 + content-type, but we need // 206 Partial Content for HTTP Range on getVideoBlob and the // `application/vnd.apple.mpegurl` MIME for getVideoPlaylist. - // Registering AFTER RegisterHandlersPlaceStream wins because + // Registering AFTER RegisterHandlersPlacestream wins because // echo's last-write-wins for exact-match routes. e.GET("/xrpc/place.stream.playback.getVideoBlob", s.HandleGetVideoBlob) e.GET("/xrpc/place.stream.playback.getVideoPlaylist", s.HandleGetVideoPlaylist) diff --git a/pkg/spxrpc/storage.go b/pkg/spxrpc/storage.go index 3bf6b16d..d2cf1bfd 100644 --- a/pkg/spxrpc/storage.go +++ b/pkg/spxrpc/storage.go @@ -49,7 +49,7 @@ func (s *Server) handlePlaceStreamServerUpsertStorage(ctx context.Context, input url = existing.URL } - storage := statedb.StorageFromLexiconInput(input, session.DID) + storage := statedb.StorageFromLexiconInput(*input, session.DID) storage.URL = url if input.IsActive == nil && existing != nil { storage.IsActive = existing.IsActive @@ -86,7 +86,7 @@ func (s *Server) handlePlaceStreamServerGetStorage(ctx context.Context) (*places } return &placestreamtypes.ServerGetStorage_Output{ - Storage: storage.ToLexicon(), + Storage: &storage.ToLexicon(), }, nil } diff --git a/pkg/spxrpc/stubs.go b/pkg/spxrpc/stubs.go index d97db9b7..18e57cc8 100644 --- a/pkg/spxrpc/stubs.go +++ b/pkg/spxrpc/stubs.go @@ -6,3373 +6,10 @@ import ( "github.com/labstack/echo/v4" "go.opentelemetry.io/otel" - appbsky "stream.place/streamplace/pkg/appbsky" - comatproto "stream.place/streamplace/pkg/comatproto" gamesgamesgamesgamesgames "stream.place/streamplace/pkg/gamesgamesgamesgamesgames" placestream "stream.place/streamplace/pkg/placestream" ) -func (s *Server) RegisterHandlersAppbsky(e *echo.Echo) error { - e.GET("/xrpc/app.bsky.actor.getPreferences", s.HandleAppBskyActorGetPreferences) - e.GET("/xrpc/app.bsky.actor.getProfile", s.HandleAppBskyActorGetProfile) - e.GET("/xrpc/app.bsky.actor.getProfiles", s.HandleAppBskyActorGetProfiles) - e.GET("/xrpc/app.bsky.actor.getSuggestions", s.HandleAppBskyActorGetSuggestions) - e.POST("/xrpc/app.bsky.actor.putPreferences", s.HandleAppBskyActorPutPreferences) - e.GET("/xrpc/app.bsky.actor.searchActors", s.HandleAppBskyActorSearchActors) - e.GET("/xrpc/app.bsky.actor.searchActorsTypeahead", s.HandleAppBskyActorSearchActorsTypeahead) - e.POST("/xrpc/app.bsky.ageassurance.begin", s.HandleAppBskyAgeassuranceBegin) - e.GET("/xrpc/app.bsky.ageassurance.getConfig", s.HandleAppBskyAgeassuranceGetConfig) - e.GET("/xrpc/app.bsky.ageassurance.getState", s.HandleAppBskyAgeassuranceGetState) - e.POST("/xrpc/app.bsky.bookmark.createBookmark", s.HandleAppBskyBookmarkCreateBookmark) - e.POST("/xrpc/app.bsky.bookmark.deleteBookmark", s.HandleAppBskyBookmarkDeleteBookmark) - e.GET("/xrpc/app.bsky.bookmark.getBookmarks", s.HandleAppBskyBookmarkGetBookmarks) - e.GET("/xrpc/app.bsky.feed.describeFeedGenerator", s.HandleAppBskyFeedDescribeFeedGenerator) - e.GET("/xrpc/app.bsky.feed.getActorFeeds", s.HandleAppBskyFeedGetActorFeeds) - e.GET("/xrpc/app.bsky.feed.getActorLikes", s.HandleAppBskyFeedGetActorLikes) - e.GET("/xrpc/app.bsky.feed.getAuthorFeed", s.HandleAppBskyFeedGetAuthorFeed) - e.GET("/xrpc/app.bsky.feed.getFeed", s.HandleAppBskyFeedGetFeed) - e.GET("/xrpc/app.bsky.feed.getFeedGenerator", s.HandleAppBskyFeedGetFeedGenerator) - e.GET("/xrpc/app.bsky.feed.getFeedGenerators", s.HandleAppBskyFeedGetFeedGenerators) - e.GET("/xrpc/app.bsky.feed.getFeedSkeleton", s.HandleAppBskyFeedGetFeedSkeleton) - e.GET("/xrpc/app.bsky.feed.getLikes", s.HandleAppBskyFeedGetLikes) - e.GET("/xrpc/app.bsky.feed.getListFeed", s.HandleAppBskyFeedGetListFeed) - e.GET("/xrpc/app.bsky.feed.getPostThread", s.HandleAppBskyFeedGetPostThread) - e.GET("/xrpc/app.bsky.feed.getPosts", s.HandleAppBskyFeedGetPosts) - e.GET("/xrpc/app.bsky.feed.getQuotes", s.HandleAppBskyFeedGetQuotes) - e.GET("/xrpc/app.bsky.feed.getRepostedBy", s.HandleAppBskyFeedGetRepostedBy) - e.GET("/xrpc/app.bsky.feed.getSuggestedFeeds", s.HandleAppBskyFeedGetSuggestedFeeds) - e.GET("/xrpc/app.bsky.feed.getTimeline", s.HandleAppBskyFeedGetTimeline) - e.GET("/xrpc/app.bsky.feed.searchPosts", s.HandleAppBskyFeedSearchPosts) - e.POST("/xrpc/app.bsky.feed.sendInteractions", s.HandleAppBskyFeedSendInteractions) - e.GET("/xrpc/app.bsky.graph.getActorStarterPacks", s.HandleAppBskyGraphGetActorStarterPacks) - e.GET("/xrpc/app.bsky.graph.getBlocks", s.HandleAppBskyGraphGetBlocks) - e.GET("/xrpc/app.bsky.graph.getFollowers", s.HandleAppBskyGraphGetFollowers) - e.GET("/xrpc/app.bsky.graph.getFollows", s.HandleAppBskyGraphGetFollows) - e.GET("/xrpc/app.bsky.graph.getKnownFollowers", s.HandleAppBskyGraphGetKnownFollowers) - e.GET("/xrpc/app.bsky.graph.getList", s.HandleAppBskyGraphGetList) - e.GET("/xrpc/app.bsky.graph.getListBlocks", s.HandleAppBskyGraphGetListBlocks) - e.GET("/xrpc/app.bsky.graph.getListMutes", s.HandleAppBskyGraphGetListMutes) - e.GET("/xrpc/app.bsky.graph.getLists", s.HandleAppBskyGraphGetLists) - e.GET("/xrpc/app.bsky.graph.getListsWithMembership", s.HandleAppBskyGraphGetListsWithMembership) - e.GET("/xrpc/app.bsky.graph.getMutes", s.HandleAppBskyGraphGetMutes) - e.GET("/xrpc/app.bsky.graph.getRelationships", s.HandleAppBskyGraphGetRelationships) - e.GET("/xrpc/app.bsky.graph.getStarterPack", s.HandleAppBskyGraphGetStarterPack) - e.GET("/xrpc/app.bsky.graph.getStarterPacks", s.HandleAppBskyGraphGetStarterPacks) - e.GET("/xrpc/app.bsky.graph.getStarterPacksWithMembership", s.HandleAppBskyGraphGetStarterPacksWithMembership) - e.GET("/xrpc/app.bsky.graph.getSuggestedFollowsByActor", s.HandleAppBskyGraphGetSuggestedFollowsByActor) - e.POST("/xrpc/app.bsky.graph.muteActor", s.HandleAppBskyGraphMuteActor) - e.POST("/xrpc/app.bsky.graph.muteActorList", s.HandleAppBskyGraphMuteActorList) - e.POST("/xrpc/app.bsky.graph.muteThread", s.HandleAppBskyGraphMuteThread) - e.GET("/xrpc/app.bsky.graph.searchStarterPacks", s.HandleAppBskyGraphSearchStarterPacks) - e.POST("/xrpc/app.bsky.graph.unmuteActor", s.HandleAppBskyGraphUnmuteActor) - e.POST("/xrpc/app.bsky.graph.unmuteActorList", s.HandleAppBskyGraphUnmuteActorList) - e.POST("/xrpc/app.bsky.graph.unmuteThread", s.HandleAppBskyGraphUnmuteThread) - e.GET("/xrpc/app.bsky.labeler.getServices", s.HandleAppBskyLabelerGetServices) - e.GET("/xrpc/app.bsky.notification.getPreferences", s.HandleAppBskyNotificationGetPreferences) - e.GET("/xrpc/app.bsky.notification.getUnreadCount", s.HandleAppBskyNotificationGetUnreadCount) - e.GET("/xrpc/app.bsky.notification.listActivitySubscriptions", s.HandleAppBskyNotificationListActivitySubscriptions) - e.GET("/xrpc/app.bsky.notification.listNotifications", s.HandleAppBskyNotificationListNotifications) - e.POST("/xrpc/app.bsky.notification.putActivitySubscription", s.HandleAppBskyNotificationPutActivitySubscription) - e.POST("/xrpc/app.bsky.notification.putPreferences", s.HandleAppBskyNotificationPutPreferences) - e.POST("/xrpc/app.bsky.notification.putPreferencesV2", s.HandleAppBskyNotificationPutPreferencesV2) - e.POST("/xrpc/app.bsky.notification.registerPush", s.HandleAppBskyNotificationRegisterPush) - e.POST("/xrpc/app.bsky.notification.unregisterPush", s.HandleAppBskyNotificationUnregisterPush) - e.POST("/xrpc/app.bsky.notification.updateSeen", s.HandleAppBskyNotificationUpdateSeen) - e.GET("/xrpc/app.bsky.unspecced.getAgeAssuranceState", s.HandleAppBskyUnspeccedGetAgeAssuranceState) - e.GET("/xrpc/app.bsky.unspecced.getConfig", s.HandleAppBskyUnspeccedGetConfig) - e.GET("/xrpc/app.bsky.unspecced.getOnboardingSuggestedStarterPacks", s.HandleAppBskyUnspeccedGetOnboardingSuggestedStarterPacks) - e.GET("/xrpc/app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton", s.HandleAppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton) - e.GET("/xrpc/app.bsky.unspecced.getPopularFeedGenerators", s.HandleAppBskyUnspeccedGetPopularFeedGenerators) - e.GET("/xrpc/app.bsky.unspecced.getPostThreadOtherV2", s.HandleAppBskyUnspeccedGetPostThreadOtherV2) - e.GET("/xrpc/app.bsky.unspecced.getPostThreadV2", s.HandleAppBskyUnspeccedGetPostThreadV2) - e.GET("/xrpc/app.bsky.unspecced.getSuggestedFeeds", s.HandleAppBskyUnspeccedGetSuggestedFeeds) - e.GET("/xrpc/app.bsky.unspecced.getSuggestedFeedsSkeleton", s.HandleAppBskyUnspeccedGetSuggestedFeedsSkeleton) - e.GET("/xrpc/app.bsky.unspecced.getSuggestedStarterPacks", s.HandleAppBskyUnspeccedGetSuggestedStarterPacks) - e.GET("/xrpc/app.bsky.unspecced.getSuggestedStarterPacksSkeleton", s.HandleAppBskyUnspeccedGetSuggestedStarterPacksSkeleton) - e.GET("/xrpc/app.bsky.unspecced.getSuggestedUsers", s.HandleAppBskyUnspeccedGetSuggestedUsers) - e.GET("/xrpc/app.bsky.unspecced.getSuggestedUsersSkeleton", s.HandleAppBskyUnspeccedGetSuggestedUsersSkeleton) - e.GET("/xrpc/app.bsky.unspecced.getSuggestionsSkeleton", s.HandleAppBskyUnspeccedGetSuggestionsSkeleton) - e.GET("/xrpc/app.bsky.unspecced.getTaggedSuggestions", s.HandleAppBskyUnspeccedGetTaggedSuggestions) - e.GET("/xrpc/app.bsky.unspecced.getTrendingTopics", s.HandleAppBskyUnspeccedGetTrendingTopics) - e.GET("/xrpc/app.bsky.unspecced.getTrends", s.HandleAppBskyUnspeccedGetTrends) - e.GET("/xrpc/app.bsky.unspecced.getTrendsSkeleton", s.HandleAppBskyUnspeccedGetTrendsSkeleton) - e.POST("/xrpc/app.bsky.unspecced.initAgeAssurance", s.HandleAppBskyUnspeccedInitAgeAssurance) - e.GET("/xrpc/app.bsky.unspecced.searchActorsSkeleton", s.HandleAppBskyUnspeccedSearchActorsSkeleton) - e.GET("/xrpc/app.bsky.unspecced.searchPostsSkeleton", s.HandleAppBskyUnspeccedSearchPostsSkeleton) - e.GET("/xrpc/app.bsky.unspecced.searchStarterPacksSkeleton", s.HandleAppBskyUnspeccedSearchStarterPacksSkeleton) - e.GET("/xrpc/app.bsky.video.getJobStatus", s.HandleAppBskyVideoGetJobStatus) - e.GET("/xrpc/app.bsky.video.getUploadLimits", s.HandleAppBskyVideoGetUploadLimits) - e.POST("/xrpc/app.bsky.video.uploadVideo", s.HandleAppBskyVideoUploadVideo) - return nil -} - -func (s *Server) HandleAppBskyActorGetPreferences(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyActorGetPreferences") - defer span.End() - var out *appbsky.ActorGetPreferences_Output - var handleErr error - // func (s *Server) handleAppBskyActorGetPreferences(ctx context.Context) (*appbsky.ActorGetPreferences_Output, error) - out, handleErr = s.handleAppBskyActorGetPreferences(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyActorGetProfile(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyActorGetProfile") - defer span.End() - actor := c.QueryParam("actor") - var out *appbsky.ActorDefs_ProfileViewDetailed - var handleErr error - // func (s *Server) handleAppBskyActorGetProfile(ctx context.Context,actor string) (*appbsky.ActorDefs_ProfileViewDetailed, error) - out, handleErr = s.handleAppBskyActorGetProfile(ctx, actor) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyActorGetProfiles(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyActorGetProfiles") - defer span.End() - actors := c.QueryParams()["actors"] - var out *appbsky.ActorGetProfiles_Output - var handleErr error - // func (s *Server) handleAppBskyActorGetProfiles(ctx context.Context,actors []string) (*appbsky.ActorGetProfiles_Output, error) - out, handleErr = s.handleAppBskyActorGetProfiles(ctx, actors) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyActorGetSuggestions(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyActorGetSuggestions") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.ActorGetSuggestions_Output - var handleErr error - // func (s *Server) handleAppBskyActorGetSuggestions(ctx context.Context,cursor string,limit *int) (*appbsky.ActorGetSuggestions_Output, error) - out, handleErr = s.handleAppBskyActorGetSuggestions(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyActorPutPreferences(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyActorPutPreferences") - defer span.End() - var body appbsky.ActorPutPreferences_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyActorPutPreferences(ctx context.Context,body *appbsky.ActorPutPreferences_Input) error - handleErr = s.handleAppBskyActorPutPreferences(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyActorSearchActors(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyActorSearchActors") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - q := c.QueryParam("q") - term := c.QueryParam("term") - var out *appbsky.ActorSearchActors_Output - var handleErr error - // func (s *Server) handleAppBskyActorSearchActors(ctx context.Context,cursor string,limit *int,q string,term string) (*appbsky.ActorSearchActors_Output, error) - out, handleErr = s.handleAppBskyActorSearchActors(ctx, cursor, limit, q, term) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyActorSearchActorsTypeahead(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyActorSearchActorsTypeahead") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - q := c.QueryParam("q") - term := c.QueryParam("term") - var out *appbsky.ActorSearchActorsTypeahead_Output - var handleErr error - // func (s *Server) handleAppBskyActorSearchActorsTypeahead(ctx context.Context,limit *int,q string,term string) (*appbsky.ActorSearchActorsTypeahead_Output, error) - out, handleErr = s.handleAppBskyActorSearchActorsTypeahead(ctx, limit, q, term) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyAgeassuranceBegin(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyAgeassuranceBegin") - defer span.End() - var body appbsky.AgeassuranceBegin_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *appbsky.AgeassuranceDefs_State - var handleErr error - // func (s *Server) handleAppBskyAgeassuranceBegin(ctx context.Context,body *appbsky.AgeassuranceBegin_Input) (*appbsky.AgeassuranceDefs_State, error) - out, handleErr = s.handleAppBskyAgeassuranceBegin(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyAgeassuranceGetConfig(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyAgeassuranceGetConfig") - defer span.End() - var out *appbsky.AgeassuranceDefs_Config - var handleErr error - // func (s *Server) handleAppBskyAgeassuranceGetConfig(ctx context.Context) (*appbsky.AgeassuranceDefs_Config, error) - out, handleErr = s.handleAppBskyAgeassuranceGetConfig(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyAgeassuranceGetState(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyAgeassuranceGetState") - defer span.End() - countryCode := c.QueryParam("countryCode") - regionCode := c.QueryParam("regionCode") - var out *appbsky.AgeassuranceGetState_Output - var handleErr error - // func (s *Server) handleAppBskyAgeassuranceGetState(ctx context.Context,countryCode string,regionCode string) (*appbsky.AgeassuranceGetState_Output, error) - out, handleErr = s.handleAppBskyAgeassuranceGetState(ctx, countryCode, regionCode) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyBookmarkCreateBookmark(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyBookmarkCreateBookmark") - defer span.End() - var body appbsky.BookmarkCreateBookmark_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyBookmarkCreateBookmark(ctx context.Context,body *appbsky.BookmarkCreateBookmark_Input) error - handleErr = s.handleAppBskyBookmarkCreateBookmark(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyBookmarkDeleteBookmark(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyBookmarkDeleteBookmark") - defer span.End() - var body appbsky.BookmarkDeleteBookmark_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyBookmarkDeleteBookmark(ctx context.Context,body *appbsky.BookmarkDeleteBookmark_Input) error - handleErr = s.handleAppBskyBookmarkDeleteBookmark(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyBookmarkGetBookmarks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyBookmarkGetBookmarks") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.BookmarkGetBookmarks_Output - var handleErr error - // func (s *Server) handleAppBskyBookmarkGetBookmarks(ctx context.Context,cursor string,limit *int) (*appbsky.BookmarkGetBookmarks_Output, error) - out, handleErr = s.handleAppBskyBookmarkGetBookmarks(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedDescribeFeedGenerator(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedDescribeFeedGenerator") - defer span.End() - var out *appbsky.FeedDescribeFeedGenerator_Output - var handleErr error - // func (s *Server) handleAppBskyFeedDescribeFeedGenerator(ctx context.Context) (*appbsky.FeedDescribeFeedGenerator_Output, error) - out, handleErr = s.handleAppBskyFeedDescribeFeedGenerator(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetActorFeeds(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetActorFeeds") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.FeedGetActorFeeds_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetActorFeeds(ctx context.Context,actor string,cursor string,limit *int) (*appbsky.FeedGetActorFeeds_Output, error) - out, handleErr = s.handleAppBskyFeedGetActorFeeds(ctx, actor, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetActorLikes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetActorLikes") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.FeedGetActorLikes_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetActorLikes(ctx context.Context,actor string,cursor string,limit *int) (*appbsky.FeedGetActorLikes_Output, error) - out, handleErr = s.handleAppBskyFeedGetActorLikes(ctx, actor, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetAuthorFeed(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetAuthorFeed") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - filter := c.QueryParam("filter") - var includePins *bool - if p := c.QueryParam("includePins"); p != "" { - includePins_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - includePins = &includePins_val - } - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.FeedGetAuthorFeed_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetAuthorFeed(ctx context.Context,actor string,cursor string,filter string,includePins *bool,limit *int) (*appbsky.FeedGetAuthorFeed_Output, error) - out, handleErr = s.handleAppBskyFeedGetAuthorFeed(ctx, actor, cursor, filter, includePins, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetFeed(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetFeed") - defer span.End() - cursor := c.QueryParam("cursor") - feed := c.QueryParam("feed") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.FeedGetFeed_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetFeed(ctx context.Context,cursor string,feed string,limit *int) (*appbsky.FeedGetFeed_Output, error) - out, handleErr = s.handleAppBskyFeedGetFeed(ctx, cursor, feed, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetFeedGenerator(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetFeedGenerator") - defer span.End() - feed := c.QueryParam("feed") - var out *appbsky.FeedGetFeedGenerator_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetFeedGenerator(ctx context.Context,feed string) (*appbsky.FeedGetFeedGenerator_Output, error) - out, handleErr = s.handleAppBskyFeedGetFeedGenerator(ctx, feed) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetFeedGenerators(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetFeedGenerators") - defer span.End() - feeds := c.QueryParams()["feeds"] - var out *appbsky.FeedGetFeedGenerators_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetFeedGenerators(ctx context.Context,feeds []string) (*appbsky.FeedGetFeedGenerators_Output, error) - out, handleErr = s.handleAppBskyFeedGetFeedGenerators(ctx, feeds) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetFeedSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetFeedSkeleton") - defer span.End() - cursor := c.QueryParam("cursor") - feed := c.QueryParam("feed") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.FeedGetFeedSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetFeedSkeleton(ctx context.Context,cursor string,feed string,limit *int) (*appbsky.FeedGetFeedSkeleton_Output, error) - out, handleErr = s.handleAppBskyFeedGetFeedSkeleton(ctx, cursor, feed, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetLikes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetLikes") - defer span.End() - cid := c.QueryParam("cid") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - uri := c.QueryParam("uri") - var out *appbsky.FeedGetLikes_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetLikes(ctx context.Context,cid string,cursor string,limit *int,uri string) (*appbsky.FeedGetLikes_Output, error) - out, handleErr = s.handleAppBskyFeedGetLikes(ctx, cid, cursor, limit, uri) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetListFeed(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetListFeed") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - list := c.QueryParam("list") - var out *appbsky.FeedGetListFeed_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetListFeed(ctx context.Context,cursor string,limit *int,list string) (*appbsky.FeedGetListFeed_Output, error) - out, handleErr = s.handleAppBskyFeedGetListFeed(ctx, cursor, limit, list) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetPostThread(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetPostThread") - defer span.End() - var depth *int - if p := c.QueryParam("depth"); p != "" { - depth_val, err := strconv.Atoi(p) - if err != nil { - return err - } - depth = &depth_val - } - var parentHeight *int - if p := c.QueryParam("parentHeight"); p != "" { - parentHeight_val, err := strconv.Atoi(p) - if err != nil { - return err - } - parentHeight = &parentHeight_val - } - uri := c.QueryParam("uri") - var out *appbsky.FeedGetPostThread_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetPostThread(ctx context.Context,depth *int,parentHeight *int,uri string) (*appbsky.FeedGetPostThread_Output, error) - out, handleErr = s.handleAppBskyFeedGetPostThread(ctx, depth, parentHeight, uri) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetPosts(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetPosts") - defer span.End() - uris := c.QueryParams()["uris"] - var out *appbsky.FeedGetPosts_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetPosts(ctx context.Context,uris []string) (*appbsky.FeedGetPosts_Output, error) - out, handleErr = s.handleAppBskyFeedGetPosts(ctx, uris) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetQuotes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetQuotes") - defer span.End() - cid := c.QueryParam("cid") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - uri := c.QueryParam("uri") - var out *appbsky.FeedGetQuotes_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetQuotes(ctx context.Context,cid string,cursor string,limit *int,uri string) (*appbsky.FeedGetQuotes_Output, error) - out, handleErr = s.handleAppBskyFeedGetQuotes(ctx, cid, cursor, limit, uri) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetRepostedBy(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetRepostedBy") - defer span.End() - cid := c.QueryParam("cid") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - uri := c.QueryParam("uri") - var out *appbsky.FeedGetRepostedBy_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetRepostedBy(ctx context.Context,cid string,cursor string,limit *int,uri string) (*appbsky.FeedGetRepostedBy_Output, error) - out, handleErr = s.handleAppBskyFeedGetRepostedBy(ctx, cid, cursor, limit, uri) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetSuggestedFeeds(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetSuggestedFeeds") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.FeedGetSuggestedFeeds_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetSuggestedFeeds(ctx context.Context,cursor string,limit *int) (*appbsky.FeedGetSuggestedFeeds_Output, error) - out, handleErr = s.handleAppBskyFeedGetSuggestedFeeds(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedGetTimeline(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedGetTimeline") - defer span.End() - algorithm := c.QueryParam("algorithm") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.FeedGetTimeline_Output - var handleErr error - // func (s *Server) handleAppBskyFeedGetTimeline(ctx context.Context,algorithm string,cursor string,limit *int) (*appbsky.FeedGetTimeline_Output, error) - out, handleErr = s.handleAppBskyFeedGetTimeline(ctx, algorithm, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedSearchPosts(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedSearchPosts") - defer span.End() - author := c.QueryParam("author") - cursor := c.QueryParam("cursor") - domain := c.QueryParam("domain") - lang := c.QueryParam("lang") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - mentions := c.QueryParam("mentions") - q := c.QueryParam("q") - since := c.QueryParam("since") - sort := c.QueryParam("sort") - tag := c.QueryParams()["tag"] - until := c.QueryParam("until") - url := c.QueryParam("url") - var out *appbsky.FeedSearchPosts_Output - var handleErr error - // func (s *Server) handleAppBskyFeedSearchPosts(ctx context.Context,author string,cursor string,domain string,lang string,limit *int,mentions string,q string,since string,sort string,tag []string,until string,url string) (*appbsky.FeedSearchPosts_Output, error) - out, handleErr = s.handleAppBskyFeedSearchPosts(ctx, author, cursor, domain, lang, limit, mentions, q, since, sort, tag, until, url) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyFeedSendInteractions(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyFeedSendInteractions") - defer span.End() - var body appbsky.FeedSendInteractions_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *appbsky.FeedSendInteractions_Output - var handleErr error - // func (s *Server) handleAppBskyFeedSendInteractions(ctx context.Context,body *appbsky.FeedSendInteractions_Input) (*appbsky.FeedSendInteractions_Output, error) - out, handleErr = s.handleAppBskyFeedSendInteractions(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetActorStarterPacks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetActorStarterPacks") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetActorStarterPacks_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetActorStarterPacks(ctx context.Context,actor string,cursor string,limit *int) (*appbsky.GraphGetActorStarterPacks_Output, error) - out, handleErr = s.handleAppBskyGraphGetActorStarterPacks(ctx, actor, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetBlocks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetBlocks") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetBlocks_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetBlocks(ctx context.Context,cursor string,limit *int) (*appbsky.GraphGetBlocks_Output, error) - out, handleErr = s.handleAppBskyGraphGetBlocks(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetFollowers(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetFollowers") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetFollowers_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetFollowers(ctx context.Context,actor string,cursor string,limit *int) (*appbsky.GraphGetFollowers_Output, error) - out, handleErr = s.handleAppBskyGraphGetFollowers(ctx, actor, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetFollows(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetFollows") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetFollows_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetFollows(ctx context.Context,actor string,cursor string,limit *int) (*appbsky.GraphGetFollows_Output, error) - out, handleErr = s.handleAppBskyGraphGetFollows(ctx, actor, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetKnownFollowers(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetKnownFollowers") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetKnownFollowers_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetKnownFollowers(ctx context.Context,actor string,cursor string,limit *int) (*appbsky.GraphGetKnownFollowers_Output, error) - out, handleErr = s.handleAppBskyGraphGetKnownFollowers(ctx, actor, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetList(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetList") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - list := c.QueryParam("list") - var out *appbsky.GraphGetList_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetList(ctx context.Context,cursor string,limit *int,list string) (*appbsky.GraphGetList_Output, error) - out, handleErr = s.handleAppBskyGraphGetList(ctx, cursor, limit, list) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetListBlocks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetListBlocks") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetListBlocks_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetListBlocks(ctx context.Context,cursor string,limit *int) (*appbsky.GraphGetListBlocks_Output, error) - out, handleErr = s.handleAppBskyGraphGetListBlocks(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetListMutes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetListMutes") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetListMutes_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetListMutes(ctx context.Context,cursor string,limit *int) (*appbsky.GraphGetListMutes_Output, error) - out, handleErr = s.handleAppBskyGraphGetListMutes(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetLists(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetLists") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - purposes := c.QueryParams()["purposes"] - var out *appbsky.GraphGetLists_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetLists(ctx context.Context,actor string,cursor string,limit *int,purposes []string) (*appbsky.GraphGetLists_Output, error) - out, handleErr = s.handleAppBskyGraphGetLists(ctx, actor, cursor, limit, purposes) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetListsWithMembership(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetListsWithMembership") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - purposes := c.QueryParams()["purposes"] - var out *appbsky.GraphGetListsWithMembership_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetListsWithMembership(ctx context.Context,actor string,cursor string,limit *int,purposes []string) (*appbsky.GraphGetListsWithMembership_Output, error) - out, handleErr = s.handleAppBskyGraphGetListsWithMembership(ctx, actor, cursor, limit, purposes) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetMutes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetMutes") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetMutes_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetMutes(ctx context.Context,cursor string,limit *int) (*appbsky.GraphGetMutes_Output, error) - out, handleErr = s.handleAppBskyGraphGetMutes(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetRelationships(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetRelationships") - defer span.End() - actor := c.QueryParam("actor") - others := c.QueryParams()["others"] - var out *appbsky.GraphGetRelationships_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetRelationships(ctx context.Context,actor string,others []string) (*appbsky.GraphGetRelationships_Output, error) - out, handleErr = s.handleAppBskyGraphGetRelationships(ctx, actor, others) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetStarterPack(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetStarterPack") - defer span.End() - starterPack := c.QueryParam("starterPack") - var out *appbsky.GraphGetStarterPack_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetStarterPack(ctx context.Context,starterPack string) (*appbsky.GraphGetStarterPack_Output, error) - out, handleErr = s.handleAppBskyGraphGetStarterPack(ctx, starterPack) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetStarterPacks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetStarterPacks") - defer span.End() - uris := c.QueryParams()["uris"] - var out *appbsky.GraphGetStarterPacks_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetStarterPacks(ctx context.Context,uris []string) (*appbsky.GraphGetStarterPacks_Output, error) - out, handleErr = s.handleAppBskyGraphGetStarterPacks(ctx, uris) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetStarterPacksWithMembership(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetStarterPacksWithMembership") - defer span.End() - actor := c.QueryParam("actor") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.GraphGetStarterPacksWithMembership_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetStarterPacksWithMembership(ctx context.Context,actor string,cursor string,limit *int) (*appbsky.GraphGetStarterPacksWithMembership_Output, error) - out, handleErr = s.handleAppBskyGraphGetStarterPacksWithMembership(ctx, actor, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphGetSuggestedFollowsByActor(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphGetSuggestedFollowsByActor") - defer span.End() - actor := c.QueryParam("actor") - var out *appbsky.GraphGetSuggestedFollowsByActor_Output - var handleErr error - // func (s *Server) handleAppBskyGraphGetSuggestedFollowsByActor(ctx context.Context,actor string) (*appbsky.GraphGetSuggestedFollowsByActor_Output, error) - out, handleErr = s.handleAppBskyGraphGetSuggestedFollowsByActor(ctx, actor) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphMuteActor(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphMuteActor") - defer span.End() - var body appbsky.GraphMuteActor_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyGraphMuteActor(ctx context.Context,body *appbsky.GraphMuteActor_Input) error - handleErr = s.handleAppBskyGraphMuteActor(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyGraphMuteActorList(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphMuteActorList") - defer span.End() - var body appbsky.GraphMuteActorList_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyGraphMuteActorList(ctx context.Context,body *appbsky.GraphMuteActorList_Input) error - handleErr = s.handleAppBskyGraphMuteActorList(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyGraphMuteThread(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphMuteThread") - defer span.End() - var body appbsky.GraphMuteThread_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyGraphMuteThread(ctx context.Context,body *appbsky.GraphMuteThread_Input) error - handleErr = s.handleAppBskyGraphMuteThread(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyGraphSearchStarterPacks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphSearchStarterPacks") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - q := c.QueryParam("q") - var out *appbsky.GraphSearchStarterPacks_Output - var handleErr error - // func (s *Server) handleAppBskyGraphSearchStarterPacks(ctx context.Context,cursor string,limit *int,q string) (*appbsky.GraphSearchStarterPacks_Output, error) - out, handleErr = s.handleAppBskyGraphSearchStarterPacks(ctx, cursor, limit, q) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyGraphUnmuteActor(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphUnmuteActor") - defer span.End() - var body appbsky.GraphUnmuteActor_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyGraphUnmuteActor(ctx context.Context,body *appbsky.GraphUnmuteActor_Input) error - handleErr = s.handleAppBskyGraphUnmuteActor(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyGraphUnmuteActorList(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphUnmuteActorList") - defer span.End() - var body appbsky.GraphUnmuteActorList_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyGraphUnmuteActorList(ctx context.Context,body *appbsky.GraphUnmuteActorList_Input) error - handleErr = s.handleAppBskyGraphUnmuteActorList(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyGraphUnmuteThread(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyGraphUnmuteThread") - defer span.End() - var body appbsky.GraphUnmuteThread_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyGraphUnmuteThread(ctx context.Context,body *appbsky.GraphUnmuteThread_Input) error - handleErr = s.handleAppBskyGraphUnmuteThread(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyLabelerGetServices(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyLabelerGetServices") - defer span.End() - var detailed *bool - if p := c.QueryParam("detailed"); p != "" { - detailed_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - detailed = &detailed_val - } - dids := c.QueryParams()["dids"] - var out *appbsky.LabelerGetServices_Output - var handleErr error - // func (s *Server) handleAppBskyLabelerGetServices(ctx context.Context,detailed *bool,dids []string) (*appbsky.LabelerGetServices_Output, error) - out, handleErr = s.handleAppBskyLabelerGetServices(ctx, detailed, dids) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyNotificationGetPreferences(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationGetPreferences") - defer span.End() - var out *appbsky.NotificationGetPreferences_Output - var handleErr error - // func (s *Server) handleAppBskyNotificationGetPreferences(ctx context.Context) (*appbsky.NotificationGetPreferences_Output, error) - out, handleErr = s.handleAppBskyNotificationGetPreferences(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyNotificationGetUnreadCount(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationGetUnreadCount") - defer span.End() - var priority *bool - if p := c.QueryParam("priority"); p != "" { - priority_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - priority = &priority_val - } - seenAt := c.QueryParam("seenAt") - var out *appbsky.NotificationGetUnreadCount_Output - var handleErr error - // func (s *Server) handleAppBskyNotificationGetUnreadCount(ctx context.Context,priority *bool,seenAt string) (*appbsky.NotificationGetUnreadCount_Output, error) - out, handleErr = s.handleAppBskyNotificationGetUnreadCount(ctx, priority, seenAt) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyNotificationListActivitySubscriptions(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationListActivitySubscriptions") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.NotificationListActivitySubscriptions_Output - var handleErr error - // func (s *Server) handleAppBskyNotificationListActivitySubscriptions(ctx context.Context,cursor string,limit *int) (*appbsky.NotificationListActivitySubscriptions_Output, error) - out, handleErr = s.handleAppBskyNotificationListActivitySubscriptions(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyNotificationListNotifications(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationListNotifications") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var priority *bool - if p := c.QueryParam("priority"); p != "" { - priority_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - priority = &priority_val - } - reasons := c.QueryParams()["reasons"] - seenAt := c.QueryParam("seenAt") - var out *appbsky.NotificationListNotifications_Output - var handleErr error - // func (s *Server) handleAppBskyNotificationListNotifications(ctx context.Context,cursor string,limit *int,priority *bool,reasons []string,seenAt string) (*appbsky.NotificationListNotifications_Output, error) - out, handleErr = s.handleAppBskyNotificationListNotifications(ctx, cursor, limit, priority, reasons, seenAt) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyNotificationPutActivitySubscription(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationPutActivitySubscription") - defer span.End() - var body appbsky.NotificationPutActivitySubscription_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *appbsky.NotificationPutActivitySubscription_Output - var handleErr error - // func (s *Server) handleAppBskyNotificationPutActivitySubscription(ctx context.Context,body *appbsky.NotificationPutActivitySubscription_Input) (*appbsky.NotificationPutActivitySubscription_Output, error) - out, handleErr = s.handleAppBskyNotificationPutActivitySubscription(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyNotificationPutPreferences(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationPutPreferences") - defer span.End() - var body appbsky.NotificationPutPreferences_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyNotificationPutPreferences(ctx context.Context,body *appbsky.NotificationPutPreferences_Input) error - handleErr = s.handleAppBskyNotificationPutPreferences(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyNotificationPutPreferencesV2(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationPutPreferencesV2") - defer span.End() - var body appbsky.NotificationPutPreferencesV2_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *appbsky.NotificationPutPreferencesV2_Output - var handleErr error - // func (s *Server) handleAppBskyNotificationPutPreferencesV2(ctx context.Context,body *appbsky.NotificationPutPreferencesV2_Input) (*appbsky.NotificationPutPreferencesV2_Output, error) - out, handleErr = s.handleAppBskyNotificationPutPreferencesV2(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyNotificationRegisterPush(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationRegisterPush") - defer span.End() - var body appbsky.NotificationRegisterPush_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyNotificationRegisterPush(ctx context.Context,body *appbsky.NotificationRegisterPush_Input) error - handleErr = s.handleAppBskyNotificationRegisterPush(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyNotificationUnregisterPush(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationUnregisterPush") - defer span.End() - var body appbsky.NotificationUnregisterPush_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyNotificationUnregisterPush(ctx context.Context,body *appbsky.NotificationUnregisterPush_Input) error - handleErr = s.handleAppBskyNotificationUnregisterPush(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyNotificationUpdateSeen(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyNotificationUpdateSeen") - defer span.End() - var body appbsky.NotificationUpdateSeen_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleAppBskyNotificationUpdateSeen(ctx context.Context,body *appbsky.NotificationUpdateSeen_Input) error - handleErr = s.handleAppBskyNotificationUpdateSeen(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleAppBskyUnspeccedGetAgeAssuranceState(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetAgeAssuranceState") - defer span.End() - var out *appbsky.UnspeccedDefs_AgeAssuranceState - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetAgeAssuranceState(ctx context.Context) (*appbsky.UnspeccedDefs_AgeAssuranceState, error) - out, handleErr = s.handleAppBskyUnspeccedGetAgeAssuranceState(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetConfig(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetConfig") - defer span.End() - var out *appbsky.UnspeccedGetConfig_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetConfig(ctx context.Context) (*appbsky.UnspeccedGetConfig_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetConfig(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetOnboardingSuggestedStarterPacks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetOnboardingSuggestedStarterPacks") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.UnspeccedGetOnboardingSuggestedStarterPacks_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetOnboardingSuggestedStarterPacks(ctx context.Context,limit *int) (*appbsky.UnspeccedGetOnboardingSuggestedStarterPacks_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetOnboardingSuggestedStarterPacks(ctx, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton(ctx context.Context,limit *int,viewer string) (*appbsky.UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton(ctx, limit, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetPopularFeedGenerators(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetPopularFeedGenerators") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - query := c.QueryParam("query") - var out *appbsky.UnspeccedGetPopularFeedGenerators_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetPopularFeedGenerators(ctx context.Context,cursor string,limit *int,query string) (*appbsky.UnspeccedGetPopularFeedGenerators_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetPopularFeedGenerators(ctx, cursor, limit, query) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetPostThreadOtherV2(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetPostThreadOtherV2") - defer span.End() - anchor := c.QueryParam("anchor") - var out *appbsky.UnspeccedGetPostThreadOtherV2_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetPostThreadOtherV2(ctx context.Context,anchor string) (*appbsky.UnspeccedGetPostThreadOtherV2_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetPostThreadOtherV2(ctx, anchor) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetPostThreadV2(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetPostThreadV2") - defer span.End() - var above *bool - if p := c.QueryParam("above"); p != "" { - above_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - above = &above_val - } - anchor := c.QueryParam("anchor") - var below *int - if p := c.QueryParam("below"); p != "" { - below_val, err := strconv.Atoi(p) - if err != nil { - return err - } - below = &below_val - } - var branchingFactor *int - if p := c.QueryParam("branchingFactor"); p != "" { - branchingFactor_val, err := strconv.Atoi(p) - if err != nil { - return err - } - branchingFactor = &branchingFactor_val - } - sort := c.QueryParam("sort") - var out *appbsky.UnspeccedGetPostThreadV2_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetPostThreadV2(ctx context.Context,above *bool,anchor string,below *int,branchingFactor *int,sort string) (*appbsky.UnspeccedGetPostThreadV2_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetPostThreadV2(ctx, above, anchor, below, branchingFactor, sort) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetSuggestedFeeds(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetSuggestedFeeds") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.UnspeccedGetSuggestedFeeds_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetSuggestedFeeds(ctx context.Context,limit *int) (*appbsky.UnspeccedGetSuggestedFeeds_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetSuggestedFeeds(ctx, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetSuggestedFeedsSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetSuggestedFeedsSkeleton") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedGetSuggestedFeedsSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetSuggestedFeedsSkeleton(ctx context.Context,limit *int,viewer string) (*appbsky.UnspeccedGetSuggestedFeedsSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetSuggestedFeedsSkeleton(ctx, limit, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetSuggestedStarterPacks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetSuggestedStarterPacks") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.UnspeccedGetSuggestedStarterPacks_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetSuggestedStarterPacks(ctx context.Context,limit *int) (*appbsky.UnspeccedGetSuggestedStarterPacks_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetSuggestedStarterPacks(ctx, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetSuggestedStarterPacksSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetSuggestedStarterPacksSkeleton") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedGetSuggestedStarterPacksSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetSuggestedStarterPacksSkeleton(ctx context.Context,limit *int,viewer string) (*appbsky.UnspeccedGetSuggestedStarterPacksSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetSuggestedStarterPacksSkeleton(ctx, limit, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetSuggestedUsers(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetSuggestedUsers") - defer span.End() - category := c.QueryParam("category") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.UnspeccedGetSuggestedUsers_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetSuggestedUsers(ctx context.Context,category string,limit *int) (*appbsky.UnspeccedGetSuggestedUsers_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetSuggestedUsers(ctx, category, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetSuggestedUsersSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetSuggestedUsersSkeleton") - defer span.End() - category := c.QueryParam("category") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedGetSuggestedUsersSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetSuggestedUsersSkeleton(ctx context.Context,category string,limit *int,viewer string) (*appbsky.UnspeccedGetSuggestedUsersSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetSuggestedUsersSkeleton(ctx, category, limit, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetSuggestionsSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetSuggestionsSkeleton") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - relativeToDid := c.QueryParam("relativeToDid") - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedGetSuggestionsSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetSuggestionsSkeleton(ctx context.Context,cursor string,limit *int,relativeToDid string,viewer string) (*appbsky.UnspeccedGetSuggestionsSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetSuggestionsSkeleton(ctx, cursor, limit, relativeToDid, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetTaggedSuggestions(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetTaggedSuggestions") - defer span.End() - var out *appbsky.UnspeccedGetTaggedSuggestions_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetTaggedSuggestions(ctx context.Context) (*appbsky.UnspeccedGetTaggedSuggestions_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetTaggedSuggestions(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetTrendingTopics(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetTrendingTopics") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedGetTrendingTopics_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetTrendingTopics(ctx context.Context,limit *int,viewer string) (*appbsky.UnspeccedGetTrendingTopics_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetTrendingTopics(ctx, limit, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetTrends(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetTrends") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *appbsky.UnspeccedGetTrends_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetTrends(ctx context.Context,limit *int) (*appbsky.UnspeccedGetTrends_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetTrends(ctx, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedGetTrendsSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedGetTrendsSkeleton") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedGetTrendsSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedGetTrendsSkeleton(ctx context.Context,limit *int,viewer string) (*appbsky.UnspeccedGetTrendsSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedGetTrendsSkeleton(ctx, limit, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedInitAgeAssurance(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedInitAgeAssurance") - defer span.End() - var body appbsky.UnspeccedInitAgeAssurance_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *appbsky.UnspeccedDefs_AgeAssuranceState - var handleErr error - // func (s *Server) handleAppBskyUnspeccedInitAgeAssurance(ctx context.Context,body *appbsky.UnspeccedInitAgeAssurance_Input) (*appbsky.UnspeccedDefs_AgeAssuranceState, error) - out, handleErr = s.handleAppBskyUnspeccedInitAgeAssurance(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedSearchActorsSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedSearchActorsSkeleton") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - q := c.QueryParam("q") - var typeahead *bool - if p := c.QueryParam("typeahead"); p != "" { - typeahead_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - typeahead = &typeahead_val - } - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedSearchActorsSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedSearchActorsSkeleton(ctx context.Context,cursor string,limit *int,q string,typeahead *bool,viewer string) (*appbsky.UnspeccedSearchActorsSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedSearchActorsSkeleton(ctx, cursor, limit, q, typeahead, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedSearchPostsSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedSearchPostsSkeleton") - defer span.End() - author := c.QueryParam("author") - cursor := c.QueryParam("cursor") - domain := c.QueryParam("domain") - lang := c.QueryParam("lang") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - mentions := c.QueryParam("mentions") - q := c.QueryParam("q") - since := c.QueryParam("since") - sort := c.QueryParam("sort") - tag := c.QueryParams()["tag"] - until := c.QueryParam("until") - url := c.QueryParam("url") - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedSearchPostsSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedSearchPostsSkeleton(ctx context.Context,author string,cursor string,domain string,lang string,limit *int,mentions string,q string,since string,sort string,tag []string,until string,url string,viewer string) (*appbsky.UnspeccedSearchPostsSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedSearchPostsSkeleton(ctx, author, cursor, domain, lang, limit, mentions, q, since, sort, tag, until, url, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyUnspeccedSearchStarterPacksSkeleton(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyUnspeccedSearchStarterPacksSkeleton") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - q := c.QueryParam("q") - viewer := c.QueryParam("viewer") - var out *appbsky.UnspeccedSearchStarterPacksSkeleton_Output - var handleErr error - // func (s *Server) handleAppBskyUnspeccedSearchStarterPacksSkeleton(ctx context.Context,cursor string,limit *int,q string,viewer string) (*appbsky.UnspeccedSearchStarterPacksSkeleton_Output, error) - out, handleErr = s.handleAppBskyUnspeccedSearchStarterPacksSkeleton(ctx, cursor, limit, q, viewer) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyVideoGetJobStatus(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyVideoGetJobStatus") - defer span.End() - jobId := c.QueryParam("jobId") - var out *appbsky.VideoGetJobStatus_Output - var handleErr error - // func (s *Server) handleAppBskyVideoGetJobStatus(ctx context.Context,jobId string) (*appbsky.VideoGetJobStatus_Output, error) - out, handleErr = s.handleAppBskyVideoGetJobStatus(ctx, jobId) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyVideoGetUploadLimits(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyVideoGetUploadLimits") - defer span.End() - var out *appbsky.VideoGetUploadLimits_Output - var handleErr error - // func (s *Server) handleAppBskyVideoGetUploadLimits(ctx context.Context) (*appbsky.VideoGetUploadLimits_Output, error) - out, handleErr = s.handleAppBskyVideoGetUploadLimits(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleAppBskyVideoUploadVideo(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleAppBskyVideoUploadVideo") - defer span.End() - body := c.Request().Body - var out *appbsky.VideoUploadVideo_Output - var handleErr error - // func (s *Server) handleAppBskyVideoUploadVideo(ctx context.Context,r io.Reader) (*appbsky.VideoUploadVideo_Output, error) - out, handleErr = s.handleAppBskyVideoUploadVideo(ctx, body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) RegisterHandlersComatproto(e *echo.Echo) error { - e.POST("/xrpc/com.atproto.admin.deleteAccount", s.HandleComAtprotoAdminDeleteAccount) - e.POST("/xrpc/com.atproto.admin.disableAccountInvites", s.HandleComAtprotoAdminDisableAccountInvites) - e.POST("/xrpc/com.atproto.admin.disableInviteCodes", s.HandleComAtprotoAdminDisableInviteCodes) - e.POST("/xrpc/com.atproto.admin.enableAccountInvites", s.HandleComAtprotoAdminEnableAccountInvites) - e.GET("/xrpc/com.atproto.admin.getAccountInfo", s.HandleComAtprotoAdminGetAccountInfo) - e.GET("/xrpc/com.atproto.admin.getAccountInfos", s.HandleComAtprotoAdminGetAccountInfos) - e.GET("/xrpc/com.atproto.admin.getInviteCodes", s.HandleComAtprotoAdminGetInviteCodes) - e.GET("/xrpc/com.atproto.admin.getSubjectStatus", s.HandleComAtprotoAdminGetSubjectStatus) - e.GET("/xrpc/com.atproto.admin.searchAccounts", s.HandleComAtprotoAdminSearchAccounts) - e.POST("/xrpc/com.atproto.admin.sendEmail", s.HandleComAtprotoAdminSendEmail) - e.POST("/xrpc/com.atproto.admin.updateAccountEmail", s.HandleComAtprotoAdminUpdateAccountEmail) - e.POST("/xrpc/com.atproto.admin.updateAccountHandle", s.HandleComAtprotoAdminUpdateAccountHandle) - e.POST("/xrpc/com.atproto.admin.updateAccountPassword", s.HandleComAtprotoAdminUpdateAccountPassword) - e.POST("/xrpc/com.atproto.admin.updateAccountSigningKey", s.HandleComAtprotoAdminUpdateAccountSigningKey) - e.POST("/xrpc/com.atproto.admin.updateSubjectStatus", s.HandleComAtprotoAdminUpdateSubjectStatus) - e.GET("/xrpc/com.atproto.identity.getRecommendedDidCredentials", s.HandleComAtprotoIdentityGetRecommendedDidCredentials) - e.POST("/xrpc/com.atproto.identity.refreshIdentity", s.HandleComAtprotoIdentityRefreshIdentity) - e.POST("/xrpc/com.atproto.identity.requestPlcOperationSignature", s.HandleComAtprotoIdentityRequestPlcOperationSignature) - e.GET("/xrpc/com.atproto.identity.resolveDid", s.HandleComAtprotoIdentityResolveDid) - e.GET("/xrpc/com.atproto.identity.resolveHandle", s.HandleComAtprotoIdentityResolveHandle) - e.GET("/xrpc/com.atproto.identity.resolveIdentity", s.HandleComAtprotoIdentityResolveIdentity) - e.POST("/xrpc/com.atproto.identity.signPlcOperation", s.HandleComAtprotoIdentitySignPlcOperation) - e.POST("/xrpc/com.atproto.identity.submitPlcOperation", s.HandleComAtprotoIdentitySubmitPlcOperation) - e.POST("/xrpc/com.atproto.identity.updateHandle", s.HandleComAtprotoIdentityUpdateHandle) - e.GET("/xrpc/com.atproto.label.queryLabels", s.HandleComAtprotoLabelQueryLabels) - e.POST("/xrpc/com.atproto.moderation.createReport", s.HandleComAtprotoModerationCreateReport) - e.POST("/xrpc/com.atproto.repo.applyWrites", s.HandleComAtprotoRepoApplyWrites) - e.POST("/xrpc/com.atproto.repo.createRecord", s.HandleComAtprotoRepoCreateRecord) - e.POST("/xrpc/com.atproto.repo.deleteRecord", s.HandleComAtprotoRepoDeleteRecord) - e.GET("/xrpc/com.atproto.repo.describeRepo", s.HandleComAtprotoRepoDescribeRepo) - e.GET("/xrpc/com.atproto.repo.getRecord", s.HandleComAtprotoRepoGetRecord) - e.POST("/xrpc/com.atproto.repo.importRepo", s.HandleComAtprotoRepoImportRepo) - e.GET("/xrpc/com.atproto.repo.listMissingBlobs", s.HandleComAtprotoRepoListMissingBlobs) - e.GET("/xrpc/com.atproto.repo.listRecords", s.HandleComAtprotoRepoListRecords) - e.POST("/xrpc/com.atproto.repo.putRecord", s.HandleComAtprotoRepoPutRecord) - e.POST("/xrpc/com.atproto.repo.uploadBlob", s.HandleComAtprotoRepoUploadBlob) - e.POST("/xrpc/com.atproto.server.activateAccount", s.HandleComAtprotoServerActivateAccount) - e.GET("/xrpc/com.atproto.server.checkAccountStatus", s.HandleComAtprotoServerCheckAccountStatus) - e.POST("/xrpc/com.atproto.server.confirmEmail", s.HandleComAtprotoServerConfirmEmail) - e.POST("/xrpc/com.atproto.server.createAccount", s.HandleComAtprotoServerCreateAccount) - e.POST("/xrpc/com.atproto.server.createAppPassword", s.HandleComAtprotoServerCreateAppPassword) - e.POST("/xrpc/com.atproto.server.createInviteCode", s.HandleComAtprotoServerCreateInviteCode) - e.POST("/xrpc/com.atproto.server.createInviteCodes", s.HandleComAtprotoServerCreateInviteCodes) - e.POST("/xrpc/com.atproto.server.createSession", s.HandleComAtprotoServerCreateSession) - e.POST("/xrpc/com.atproto.server.deactivateAccount", s.HandleComAtprotoServerDeactivateAccount) - e.POST("/xrpc/com.atproto.server.deleteAccount", s.HandleComAtprotoServerDeleteAccount) - e.POST("/xrpc/com.atproto.server.deleteSession", s.HandleComAtprotoServerDeleteSession) - e.GET("/xrpc/com.atproto.server.describeServer", s.HandleComAtprotoServerDescribeServer) - e.GET("/xrpc/com.atproto.server.getAccountInviteCodes", s.HandleComAtprotoServerGetAccountInviteCodes) - e.GET("/xrpc/com.atproto.server.getServiceAuth", s.HandleComAtprotoServerGetServiceAuth) - e.GET("/xrpc/com.atproto.server.getSession", s.HandleComAtprotoServerGetSession) - e.GET("/xrpc/com.atproto.server.listAppPasswords", s.HandleComAtprotoServerListAppPasswords) - e.POST("/xrpc/com.atproto.server.refreshSession", s.HandleComAtprotoServerRefreshSession) - e.POST("/xrpc/com.atproto.server.requestAccountDelete", s.HandleComAtprotoServerRequestAccountDelete) - e.POST("/xrpc/com.atproto.server.requestEmailConfirmation", s.HandleComAtprotoServerRequestEmailConfirmation) - e.POST("/xrpc/com.atproto.server.requestEmailUpdate", s.HandleComAtprotoServerRequestEmailUpdate) - e.POST("/xrpc/com.atproto.server.requestPasswordReset", s.HandleComAtprotoServerRequestPasswordReset) - e.POST("/xrpc/com.atproto.server.reserveSigningKey", s.HandleComAtprotoServerReserveSigningKey) - e.POST("/xrpc/com.atproto.server.resetPassword", s.HandleComAtprotoServerResetPassword) - e.POST("/xrpc/com.atproto.server.revokeAppPassword", s.HandleComAtprotoServerRevokeAppPassword) - e.POST("/xrpc/com.atproto.server.updateEmail", s.HandleComAtprotoServerUpdateEmail) - e.GET("/xrpc/com.atproto.sync.getBlob", s.HandleComAtprotoSyncGetBlob) - e.GET("/xrpc/com.atproto.sync.getBlocks", s.HandleComAtprotoSyncGetBlocks) - e.GET("/xrpc/com.atproto.sync.getCheckout", s.HandleComAtprotoSyncGetCheckout) - e.GET("/xrpc/com.atproto.sync.getHead", s.HandleComAtprotoSyncGetHead) - e.GET("/xrpc/com.atproto.sync.getHostStatus", s.HandleComAtprotoSyncGetHostStatus) - e.GET("/xrpc/com.atproto.sync.getLatestCommit", s.HandleComAtprotoSyncGetLatestCommit) - e.GET("/xrpc/com.atproto.sync.getRecord", s.HandleComAtprotoSyncGetRecord) - e.GET("/xrpc/com.atproto.sync.getRepo", s.HandleComAtprotoSyncGetRepo) - e.GET("/xrpc/com.atproto.sync.getRepoStatus", s.HandleComAtprotoSyncGetRepoStatus) - e.GET("/xrpc/com.atproto.sync.listBlobs", s.HandleComAtprotoSyncListBlobs) - e.GET("/xrpc/com.atproto.sync.listHosts", s.HandleComAtprotoSyncListHosts) - e.GET("/xrpc/com.atproto.sync.listRepos", s.HandleComAtprotoSyncListRepos) - e.GET("/xrpc/com.atproto.sync.listReposByCollection", s.HandleComAtprotoSyncListReposByCollection) - e.POST("/xrpc/com.atproto.sync.notifyOfUpdate", s.HandleComAtprotoSyncNotifyOfUpdate) - e.POST("/xrpc/com.atproto.sync.requestCrawl", s.HandleComAtprotoSyncRequestCrawl) - e.POST("/xrpc/com.atproto.temp.addReservedHandle", s.HandleComAtprotoTempAddReservedHandle) - e.GET("/xrpc/com.atproto.temp.checkHandleAvailability", s.HandleComAtprotoTempCheckHandleAvailability) - e.GET("/xrpc/com.atproto.temp.checkSignupQueue", s.HandleComAtprotoTempCheckSignupQueue) - e.GET("/xrpc/com.atproto.temp.dereferenceScope", s.HandleComAtprotoTempDereferenceScope) - e.GET("/xrpc/com.atproto.temp.fetchLabels", s.HandleComAtprotoTempFetchLabels) - e.POST("/xrpc/com.atproto.temp.requestPhoneVerification", s.HandleComAtprotoTempRequestPhoneVerification) - e.POST("/xrpc/com.atproto.temp.revokeAccountCredentials", s.HandleComAtprotoTempRevokeAccountCredentials) - return nil -} - -func (s *Server) HandleComAtprotoAdminDeleteAccount(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminDeleteAccount") - defer span.End() - var body comatproto.AdminDeleteAccount_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminDeleteAccount(ctx context.Context,body *comatproto.AdminDeleteAccount_Input) error - handleErr = s.handleComAtprotoAdminDeleteAccount(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminDisableAccountInvites(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminDisableAccountInvites") - defer span.End() - var body comatproto.AdminDisableAccountInvites_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminDisableAccountInvites(ctx context.Context,body *comatproto.AdminDisableAccountInvites_Input) error - handleErr = s.handleComAtprotoAdminDisableAccountInvites(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminDisableInviteCodes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminDisableInviteCodes") - defer span.End() - var body comatproto.AdminDisableInviteCodes_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminDisableInviteCodes(ctx context.Context,body *comatproto.AdminDisableInviteCodes_Input) error - handleErr = s.handleComAtprotoAdminDisableInviteCodes(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminEnableAccountInvites(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminEnableAccountInvites") - defer span.End() - var body comatproto.AdminEnableAccountInvites_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminEnableAccountInvites(ctx context.Context,body *comatproto.AdminEnableAccountInvites_Input) error - handleErr = s.handleComAtprotoAdminEnableAccountInvites(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminGetAccountInfo(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminGetAccountInfo") - defer span.End() - did := c.QueryParam("did") - var out *comatproto.AdminDefs_AccountView - var handleErr error - // func (s *Server) handleComAtprotoAdminGetAccountInfo(ctx context.Context,did string) (*comatproto.AdminDefs_AccountView, error) - out, handleErr = s.handleComAtprotoAdminGetAccountInfo(ctx, did) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoAdminGetAccountInfos(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminGetAccountInfos") - defer span.End() - dids := c.QueryParams()["dids"] - var out *comatproto.AdminGetAccountInfos_Output - var handleErr error - // func (s *Server) handleComAtprotoAdminGetAccountInfos(ctx context.Context,dids []string) (*comatproto.AdminGetAccountInfos_Output, error) - out, handleErr = s.handleComAtprotoAdminGetAccountInfos(ctx, dids) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoAdminGetInviteCodes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminGetInviteCodes") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - sort := c.QueryParam("sort") - var out *comatproto.AdminGetInviteCodes_Output - var handleErr error - // func (s *Server) handleComAtprotoAdminGetInviteCodes(ctx context.Context,cursor string,limit *int,sort string) (*comatproto.AdminGetInviteCodes_Output, error) - out, handleErr = s.handleComAtprotoAdminGetInviteCodes(ctx, cursor, limit, sort) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoAdminGetSubjectStatus(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminGetSubjectStatus") - defer span.End() - blob := c.QueryParam("blob") - did := c.QueryParam("did") - uri := c.QueryParam("uri") - var out *comatproto.AdminGetSubjectStatus_Output - var handleErr error - // func (s *Server) handleComAtprotoAdminGetSubjectStatus(ctx context.Context,blob string,did string,uri string) (*comatproto.AdminGetSubjectStatus_Output, error) - out, handleErr = s.handleComAtprotoAdminGetSubjectStatus(ctx, blob, did, uri) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoAdminSearchAccounts(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminSearchAccounts") - defer span.End() - cursor := c.QueryParam("cursor") - email := c.QueryParam("email") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *comatproto.AdminSearchAccounts_Output - var handleErr error - // func (s *Server) handleComAtprotoAdminSearchAccounts(ctx context.Context,cursor string,email string,limit *int) (*comatproto.AdminSearchAccounts_Output, error) - out, handleErr = s.handleComAtprotoAdminSearchAccounts(ctx, cursor, email, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoAdminSendEmail(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminSendEmail") - defer span.End() - var body comatproto.AdminSendEmail_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.AdminSendEmail_Output - var handleErr error - // func (s *Server) handleComAtprotoAdminSendEmail(ctx context.Context,body *comatproto.AdminSendEmail_Input) (*comatproto.AdminSendEmail_Output, error) - out, handleErr = s.handleComAtprotoAdminSendEmail(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoAdminUpdateAccountEmail(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminUpdateAccountEmail") - defer span.End() - var body comatproto.AdminUpdateAccountEmail_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminUpdateAccountEmail(ctx context.Context,body *comatproto.AdminUpdateAccountEmail_Input) error - handleErr = s.handleComAtprotoAdminUpdateAccountEmail(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminUpdateAccountHandle(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminUpdateAccountHandle") - defer span.End() - var body comatproto.AdminUpdateAccountHandle_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminUpdateAccountHandle(ctx context.Context,body *comatproto.AdminUpdateAccountHandle_Input) error - handleErr = s.handleComAtprotoAdminUpdateAccountHandle(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminUpdateAccountPassword(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminUpdateAccountPassword") - defer span.End() - var body comatproto.AdminUpdateAccountPassword_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminUpdateAccountPassword(ctx context.Context,body *comatproto.AdminUpdateAccountPassword_Input) error - handleErr = s.handleComAtprotoAdminUpdateAccountPassword(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminUpdateAccountSigningKey(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminUpdateAccountSigningKey") - defer span.End() - var body comatproto.AdminUpdateAccountSigningKey_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoAdminUpdateAccountSigningKey(ctx context.Context,body *comatproto.AdminUpdateAccountSigningKey_Input) error - handleErr = s.handleComAtprotoAdminUpdateAccountSigningKey(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoAdminUpdateSubjectStatus(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoAdminUpdateSubjectStatus") - defer span.End() - var body comatproto.AdminUpdateSubjectStatus_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.AdminUpdateSubjectStatus_Output - var handleErr error - // func (s *Server) handleComAtprotoAdminUpdateSubjectStatus(ctx context.Context,body *comatproto.AdminUpdateSubjectStatus_Input) (*comatproto.AdminUpdateSubjectStatus_Output, error) - out, handleErr = s.handleComAtprotoAdminUpdateSubjectStatus(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoIdentityGetRecommendedDidCredentials(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentityGetRecommendedDidCredentials") - defer span.End() - var out *comatproto.IdentityGetRecommendedDidCredentials_Output - var handleErr error - // func (s *Server) handleComAtprotoIdentityGetRecommendedDidCredentials(ctx context.Context) (*comatproto.IdentityGetRecommendedDidCredentials_Output, error) - out, handleErr = s.handleComAtprotoIdentityGetRecommendedDidCredentials(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoIdentityRefreshIdentity(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentityRefreshIdentity") - defer span.End() - var body comatproto.IdentityRefreshIdentity_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.IdentityDefs_IdentityInfo - var handleErr error - // func (s *Server) handleComAtprotoIdentityRefreshIdentity(ctx context.Context,body *comatproto.IdentityRefreshIdentity_Input) (*comatproto.IdentityDefs_IdentityInfo, error) - out, handleErr = s.handleComAtprotoIdentityRefreshIdentity(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoIdentityRequestPlcOperationSignature(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentityRequestPlcOperationSignature") - defer span.End() - var handleErr error - // func (s *Server) handleComAtprotoIdentityRequestPlcOperationSignature(ctx context.Context) error - handleErr = s.handleComAtprotoIdentityRequestPlcOperationSignature(ctx) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoIdentityResolveDid(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentityResolveDid") - defer span.End() - did := c.QueryParam("did") - var out *comatproto.IdentityResolveDid_Output - var handleErr error - // func (s *Server) handleComAtprotoIdentityResolveDid(ctx context.Context,did string) (*comatproto.IdentityResolveDid_Output, error) - out, handleErr = s.handleComAtprotoIdentityResolveDid(ctx, did) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoIdentityResolveHandle(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentityResolveHandle") - defer span.End() - handle := c.QueryParam("handle") - var out *comatproto.IdentityResolveHandle_Output - var handleErr error - // func (s *Server) handleComAtprotoIdentityResolveHandle(ctx context.Context,handle string) (*comatproto.IdentityResolveHandle_Output, error) - out, handleErr = s.handleComAtprotoIdentityResolveHandle(ctx, handle) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoIdentityResolveIdentity(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentityResolveIdentity") - defer span.End() - identifier := c.QueryParam("identifier") - var out *comatproto.IdentityDefs_IdentityInfo - var handleErr error - // func (s *Server) handleComAtprotoIdentityResolveIdentity(ctx context.Context,identifier string) (*comatproto.IdentityDefs_IdentityInfo, error) - out, handleErr = s.handleComAtprotoIdentityResolveIdentity(ctx, identifier) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoIdentitySignPlcOperation(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentitySignPlcOperation") - defer span.End() - var body comatproto.IdentitySignPlcOperation_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.IdentitySignPlcOperation_Output - var handleErr error - // func (s *Server) handleComAtprotoIdentitySignPlcOperation(ctx context.Context,body *comatproto.IdentitySignPlcOperation_Input) (*comatproto.IdentitySignPlcOperation_Output, error) - out, handleErr = s.handleComAtprotoIdentitySignPlcOperation(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoIdentitySubmitPlcOperation(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentitySubmitPlcOperation") - defer span.End() - var body comatproto.IdentitySubmitPlcOperation_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoIdentitySubmitPlcOperation(ctx context.Context,body *comatproto.IdentitySubmitPlcOperation_Input) error - handleErr = s.handleComAtprotoIdentitySubmitPlcOperation(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoIdentityUpdateHandle(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoIdentityUpdateHandle") - defer span.End() - var body comatproto.IdentityUpdateHandle_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoIdentityUpdateHandle(ctx context.Context,body *comatproto.IdentityUpdateHandle_Input) error - handleErr = s.handleComAtprotoIdentityUpdateHandle(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoLabelQueryLabels(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoLabelQueryLabels") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - sources := c.QueryParams()["sources"] - uriPatterns := c.QueryParams()["uriPatterns"] - var out *comatproto.LabelQueryLabels_Output - var handleErr error - // func (s *Server) handleComAtprotoLabelQueryLabels(ctx context.Context,cursor string,limit *int,sources []string,uriPatterns []string) (*comatproto.LabelQueryLabels_Output, error) - out, handleErr = s.handleComAtprotoLabelQueryLabels(ctx, cursor, limit, sources, uriPatterns) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoModerationCreateReport(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoModerationCreateReport") - defer span.End() - var body comatproto.ModerationCreateReport_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.ModerationCreateReport_Output - var handleErr error - // func (s *Server) handleComAtprotoModerationCreateReport(ctx context.Context,body *comatproto.ModerationCreateReport_Input) (*comatproto.ModerationCreateReport_Output, error) - out, handleErr = s.handleComAtprotoModerationCreateReport(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoApplyWrites(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoApplyWrites") - defer span.End() - var body comatproto.RepoApplyWrites_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.RepoApplyWrites_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoApplyWrites(ctx context.Context,body *comatproto.RepoApplyWrites_Input) (*comatproto.RepoApplyWrites_Output, error) - out, handleErr = s.handleComAtprotoRepoApplyWrites(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoCreateRecord(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoCreateRecord") - defer span.End() - var body comatproto.RepoCreateRecord_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.RepoCreateRecord_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoCreateRecord(ctx context.Context,body *comatproto.RepoCreateRecord_Input) (*comatproto.RepoCreateRecord_Output, error) - out, handleErr = s.handleComAtprotoRepoCreateRecord(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoDeleteRecord(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoDeleteRecord") - defer span.End() - var body comatproto.RepoDeleteRecord_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.RepoDeleteRecord_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoDeleteRecord(ctx context.Context,body *comatproto.RepoDeleteRecord_Input) (*comatproto.RepoDeleteRecord_Output, error) - out, handleErr = s.handleComAtprotoRepoDeleteRecord(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoDescribeRepo(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoDescribeRepo") - defer span.End() - repo := c.QueryParam("repo") - var out *comatproto.RepoDescribeRepo_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoDescribeRepo(ctx context.Context,repo string) (*comatproto.RepoDescribeRepo_Output, error) - out, handleErr = s.handleComAtprotoRepoDescribeRepo(ctx, repo) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoGetRecord(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoGetRecord") - defer span.End() - cid := c.QueryParam("cid") - collection := c.QueryParam("collection") - repo := c.QueryParam("repo") - rkey := c.QueryParam("rkey") - var out *comatproto.RepoGetRecord_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoGetRecord(ctx context.Context,cid string,collection string,repo string,rkey string) (*comatproto.RepoGetRecord_Output, error) - out, handleErr = s.handleComAtprotoRepoGetRecord(ctx, cid, collection, repo, rkey) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoImportRepo(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoImportRepo") - defer span.End() - body := c.Request().Body - var handleErr error - // func (s *Server) handleComAtprotoRepoImportRepo(ctx context.Context,r io.Reader) error - handleErr = s.handleComAtprotoRepoImportRepo(ctx, body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoRepoListMissingBlobs(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoListMissingBlobs") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *comatproto.RepoListMissingBlobs_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoListMissingBlobs(ctx context.Context,cursor string,limit *int) (*comatproto.RepoListMissingBlobs_Output, error) - out, handleErr = s.handleComAtprotoRepoListMissingBlobs(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoListRecords(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoListRecords") - defer span.End() - collection := c.QueryParam("collection") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - repo := c.QueryParam("repo") - var reverse *bool - if p := c.QueryParam("reverse"); p != "" { - reverse_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - reverse = &reverse_val - } - var out *comatproto.RepoListRecords_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoListRecords(ctx context.Context,collection string,cursor string,limit *int,repo string,reverse *bool) (*comatproto.RepoListRecords_Output, error) - out, handleErr = s.handleComAtprotoRepoListRecords(ctx, collection, cursor, limit, repo, reverse) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoPutRecord(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoPutRecord") - defer span.End() - var body comatproto.RepoPutRecord_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.RepoPutRecord_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoPutRecord(ctx context.Context,body *comatproto.RepoPutRecord_Input) (*comatproto.RepoPutRecord_Output, error) - out, handleErr = s.handleComAtprotoRepoPutRecord(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoRepoUploadBlob(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoRepoUploadBlob") - defer span.End() - body := c.Request().Body - var out *comatproto.RepoUploadBlob_Output - var handleErr error - // func (s *Server) handleComAtprotoRepoUploadBlob(ctx context.Context,r io.Reader) (*comatproto.RepoUploadBlob_Output, error) - out, handleErr = s.handleComAtprotoRepoUploadBlob(ctx, body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerActivateAccount(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerActivateAccount") - defer span.End() - var handleErr error - // func (s *Server) handleComAtprotoServerActivateAccount(ctx context.Context) error - handleErr = s.handleComAtprotoServerActivateAccount(ctx) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerCheckAccountStatus(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerCheckAccountStatus") - defer span.End() - var out *comatproto.ServerCheckAccountStatus_Output - var handleErr error - // func (s *Server) handleComAtprotoServerCheckAccountStatus(ctx context.Context) (*comatproto.ServerCheckAccountStatus_Output, error) - out, handleErr = s.handleComAtprotoServerCheckAccountStatus(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerConfirmEmail(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerConfirmEmail") - defer span.End() - var body comatproto.ServerConfirmEmail_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoServerConfirmEmail(ctx context.Context,body *comatproto.ServerConfirmEmail_Input) error - handleErr = s.handleComAtprotoServerConfirmEmail(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerCreateAccount(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerCreateAccount") - defer span.End() - var body comatproto.ServerCreateAccount_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.ServerCreateAccount_Output - var handleErr error - // func (s *Server) handleComAtprotoServerCreateAccount(ctx context.Context,body *comatproto.ServerCreateAccount_Input) (*comatproto.ServerCreateAccount_Output, error) - out, handleErr = s.handleComAtprotoServerCreateAccount(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerCreateAppPassword(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerCreateAppPassword") - defer span.End() - var body comatproto.ServerCreateAppPassword_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.ServerCreateAppPassword_AppPassword - var handleErr error - // func (s *Server) handleComAtprotoServerCreateAppPassword(ctx context.Context,body *comatproto.ServerCreateAppPassword_Input) (*comatproto.ServerCreateAppPassword_AppPassword, error) - out, handleErr = s.handleComAtprotoServerCreateAppPassword(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerCreateInviteCode(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerCreateInviteCode") - defer span.End() - var body comatproto.ServerCreateInviteCode_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.ServerCreateInviteCode_Output - var handleErr error - // func (s *Server) handleComAtprotoServerCreateInviteCode(ctx context.Context,body *comatproto.ServerCreateInviteCode_Input) (*comatproto.ServerCreateInviteCode_Output, error) - out, handleErr = s.handleComAtprotoServerCreateInviteCode(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerCreateInviteCodes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerCreateInviteCodes") - defer span.End() - var body comatproto.ServerCreateInviteCodes_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.ServerCreateInviteCodes_Output - var handleErr error - // func (s *Server) handleComAtprotoServerCreateInviteCodes(ctx context.Context,body *comatproto.ServerCreateInviteCodes_Input) (*comatproto.ServerCreateInviteCodes_Output, error) - out, handleErr = s.handleComAtprotoServerCreateInviteCodes(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerCreateSession(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerCreateSession") - defer span.End() - var body comatproto.ServerCreateSession_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.ServerCreateSession_Output - var handleErr error - // func (s *Server) handleComAtprotoServerCreateSession(ctx context.Context,body *comatproto.ServerCreateSession_Input) (*comatproto.ServerCreateSession_Output, error) - out, handleErr = s.handleComAtprotoServerCreateSession(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerDeactivateAccount(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerDeactivateAccount") - defer span.End() - var body comatproto.ServerDeactivateAccount_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoServerDeactivateAccount(ctx context.Context,body *comatproto.ServerDeactivateAccount_Input) error - handleErr = s.handleComAtprotoServerDeactivateAccount(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerDeleteAccount(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerDeleteAccount") - defer span.End() - var body comatproto.ServerDeleteAccount_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoServerDeleteAccount(ctx context.Context,body *comatproto.ServerDeleteAccount_Input) error - handleErr = s.handleComAtprotoServerDeleteAccount(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerDeleteSession(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerDeleteSession") - defer span.End() - var handleErr error - // func (s *Server) handleComAtprotoServerDeleteSession(ctx context.Context) error - handleErr = s.handleComAtprotoServerDeleteSession(ctx) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerDescribeServer(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerDescribeServer") - defer span.End() - var out *comatproto.ServerDescribeServer_Output - var handleErr error - // func (s *Server) handleComAtprotoServerDescribeServer(ctx context.Context) (*comatproto.ServerDescribeServer_Output, error) - out, handleErr = s.handleComAtprotoServerDescribeServer(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerGetAccountInviteCodes(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerGetAccountInviteCodes") - defer span.End() - var createAvailable *bool - if p := c.QueryParam("createAvailable"); p != "" { - createAvailable_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - createAvailable = &createAvailable_val - } - var includeUsed *bool - if p := c.QueryParam("includeUsed"); p != "" { - includeUsed_val, err := strconv.ParseBool(p) - if err != nil { - return err - } - includeUsed = &includeUsed_val - } - var out *comatproto.ServerGetAccountInviteCodes_Output - var handleErr error - // func (s *Server) handleComAtprotoServerGetAccountInviteCodes(ctx context.Context,createAvailable *bool,includeUsed *bool) (*comatproto.ServerGetAccountInviteCodes_Output, error) - out, handleErr = s.handleComAtprotoServerGetAccountInviteCodes(ctx, createAvailable, includeUsed) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerGetServiceAuth(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerGetServiceAuth") - defer span.End() - aud := c.QueryParam("aud") - var exp *int - if p := c.QueryParam("exp"); p != "" { - exp_val, err := strconv.Atoi(p) - if err != nil { - return err - } - exp = &exp_val - } - lxm := c.QueryParam("lxm") - var out *comatproto.ServerGetServiceAuth_Output - var handleErr error - // func (s *Server) handleComAtprotoServerGetServiceAuth(ctx context.Context,aud string,exp *int,lxm string) (*comatproto.ServerGetServiceAuth_Output, error) - out, handleErr = s.handleComAtprotoServerGetServiceAuth(ctx, aud, exp, lxm) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerGetSession(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerGetSession") - defer span.End() - var out *comatproto.ServerGetSession_Output - var handleErr error - // func (s *Server) handleComAtprotoServerGetSession(ctx context.Context) (*comatproto.ServerGetSession_Output, error) - out, handleErr = s.handleComAtprotoServerGetSession(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerListAppPasswords(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerListAppPasswords") - defer span.End() - var out *comatproto.ServerListAppPasswords_Output - var handleErr error - // func (s *Server) handleComAtprotoServerListAppPasswords(ctx context.Context) (*comatproto.ServerListAppPasswords_Output, error) - out, handleErr = s.handleComAtprotoServerListAppPasswords(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerRefreshSession(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerRefreshSession") - defer span.End() - var out *comatproto.ServerRefreshSession_Output - var handleErr error - // func (s *Server) handleComAtprotoServerRefreshSession(ctx context.Context) (*comatproto.ServerRefreshSession_Output, error) - out, handleErr = s.handleComAtprotoServerRefreshSession(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerRequestAccountDelete(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerRequestAccountDelete") - defer span.End() - var handleErr error - // func (s *Server) handleComAtprotoServerRequestAccountDelete(ctx context.Context) error - handleErr = s.handleComAtprotoServerRequestAccountDelete(ctx) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerRequestEmailConfirmation(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerRequestEmailConfirmation") - defer span.End() - var handleErr error - // func (s *Server) handleComAtprotoServerRequestEmailConfirmation(ctx context.Context) error - handleErr = s.handleComAtprotoServerRequestEmailConfirmation(ctx) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerRequestEmailUpdate(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerRequestEmailUpdate") - defer span.End() - var out *comatproto.ServerRequestEmailUpdate_Output - var handleErr error - // func (s *Server) handleComAtprotoServerRequestEmailUpdate(ctx context.Context) (*comatproto.ServerRequestEmailUpdate_Output, error) - out, handleErr = s.handleComAtprotoServerRequestEmailUpdate(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerRequestPasswordReset(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerRequestPasswordReset") - defer span.End() - var body comatproto.ServerRequestPasswordReset_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoServerRequestPasswordReset(ctx context.Context,body *comatproto.ServerRequestPasswordReset_Input) error - handleErr = s.handleComAtprotoServerRequestPasswordReset(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerReserveSigningKey(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerReserveSigningKey") - defer span.End() - var body comatproto.ServerReserveSigningKey_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.ServerReserveSigningKey_Output - var handleErr error - // func (s *Server) handleComAtprotoServerReserveSigningKey(ctx context.Context,body *comatproto.ServerReserveSigningKey_Input) (*comatproto.ServerReserveSigningKey_Output, error) - out, handleErr = s.handleComAtprotoServerReserveSigningKey(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoServerResetPassword(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerResetPassword") - defer span.End() - var body comatproto.ServerResetPassword_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoServerResetPassword(ctx context.Context,body *comatproto.ServerResetPassword_Input) error - handleErr = s.handleComAtprotoServerResetPassword(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerRevokeAppPassword(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerRevokeAppPassword") - defer span.End() - var body comatproto.ServerRevokeAppPassword_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoServerRevokeAppPassword(ctx context.Context,body *comatproto.ServerRevokeAppPassword_Input) error - handleErr = s.handleComAtprotoServerRevokeAppPassword(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoServerUpdateEmail(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoServerUpdateEmail") - defer span.End() - var body comatproto.ServerUpdateEmail_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoServerUpdateEmail(ctx context.Context,body *comatproto.ServerUpdateEmail_Input) error - handleErr = s.handleComAtprotoServerUpdateEmail(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoSyncGetBlob(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetBlob") - defer span.End() - cid := c.QueryParam("cid") - did := c.QueryParam("did") - var out io.Reader - var handleErr error - // func (s *Server) handleComAtprotoSyncGetBlob(ctx context.Context,cid string,did string) (io.Reader, error) - out, handleErr = s.handleComAtprotoSyncGetBlob(ctx, cid, did) - if handleErr != nil { - return handleErr - } - return c.Stream(200, "application/octet-stream", out) -} - -func (s *Server) HandleComAtprotoSyncGetBlocks(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetBlocks") - defer span.End() - cids := c.QueryParams()["cids"] - did := c.QueryParam("did") - var out io.Reader - var handleErr error - // func (s *Server) handleComAtprotoSyncGetBlocks(ctx context.Context,cids []string,did string) (io.Reader, error) - out, handleErr = s.handleComAtprotoSyncGetBlocks(ctx, cids, did) - if handleErr != nil { - return handleErr - } - return c.Stream(200, "application/octet-stream", out) -} - -func (s *Server) HandleComAtprotoSyncGetCheckout(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetCheckout") - defer span.End() - did := c.QueryParam("did") - var out io.Reader - var handleErr error - // func (s *Server) handleComAtprotoSyncGetCheckout(ctx context.Context,did string) (io.Reader, error) - out, handleErr = s.handleComAtprotoSyncGetCheckout(ctx, did) - if handleErr != nil { - return handleErr - } - return c.Stream(200, "application/octet-stream", out) -} - -func (s *Server) HandleComAtprotoSyncGetHead(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetHead") - defer span.End() - did := c.QueryParam("did") - var out *comatproto.SyncGetHead_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncGetHead(ctx context.Context,did string) (*comatproto.SyncGetHead_Output, error) - out, handleErr = s.handleComAtprotoSyncGetHead(ctx, did) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncGetHostStatus(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetHostStatus") - defer span.End() - hostname := c.QueryParam("hostname") - var out *comatproto.SyncGetHostStatus_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncGetHostStatus(ctx context.Context,hostname string) (*comatproto.SyncGetHostStatus_Output, error) - out, handleErr = s.handleComAtprotoSyncGetHostStatus(ctx, hostname) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncGetLatestCommit(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetLatestCommit") - defer span.End() - did := c.QueryParam("did") - var out *comatproto.SyncGetLatestCommit_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncGetLatestCommit(ctx context.Context,did string) (*comatproto.SyncGetLatestCommit_Output, error) - out, handleErr = s.handleComAtprotoSyncGetLatestCommit(ctx, did) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncGetRecord(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetRecord") - defer span.End() - collection := c.QueryParam("collection") - did := c.QueryParam("did") - rkey := c.QueryParam("rkey") - var out io.Reader - var handleErr error - // func (s *Server) handleComAtprotoSyncGetRecord(ctx context.Context,collection string,did string,rkey string) (io.Reader, error) - out, handleErr = s.handleComAtprotoSyncGetRecord(ctx, collection, did, rkey) - if handleErr != nil { - return handleErr - } - return c.Stream(200, "application/octet-stream", out) -} - -func (s *Server) HandleComAtprotoSyncGetRepo(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetRepo") - defer span.End() - did := c.QueryParam("did") - since := c.QueryParam("since") - var out io.Reader - var handleErr error - // func (s *Server) handleComAtprotoSyncGetRepo(ctx context.Context,did string,since string) (io.Reader, error) - out, handleErr = s.handleComAtprotoSyncGetRepo(ctx, did, since) - if handleErr != nil { - return handleErr - } - return c.Stream(200, "application/octet-stream", out) -} - -func (s *Server) HandleComAtprotoSyncGetRepoStatus(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncGetRepoStatus") - defer span.End() - did := c.QueryParam("did") - var out *comatproto.SyncGetRepoStatus_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncGetRepoStatus(ctx context.Context,did string) (*comatproto.SyncGetRepoStatus_Output, error) - out, handleErr = s.handleComAtprotoSyncGetRepoStatus(ctx, did) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncListBlobs(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncListBlobs") - defer span.End() - cursor := c.QueryParam("cursor") - did := c.QueryParam("did") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - since := c.QueryParam("since") - var out *comatproto.SyncListBlobs_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncListBlobs(ctx context.Context,cursor string,did string,limit *int,since string) (*comatproto.SyncListBlobs_Output, error) - out, handleErr = s.handleComAtprotoSyncListBlobs(ctx, cursor, did, limit, since) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncListHosts(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncListHosts") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *comatproto.SyncListHosts_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncListHosts(ctx context.Context,cursor string,limit *int) (*comatproto.SyncListHosts_Output, error) - out, handleErr = s.handleComAtprotoSyncListHosts(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncListRepos(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncListRepos") - defer span.End() - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *comatproto.SyncListRepos_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncListRepos(ctx context.Context,cursor string,limit *int) (*comatproto.SyncListRepos_Output, error) - out, handleErr = s.handleComAtprotoSyncListRepos(ctx, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncListReposByCollection(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncListReposByCollection") - defer span.End() - collection := c.QueryParam("collection") - cursor := c.QueryParam("cursor") - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var out *comatproto.SyncListReposByCollection_Output - var handleErr error - // func (s *Server) handleComAtprotoSyncListReposByCollection(ctx context.Context,collection string,cursor string,limit *int) (*comatproto.SyncListReposByCollection_Output, error) - out, handleErr = s.handleComAtprotoSyncListReposByCollection(ctx, collection, cursor, limit) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoSyncNotifyOfUpdate(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncNotifyOfUpdate") - defer span.End() - var body comatproto.SyncNotifyOfUpdate_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoSyncNotifyOfUpdate(ctx context.Context,body *comatproto.SyncNotifyOfUpdate_Input) error - handleErr = s.handleComAtprotoSyncNotifyOfUpdate(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoSyncRequestCrawl(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoSyncRequestCrawl") - defer span.End() - var body comatproto.SyncRequestCrawl_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoSyncRequestCrawl(ctx context.Context,body *comatproto.SyncRequestCrawl_Input) error - handleErr = s.handleComAtprotoSyncRequestCrawl(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoTempAddReservedHandle(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoTempAddReservedHandle") - defer span.End() - var body comatproto.TempAddReservedHandle_Input - if err := c.Bind(&body); err != nil { - return err - } - var out *comatproto.TempAddReservedHandle_Output - var handleErr error - // func (s *Server) handleComAtprotoTempAddReservedHandle(ctx context.Context,body *comatproto.TempAddReservedHandle_Input) (*comatproto.TempAddReservedHandle_Output, error) - out, handleErr = s.handleComAtprotoTempAddReservedHandle(ctx, &body) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoTempCheckHandleAvailability(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoTempCheckHandleAvailability") - defer span.End() - birthDate := c.QueryParam("birthDate") - email := c.QueryParam("email") - handle := c.QueryParam("handle") - var out *comatproto.TempCheckHandleAvailability_Output - var handleErr error - // func (s *Server) handleComAtprotoTempCheckHandleAvailability(ctx context.Context,birthDate string,email string,handle string) (*comatproto.TempCheckHandleAvailability_Output, error) - out, handleErr = s.handleComAtprotoTempCheckHandleAvailability(ctx, birthDate, email, handle) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoTempCheckSignupQueue(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoTempCheckSignupQueue") - defer span.End() - var out *comatproto.TempCheckSignupQueue_Output - var handleErr error - // func (s *Server) handleComAtprotoTempCheckSignupQueue(ctx context.Context) (*comatproto.TempCheckSignupQueue_Output, error) - out, handleErr = s.handleComAtprotoTempCheckSignupQueue(ctx) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoTempDereferenceScope(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoTempDereferenceScope") - defer span.End() - scope := c.QueryParam("scope") - var out *comatproto.TempDereferenceScope_Output - var handleErr error - // func (s *Server) handleComAtprotoTempDereferenceScope(ctx context.Context,scope string) (*comatproto.TempDereferenceScope_Output, error) - out, handleErr = s.handleComAtprotoTempDereferenceScope(ctx, scope) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoTempFetchLabels(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoTempFetchLabels") - defer span.End() - var limit *int - if p := c.QueryParam("limit"); p != "" { - limit_val, err := strconv.Atoi(p) - if err != nil { - return err - } - limit = &limit_val - } - var since *int - if p := c.QueryParam("since"); p != "" { - since_val, err := strconv.Atoi(p) - if err != nil { - return err - } - since = &since_val - } - var out *comatproto.TempFetchLabels_Output - var handleErr error - // func (s *Server) handleComAtprotoTempFetchLabels(ctx context.Context,limit *int,since *int) (*comatproto.TempFetchLabels_Output, error) - out, handleErr = s.handleComAtprotoTempFetchLabels(ctx, limit, since) - if handleErr != nil { - return handleErr - } - return c.JSON(200, out) -} - -func (s *Server) HandleComAtprotoTempRequestPhoneVerification(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoTempRequestPhoneVerification") - defer span.End() - var body comatproto.TempRequestPhoneVerification_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoTempRequestPhoneVerification(ctx context.Context,body *comatproto.TempRequestPhoneVerification_Input) error - handleErr = s.handleComAtprotoTempRequestPhoneVerification(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - -func (s *Server) HandleComAtprotoTempRevokeAccountCredentials(c echo.Context) error { - ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandleComAtprotoTempRevokeAccountCredentials") - defer span.End() - var body comatproto.TempRevokeAccountCredentials_Input - if err := c.Bind(&body); err != nil { - return err - } - var handleErr error - // func (s *Server) handleComAtprotoTempRevokeAccountCredentials(ctx context.Context,body *comatproto.TempRevokeAccountCredentials_Input) error - handleErr = s.handleComAtprotoTempRevokeAccountCredentials(ctx, &body) - if handleErr != nil { - return handleErr - } - return nil -} - func (s *Server) RegisterHandlersGamesgamesgamesgamesgames(e *echo.Echo) error { e.GET("/xrpc/games.gamesgamesgamesgames.search", s.HandleGamesGamesgamesgamesgamesSearch) return nil diff --git a/pkg/spxrpc/webhook.go b/pkg/spxrpc/webhook.go index c26030d2..9d8b9acb 100644 --- a/pkg/spxrpc/webhook.go +++ b/pkg/spxrpc/webhook.go @@ -121,7 +121,7 @@ func (s *Server) handlePlaceStreamServerListWebhooks(ctx context.Context, active } // Convert to API format - apiWebhooks := make([]*placestreamtypes.ServerDefs_Webhook, len(webhooks)) + apiWebhooks := make([]placestream.ServerDefs_Webhook, len(webhooks)) for i, webhook := range webhooks { apiWebhook, err := webhook.ToLexicon() if err != nil { diff --git a/pkg/viewlog/aggregate.go b/pkg/viewlog/aggregate.go index 0eeee4e5..37db1bb7 100644 --- a/pkg/viewlog/aggregate.go +++ b/pkg/viewlog/aggregate.go @@ -13,7 +13,7 @@ import ( "strings" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" "stream.place/streamplace/pkg/blob" "stream.place/streamplace/pkg/log" @@ -83,7 +83,7 @@ type VideoCount struct { // place.stream.media.track record inside the window. The strongRef // points at the track record whose bytes were transferred. type TrackUsage struct { - Track *comatproto.RepoStrongRef + Track comatproto.RepoStrongRef Bytes int64 DurationMS int64 } @@ -275,7 +275,7 @@ func AggregateWindow(ctx context.Context, store blob.Store, in AggregateInput) ( k := trackKey{video: video, trackURI: ref.Uri} tu, ok := trackTotals[k] if !ok { - tu = &TrackUsage{Track: ref} + tu = &TrackUsage{Track: *ref} trackTotals[k] = tu } tu.Bytes += bytes diff --git a/pkg/viewlog/publish.go b/pkg/viewlog/publish.go index c4622138..8ecc8e1a 100644 --- a/pkg/viewlog/publish.go +++ b/pkg/viewlog/publish.go @@ -71,9 +71,9 @@ func RunAggregation(ctx context.Context, in RunAggregationInput) error { indexedAt := aqtime.FromTime(time.Now().UTC()).String() for _, vc := range result.VideoCounts { - tracks := make([]*placestream.MediaViewCount_TrackUsage, 0, len(vc.Tracks)) + tracks := make([]placestream.MediaViewCount_TrackUsage, 0, len(vc.Tracks)) for _, t := range vc.Tracks { - tracks = append(tracks, &placestream.MediaViewCount_TrackUsage{ + tracks = append(tracks, placestream.MediaViewCount_TrackUsage{ Track: t.Track, Bytes: t.Bytes, DurationMs: t.DurationMS, diff --git a/pkg/vod/publish.go b/pkg/vod/publish.go index 3f4b0055..87f1f7d2 100644 --- a/pkg/vod/publish.go +++ b/pkg/vod/publish.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" glexrt "github.com/streamplace/glex/runtime" "github.com/bluesky-social/indigo/xrpc" "go.opentelemetry.io/otel/attribute" @@ -242,7 +242,7 @@ func publishTrack(ctx context.Context, client XRPCClient, did, cid string, blobS rec := &placestream.MediaTrack{ LexiconTypeID: constants.PLACE_STREAM_MEDIA_TRACK, - Track: &placestream.MediaTrack_Track{ + Track: placestream.MediaTrack_Track{ MediaDefs_MuxlTrack: &placestream.MediaDefs_MuxlTrack{ LexiconTypeID: "place.stream.media.defs#muxlTrack", Blob: cid, diff --git a/pkg/vod/publish_draft.go b/pkg/vod/publish_draft.go index 630df631..f4e1ef80 100644 --- a/pkg/vod/publish_draft.go +++ b/pkg/vod/publish_draft.go @@ -8,7 +8,7 @@ import ( "strings" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" glexrt "github.com/streamplace/glex/runtime" "github.com/bluesky-social/indigo/xrpc" "go.opentelemetry.io/otel/attribute" @@ -104,17 +104,17 @@ func PublishDraft(ctx context.Context, state *statedb.StatefulDB, store blob.Sto return "", "", fmt.Errorf("publish tracks: %w", terr) } if sourceTracks != nil { - video.Source = &placestream.Video_Source{ + video.Source = placestream.Video_Source{ MediaDefs_SourceTracks: sourceTracks, } } else if rec.Source != nil && rec.Source.MediaDefs_SourceTracks != nil { // Legacy fallback: a draft that already carries source (e.g. published // via the old at-ready-time path). Carry it over. - video.Source = &placestream.Video_Source{ + video.Source = placestream.Video_Source{ MediaDefs_SourceTracks: rec.Source.MediaDefs_SourceTracks, } } else if rec.Source != nil && rec.Source.MediaDefs_SourceClip != nil { - video.Source = &placestream.Video_Source{ + video.Source = placestream.Video_Source{ MediaDefs_SourceClip: rec.Source.MediaDefs_SourceClip, } } @@ -214,20 +214,20 @@ func publishTracksFromUpload(ctx context.Context, state *statedb.StatefulDB, cli if upload.ContentCID == "" { return nil, fmt.Errorf("upload %s has no content_cid", upload.ID) } - var tracks []*comatproto.RepoStrongRef + var tracks []comatproto.RepoStrongRef if probe.Video != nil { ref, err := publishTrack(ctx, client, did, upload.ContentCID, upload.BlobSize, probe.DurationMS, "1", "video", upload.SigningKey, probe.Video, nil) if err != nil { return nil, fmt.Errorf("publish video track: %w", err) } - tracks = append(tracks, ref) + tracks = append(tracks, *ref) } if probe.Audio != nil { ref, err := publishTrack(ctx, client, did, upload.ContentCID, upload.BlobSize, probe.DurationMS, "2", "audio", upload.SigningKey, nil, probe.Audio) if err != nil { return nil, fmt.Errorf("publish audio track: %w", err) } - tracks = append(tracks, ref) + tracks = append(tracks, *ref) } if len(tracks) == 0 { return nil, nil @@ -249,16 +249,16 @@ func derefInt64(p *int64) int64 { // draftConnectionsToVideo maps the draft's connections union slice to the video // record's connections slice (both wrap place.stream.video#connection). -func draftConnectionsToVideo(in []*placestream.VodDraftVideo_Connections_Elem) []*placestream.Video_Connections_Elem { +func draftConnectionsToVideo(in []placestream.VodDraftVideo_Connections_Elem) []placestream.Video_Connections_Elem { if len(in) == 0 { return nil } - out := make([]*placestream.Video_Connections_Elem, 0, len(in)) + out := make([]placestream.Video_Connections_Elem, 0, len(in)) for _, c := range in { - if c == nil || c.Video_Connection == nil { + if false || c.Video_Connection == nil { continue } - out = append(out, &placestream.Video_Connections_Elem{ + out = append(out, placestream.Video_Connections_Elem{ Video_Connection: c.Video_Connection, }) } diff --git a/pkg/vod/publish_video.go b/pkg/vod/publish_video.go index 6717be4c..7997256c 100644 --- a/pkg/vod/publish_video.go +++ b/pkg/vod/publish_video.go @@ -8,7 +8,7 @@ import ( "fmt" "time" - comatproto "github.com/bluesky-social/indigo/api/atproto" + "stream.place/streamplace/pkg/comatproto" glexrt "github.com/streamplace/glex/runtime" "github.com/bluesky-social/indigo/xrpc" "go.opentelemetry.io/otel/attribute" @@ -75,7 +75,7 @@ func PublishVideo(ctx context.Context, state *statedb.StatefulDB, store blob.Sto span.RecordError(err) return "", "", err } - video.Source = &placestream.Video_Source{ + video.Source = placestream.Video_Source{ MediaDefs_SourceTracks: &placestream.MediaDefs_SourceTracks{ LexiconTypeID: "place.stream.media.defs#sourceTracks", Tracks: tracks, @@ -121,7 +121,7 @@ func PublishVideo(ctx context.Context, state *statedb.StatefulDB, store blob.Sto // sourceTracksFromUpload turns the {uri,cid} track refs stored on the Upload // row (by publishRecords) into the strongRefs for the video record's source. -func sourceTracksFromUpload(upload *statedb.Upload) ([]*comatproto.RepoStrongRef, error) { +func sourceTracksFromUpload(upload *statedb.Upload) ([]comatproto.RepoStrongRef, error) { if upload.TrackURIs == "" { return nil, nil } @@ -129,9 +129,9 @@ func sourceTracksFromUpload(upload *statedb.Upload) ([]*comatproto.RepoStrongRef if err := json.Unmarshal([]byte(upload.TrackURIs), &refs); err != nil { return nil, fmt.Errorf("decode track refs: %w", err) } - tracks := make([]*comatproto.RepoStrongRef, 0, len(refs)) + tracks := make([]comatproto.RepoStrongRef, 0, len(refs)) for _, r := range refs { - tracks = append(tracks, &comatproto.RepoStrongRef{Uri: r.URI, Cid: r.CID}) + tracks = append(tracks, comatproto.RepoStrongRef{Uri: r.URI, Cid: r.CID}) } return tracks, nil } @@ -152,5 +152,5 @@ func generateAndUploadThumbnail(ctx context.Context, client XRPCClient, store bl if err := client.Do(ctx, xrpc.Procedure, thumbnailMimeType, "com.atproto.repo.uploadBlob", nil, bytes.NewReader(thumb), &uploadOut); err != nil { return nil, fmt.Errorf("upload thumb blob: %w", err) } - return lex.BlobFromLexUtil(uploadOut.Blob), nil + return &uploadOut.Blob, nil } -- 2.51.2