Skip to content

feat: add APort Go SDK and framework middleware#101

Open
sureshchouksey8 wants to merge 1 commit into
aporthq:mainfrom
sureshchouksey8:aport-go-sdk
Open

feat: add APort Go SDK and framework middleware#101
sureshchouksey8 wants to merge 1 commit into
aporthq:mainfrom
sureshchouksey8:aport-go-sdk

Conversation

@sureshchouksey8
Copy link
Copy Markdown

Summary

  • Add a Go module under sdk/go with an APort policy verification client.
  • Support configurable base URL, injected HTTP client, bearer auth, structured verify responses, and fail-closed RequirePolicy behavior.
  • Add middleware adapters for net/http, Gin, Echo, and Fiber that read X-Agent-ID, build request context, block denied policy decisions, and expose successful decisions in request/framework context.
  • Include a runnable net/http refund guard example and unit tests for allow and deny paths.

Verification

  • git diff --check
  • Reviewed Go source for gofmt-style formatting.
  • Go toolchain is not installed in this Codex environment, so I could not run go test ./... locally.

/claim #17

Closes #17

Copy link
Copy Markdown
Author

This is ready for review. The Go SDK PR includes the core verification client, fail-closed RequirePolicy, net/http + Gin/Echo/Fiber middleware, unit tests, README, and a runnable net/http example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hacktoberfest] Go (Golang) SDK

1 participant