Documentation
¶
Overview ¶
Package identity is the public SDK facade over Harbor's internal/identity package — the load-bearing (tenant, user, session) isolation triple plus the per-run Quadruple (RFC §3.6, §4; D-204). Alias-based re-exports only: no behavior lives here. What this package omits from the internal surface is deliberately private (the curation contract).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrIdentityMissing — the context carries no Identity and no Quadruple. ErrIdentityMissing = internal.ErrIdentityMissing // ErrIdentityIncomplete — one or more identity components are empty. ErrIdentityIncomplete = internal.ErrIdentityIncomplete )
Re-exported sentinel errors callers compare via errors.Is.
var From = internal.From
From extracts the Identity from ctx, reporting presence.
var MustFrom = internal.MustFrom
MustFrom extracts the Identity from ctx, panicking with ErrIdentityMissing when absent (handler-only).
var MustQuadrupleFrom = internal.MustQuadrupleFrom
MustQuadrupleFrom extracts the Quadruple from ctx, panicking with ErrIdentityMissing when absent (handler-only).
var QuadrupleFrom = internal.QuadrupleFrom
QuadrupleFrom extracts the Quadruple from ctx, reporting presence.
var Validate = internal.Validate
Validate fails closed when any component of the triple is empty.
var With = internal.With
With returns a child context carrying the validated Identity.
var WithRun = internal.WithRun
WithRun returns a child context carrying the validated Identity plus the run ID (the Quadruple).
Functions ¶
This section is empty.