Documentation
¶
Overview ¶
Package tenancy defines tier-neutral organization scoping primitives.
Index ¶
Constants ¶
const DefaultOrgID = "default"
DefaultOrgID is the organization used when no explicit organization is supplied. It preserves the single-tenant OSS data layout.
Variables ¶
This section is empty.
Functions ¶
func NormalizeOrgID ¶
NormalizeOrgID returns a non-empty organization ID.
Types ¶
type OrgScope ¶
OrgScope is the ordered set of organizations a data read may see. Write is where new records go. Read is ordered by precedence, with Write first.
func DefaultOrgScope ¶
func DefaultOrgScope() OrgScope
DefaultOrgScope returns the single-tenant OSS scope.
func NewOrgScope ¶
NewOrgScope constructs a normalized scope. The write organization is always first, blank read organizations normalize to default, and duplicates are removed without changing precedence.
func (OrgScope) Normalized ¶
Normalized returns a valid, independently owned copy of the scope.