Documentation
¶
Overview ¶
Package contract holds shared checks below portable models and artifact validation.
Index ¶
- Constants
- Variables
- func DigestBytes(data []byte) string
- func EvidenceImplementation(id, version, digest string) bool
- func EvidenceToken(value string) bool
- func IsJSONNull(raw json.RawMessage) bool
- func IsValidDigest(value string) bool
- func RequiredObject(data []byte, required string) (map[string]json.RawMessage, string)
- func UnsafeInjectionEnv(name string) bool
- func ValidateContentPath(value string) (string, error)
Constants ¶
View Source
const MaxPathBytes = 1024
Variables ¶
View Source
var ( IdentifierPattern = regexp.MustCompile(`^[a-z0-9][a-z0-9._-]{0,127}$`) EnvPattern = regexp.MustCompile(`^[A-Z_][A-Z0-9_]*$`) )
Functions ¶
func DigestBytes ¶
func EvidenceImplementation ¶
EvidenceImplementation checks the same public implementation identity used by runtime profiles and evaluation evidence without depending on either model.
func EvidenceToken ¶
func IsJSONNull ¶
func IsJSONNull(raw json.RawMessage) bool
func IsValidDigest ¶
func RequiredObject ¶
RequiredObject preserves missing-before-null refusal ordering. Every present field, not only required ones, must be non-null. Codes are interpreted by the caller so model errors and sanitized evidence refusals keep their own types.
func UnsafeInjectionEnv ¶
func ValidateContentPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.