Help us shape the future of Go! Take the 2026 Go Developer Survey

pkg/

directory
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: MIT, Apache-2.0, MIT

Directories

Path Synopsis
Package client provides an HTTP client with automatic 402 Payment Required handling.
Package client provides an HTTP client with automatic 402 Payment Required handling.
internal
mpptest
Package mpptest builds and formats MPP Challenges and Credentials for tests, panicking where the mpp functions return an error.
Package mpptest builds and formats MPP Challenges and Credentials for tests, panicking where the mpp functions return an error.
tempoproof
Package tempoproof holds the rule shared by the HTTP and MCP clients and the Tempo charge client for zero-amount Tempo proofs: a proof authenticates the payer at the realm the challenge names, so a client signs one only for a realm the server that sent the challenge owns.
Package tempoproof holds the rule shared by the HTTP and MCP clients and the Tempo charge client for zero-amount Tempo proofs: a proof authenticates the payer at the realm the challenge names, so a client signs one only for a realm the server that sent the challenge owns.
mcp
client
Package client pays for MCP tool calls made with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching mppx's McpClient.wrap.
Package client pays for MCP tool calls made with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching mppx's McpClient.wrap.
internal/payment
Package payment holds the MCP payment flow shared by the MCP SDK and raw JSON-RPC server integrations: reading the Credential from _meta, running the charge, and building the payment error.
Package payment holds the MCP payment flow shared by the MCP SDK and raw JSON-RPC server integrations: reading the Credential from _meta, running the charge, and building the payment error.
jsonrpc
Package jsonrpc charges for MCP tool calls handled as raw JSON-RPC messages, without an MCP SDK, matching mppx's raw MCP server transport (Transport.mcp()):
Package jsonrpc charges for MCP tool calls handled as raw JSON-RPC messages, without an MCP SDK, matching mppx's raw MCP server transport (Transport.mcp()):
server
Package server charges for MCP tools served with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching the mppx/mcp/server transport (Transport.mcpSdk):
Package server charges for MCP tools served with the official MCP Go SDK (github.com/modelcontextprotocol/go-sdk), matching the mppx/mcp/server transport (Transport.mcpSdk):
Package mpp implements the Machine Payments Protocol (MPP) types and header serialization for Go.
Package mpp implements the Machine Payments Protocol (MPP) types and header serialization for Go.
Package server provides the generic challenge-or-verify flow for Payment authentication on the server side.
Package server provides the generic challenge-or-verify flow for Payment authentication on the server side.
echo
Package echoadapter provides Echo middleware for MPP-protected routes.
Package echoadapter provides Echo middleware for MPP-protected routes.
fiber
Package fiberadapter provides Fiber middleware for MPP-protected routes.
Package fiberadapter provides Fiber middleware for MPP-protected routes.
gin
Package ginadapter provides Gin middleware for MPP-protected routes.
Package ginadapter provides Gin middleware for MPP-protected routes.
Package tempo contains the Tempo-specific charge method built on top of the generic pkg/client and pkg/server HTTP 402 flow, including request helpers, attribution utilities, and replay stores for single-process and Redis-backed deployments.
Package tempo contains the Tempo-specific charge method built on top of the generic pkg/client and pkg/server HTTP 402 flow, including request helpers, attribution utilities, and replay stores for single-process and Redis-backed deployments.
client
Package chargeclient contains the Tempo charge client method for creating Payment Credentials that satisfy Tempo HTTP 402 Challenges.
Package chargeclient contains the Tempo charge client method for creating Payment Credentials that satisfy Tempo HTTP 402 Challenges.
internal/rpccache
Package rpccache reuses the Tempo JSON-RPC clients that the charge client and server build from URLs, so each is built once rather than per request.
Package rpccache reuses the Tempo JSON-RPC clients that the charge client and server build from URLs, so each is built once rather than per request.
server
Package chargeserver contains the Tempo charge server method and verifier.
Package chargeserver contains the Tempo charge server method and verifier.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL