middleware

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(next http.Handler) http.Handler

DB injects the database connection into the request context.

func InferScope

func InferScope(next http.Handler) http.HandlerFunc

InferScope determines whether the request is tenant- or org-scoped based on which header is present, and scopes the request accordingly. It is intended for endpoints that support both tenant and org scope.

func Scope

func Scope(level scope.Scope, next http.Handler) http.HandlerFunc

Scope reads the scope header for the given level, validates the tenant/org, and stores the level and id in the request context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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