1
0
forked from wrenn/wrenn
Reviewed-on: wrenn/wrenn#33
This commit is contained in:
2026-04-18 08:57:07 +00:00
parent 512c043c5c
commit 23dca7d9ff
18 changed files with 1018 additions and 129 deletions

View File

@ -5,6 +5,7 @@ package cpextension
import (
"context"
"net/http"
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5/pgxpool"
@ -48,3 +49,10 @@ type Extension interface {
// Each function should start its own goroutine(s) and return.
BackgroundWorkers(ctx ServerContext) []func(context.Context)
}
// MiddlewareProvider is optionally implemented by extensions that need
// middleware applied before OSS routes are registered. This allows
// cloud middleware to wrap existing OSS routes (e.g. billing checks).
type MiddlewareProvider interface {
Middlewares(ctx ServerContext) []func(http.Handler) http.Handler
}