Documentation
¶
Index ¶
- Constants
- func AuthorizationHandler(options AuthzOptions) fiber.Handler
- func ClassifyError(ctx context.Context, err error) errorapi.APIError
- func FiberErrorHandler(c fiber.Ctx, err error) error
- func HandleError(c fiber.Ctx, err error) error
- func NewAPIError(ctx context.Context, code errorapi.ErrorCode, status int, msg string) errorapi.APIError
- func RegisterRoutes(app fiber.Router, deps Dependencies, options Options)
- func Reject(c fiber.Ctx, status int, msg string) error
- func RequestIDHandler(logger *slog.Logger) fiber.Handler
- type AuthzOptions
- type Dependencies
- type Health
- type LFSOptions
- type Options
Constants ¶
const ( RouteHealthz = "/healthz" RouteLivez = "/livez" RouteReadyz = "/readyz" )
Variables ¶
This section is empty.
Functions ¶
func AuthorizationHandler ¶ added in v0.4.2
func AuthorizationHandler(options AuthzOptions) fiber.Handler
AuthorizationHandler installs the access session and applies evaluator decisions at the Fiber boundary.
func ClassifyError ¶ added in v0.4.2
ClassifyError converts an application error into the public API error envelope. The original error remains available to the boundary logger and is never used as a response message for server failures.
func FiberErrorHandler ¶ added in v0.4.2
FiberErrorHandler converts errors returned through Fiber into the same API error contract used by explicit handler rejections.
func NewAPIError ¶ added in v0.4.2
func NewAPIError(ctx context.Context, code errorapi.ErrorCode, status int, msg string) errorapi.APIError
NewAPIError builds the shared wire payload for Fiber and generated handlers.
func RegisterRoutes ¶
func RegisterRoutes(app fiber.Router, deps Dependencies, options Options)
Types ¶
type AuthzOptions ¶ added in v0.4.2
type Dependencies ¶
type Dependencies struct {
ServiceInfo generated.N200ServiceInfo
Objects *objects.Service
Transfers *transfers.Service
LFS *transferlfs.Service
UsageIngest usage.Ingestor
UsageReports usage.Reporter
Buckets *buckets.Service
ProjectStorage *projectstorage.Service
Authorization fiber.Handler
RequestIDs fiber.Handler
Health *Health
}
type Health ¶ added in v0.4.2
type Health struct {
// contains filtered or unexported fields
}
Health owns process-serving state separately from dependency readiness. Liveness never performs I/O; readiness performs one bounded dependency check and is flipped false before owned resources are closed.
func (*Health) StopServing ¶ added in v0.4.2
func (h *Health) StopServing()