tenant

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tenant provides tenant context management for multi-tenancy.

Index

Constants

View Source
const DefaultTenantID = "local"

DefaultTenantID is the default tenant ID for single-tenant mode.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) string

FromContext returns the tenant ID from the context. Returns DefaultTenantID ("local") if not set.

func WithTenantID

func WithTenantID(ctx context.Context, tenantID string) context.Context

WithTenantID returns a new context with the tenant ID set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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