identity

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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). 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

View Source
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.

From extracts the Identity from ctx, reporting presence.

View Source
var MustFrom = internal.MustFrom

MustFrom extracts the Identity from ctx, panicking with ErrIdentityMissing when absent (handler-only).

View Source
var MustQuadrupleFrom = internal.MustQuadrupleFrom

MustQuadrupleFrom extracts the Quadruple from ctx, panicking with ErrIdentityMissing when absent (handler-only).

View Source
var QuadrupleFrom = internal.QuadrupleFrom

QuadrupleFrom extracts the Quadruple from ctx, reporting presence.

View Source
var Validate = internal.Validate

Validate fails closed when any component of the triple is empty.

With returns a child context carrying the validated Identity.

View Source
var WithRun = internal.WithRun

WithRun returns a child context carrying the validated Identity plus the run ID (the Quadruple).

Functions

This section is empty.

Types

type Identity

type Identity = internal.Identity

Identity is the mandatory (TenantID, UserID, SessionID) isolation triple. Alias of the internal type; see internal/identity.

type Quadruple

type Quadruple = internal.Quadruple

Quadruple carries Identity plus the per-execution RunID. Alias of the internal type; see internal/identity.

Jump to

Keyboard shortcuts

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