Repository navigation
Feature parity with the .NET client - #24
Open
akselkvitberg wants to merge 6 commits into
Open
akselkvitberg wants to merge 6 commits into
akselkvitberg wants to merge 6 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Escape the type as a path segment and build the query with url.Values, reject an empty type, and add tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the Go SDK to feature parity with the .NET
PubSubClient(bcc-code/bcc-pubsub, including the signed deliveries in bcc-code/bcc-pubsub#181 and the Node counterpart bcc-code/bcc-pubsub#192). Parity is split over several PRs:*pubsubsdk.Error)PublishRequestData.Message→DataAttributesOrgsAttributesScheduleTime, scopesX-PubSub-Token)#16–#20 were closed earlier because only Core API uses this SDK. They are reopened for parity. This PR is stacked on #20; merge the stack in order, retargeting each PR to
mainas the one below it merges.Changes
DeleteSubscription(ctx, type, subscriptionID)→DELETE /Subscriptions/{type}?subscriptionId=. Built on Reng's commit fromfeature/Delete-subscription-endpoint(authorship kept). The type is path-escaped and the query is built withurl.Values; before, the?went throughurl.JoinPathand was encoded into the path.Subscribereturns*model.SubscribeResponse, as in .NET. Breaking: callers that useerr := client.Subscribe(...)need_, err :=.Dispatch(ctx, model.DispatchPayload) (*model.DispatchResponse, error)→POST /Dispatch, andDeleteTask(ctx, dispatchID)→DELETE /Dispatch/Delete?dispatchId=.PublishRequestData.ScheduleTime(optional, left out of the JSON when unset).ScopePubSubDeliverandScopePubSubDispatch.Differences from .NET that remain
SubscribeRequest.Scopesto the token it requests per call. The Go client takes scopes once inWithClientCredentials, so the credentials must include every scope used. Documented on each method and in the README.api.bcc.no/pubsub. .NET and Node usepubsub.api.bcc.no; update pubsub api path #2 and update pubsub endpoints in the sdk #3 change this and are not part of this PR.EventType/MessageScopesreflection helpers and the Wolverine integration have no Go counterpart.Existing users
Core API needs
Message→Data(#17) and, if it callsSubscribe, the new return value, when it bumps the SDK.Verification
go build ./...,go vet ./...andgo test ./...pass.httptestand cover, for each operation, the method, the path, the query and the exact JSON keys, plus the decoded response. They also cover:/, spaces and?scheduleTimesent as RFC 3339 and left out when unset*Error🤖 Generated with Claude Code