echo

package
v0.0.0-...-d1a8725 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package echo provides MPP middleware for the Echo web framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(
	mppServer *server.Mpp,
	charge server.ChargeFunc,
) echo.MiddlewareFunc

Middleware returns an Echo middleware function that enforces MPP payment.

charge determines the payment requirements per request. Use server.StaticCharge for fixed pricing or supply a closure for dynamic pricing.

func ReceiptFromContext

func ReceiptFromContext(c echo.Context) *protocol.Receipt

ReceiptFromContext returns the payment Receipt stored in the Echo context by the middleware, or nil when no payment was made.

Types

This section is empty.

Jump to

Keyboard shortcuts

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