package
0.11.0
Repository: https://github.com/dmitridb/ponzu.git
Documentation: pkg.go.dev

# Packages

Package analytics provides the methods to run an analytics reporting system for API requests which may be useful to users for measuring access and possibly identifying bad actors abusing requests.

# Functions

CORS wraps a HandlerFunc to respond to OPTIONS requests properly.
Gzip wraps a HandlerFunc to compress responses when possible.
Record wraps a HandlerFunc to record API requests for analytical purposes.
Run adds Handlers to default http listener for API.

# Variables

ErrNoAuth should be used to report failed auth requests.

# Interfaces

Createable accepts or rejects external POST requests to endpoints such as: /api/content/create?type=Review.
Deleteable accepts or rejects update POST requests to endpoints such as: /api/content/delete?type=Review&id=1.
Trustable allows external content to be auto-approved, meaning content sent as an Createable will be stored in the public content bucket.
Updateable accepts or rejects update POST requests to endpoints such as: /api/content/update?type=Review&id=1.