scopes

package
v1.69.14 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TenancyPartition

func TenancyPartition(ctx context.Context) func(db *gorm.DB) *gorm.DB

TenancyPartition applies tenant and partition filtering to database queries.

Behavior:

  • If no claims in context: returns unscoped db (for cross-tenant services)
  • If skip tenancy enabled: returns unscoped db (for backend services processing across tenants)
  • For internal systems: claims are auto-enriched with secondary claims tenancy data
  • Empty tenant_id/partition_id will match only records with empty values (no cross-tenant leakage)

Types

This section is empty.

Jump to

Keyboard shortcuts

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