Documentation
¶
Overview ¶
Package specvalidation owns the shared structural grant/session contract. It has no dependency on the CRDs or access manager, so both admission and platform request boundaries can use it without an import cycle.
Index ¶
- func ModeError(mode *string, boundary Boundary) error
- func TeamIDField(path *field.Path, value string) *field.Error
- func ValidDecision(value string) bool
- func ValidSideEffect(value string) bool
- func ValidTrust(value string) bool
- type Boundary
- type Grant
- type PrimitiveRule
- type Result
- type SecretKeyRef
- type Session
- type Subject
- type ToolRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TeamIDField ¶
TeamIDField validates a stable identifier without normalizing persisted data. Request boundaries trim their input before calling the same predicate.
func ValidDecision ¶
func ValidSideEffect ¶
func ValidTrust ¶
Types ¶
type Boundary ¶
type Boundary uint8
Boundary preserves the existing contracts: admission permits legacy wildcard grants and empty side-effect lists; platform apply requires explicit intent.
type PrimitiveRule ¶
type PrimitiveRule struct{ Kind, Pattern, Decision string }
type Result ¶
type Result []violation
Result retains Kubernetes field causes and the existing platform error text.
func ValidateGrant ¶
ValidateGrant does not default or mutate the input. Normalization belongs to the platform request boundary; admission validates the submitted spec as-is.
func ValidatePrimitiveRules ¶
func ValidatePrimitiveRules(rules []PrimitiveRule) Result
ValidatePrimitiveRules checks resource, prompt and skill rules. It is shared by admission, platform apply and `server validate`, so every entry point agrees on what a valid rule is.
func ValidateSession ¶
func (Result) FieldErrors ¶
func (Result) FirstError ¶
type SecretKeyRef ¶
type SecretKeyRef struct{ Name, Key string }