Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
func Chain(middleware ...Middleware) http.Handler
Types ¶
type Adapter ¶
type Adapter struct { Request *http.Request ResponseWriter http.ResponseWriter Logger *slog.Logger DB *sql.DB Ctx context.Context Cancel context.CancelFunc ErrorInResponse bool LogDBQueries bool // contains filtered or unexported fields }
func (*Adapter) HTTPToContextHandler ¶
func (a *Adapter) HTTPToContextHandler(h func(*Adapter) error) http.HandlerFunc
Create an adapter function
type IPRateLimiter ¶
type IPRateLimiter struct {
// contains filtered or unexported fields
}
1. Simple rate limiter per IP
func NewIPRateLimiter ¶
func NewIPRateLimiter(r rate.Limit, b int) *IPRateLimiter
Click to show internal directories.
Click to hide internal directories.