Documentation
¶
Overview ¶
Package authorityattribution holds shared attribution dimensions, matchers, and readiness aggregation used by usage authority, concurrency authority, and authority coordination.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateReadiness ¶
AggregateReadiness picks the most severe readiness among inputs.
func IsSafeLabelKey ¶
IsSafeLabelKey reports whether key is safe as a policy-label dimension key.
func ReadinessRank ¶
ReadinessRank returns the severity rank for one readiness value. Canonical order: ready (0) < degraded (1) < disabled (2) < unavailable (3).
Types ¶
type DimensionKey ¶
type DimensionKey string
DimensionKey is a deterministic encoding of Dimensions.
type DimensionMatcher ¶
DimensionMatcher matches one attribution field.
type Dimensions ¶
type Dimensions struct {
Principal scope.Value
Credential scope.Value
Tenant scope.Value
Organization scope.Value
Workspace scope.Value
Project scope.Value
Department scope.Value
CostCenter scope.Value
Backend scope.Value
Model scope.Value
Route scope.Value
PolicyLabels map[string]scope.Value
}
Dimensions are safe attribution fields for rule matching and identity.
func DimensionsFromScope ¶
func DimensionsFromScope(view scope.PrincipalScopeView) Dimensions
DimensionsFromScope projects a principal scope view onto dimensions.
func (Dimensions) Key ¶
func (d Dimensions) Key() DimensionKey
Key returns a deterministic dimension encoding. Invalid label keys are omitted.
func (Dimensions) KeyErr ¶
func (d Dimensions) KeyErr() (DimensionKey, error)
KeyErr returns a deterministic dimension encoding or an error for unsafe labels.
type DimensionsMatcher ¶
type DimensionsMatcher struct {
Principal DimensionMatcher
Credential DimensionMatcher
Tenant DimensionMatcher
Organization DimensionMatcher
Workspace DimensionMatcher
Project DimensionMatcher
Department DimensionMatcher
CostCenter DimensionMatcher
Backend DimensionMatcher
Model DimensionMatcher
Route DimensionMatcher
Labels map[string]DimensionMatcher
}
DimensionsMatcher is a safe multi-dimension rule matcher.
func (DimensionsMatcher) Matches ¶
func (m DimensionsMatcher) Matches(actual Dimensions) bool
Matches reports whether actual satisfies every configured matcher.