Documentation
¶
Overview ¶
Package validation contains shared structured validation errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONPointer ¶
JSONPointer builds an RFC 6901 JSON Pointer from unescaped reference tokens.
Types ¶
type Errors ¶
type Errors struct {
Violations []Violation `json:"violations"`
// contains filtered or unexported fields
}
Errors contains every violation found in one validation phase.
type Rule ¶
type Rule string
Rule identifies a stable validation rule.
const ( RuleDecode Rule = "decode" RuleSchema Rule = "schema" RulePattern Rule = "pattern" RuleSemVer Rule = "semver" RuleVersionRange Rule = "version-range" RuleSPDX Rule = "spdx" RuleDuplicate Rule = "duplicate" RuleNamespaceScope Rule = "namespace-scope" RuleSelfDependency Rule = "self-dependency" RuleRepositoryDirectory Rule = "repository-directory" RuleRepositoryURL Rule = "repository-url" RuleSourcePath Rule = "source-path" RuleTag Rule = "git-tag" RuleIdentity Rule = "identity" RuleReference Rule = "reference" RulePackagePath Rule = "package-path" RuleSource Rule = "source" RuleTimestamp Rule = "timestamp" )
type Scope ¶
type Scope string
Scope identifies the subject of a validation failure.
const ( // ScopeManifest identifies module manifest validation. ScopeManifest Scope = "manifest" // ScopeRegistry identifies Registry source document validation. ScopeRegistry Scope = "registry" // ScopeRegistryArtifact identifies Registry distribution artifact validation. ScopeRegistryArtifact Scope = "registry artifact" // ScopeAPICatalog identifies API Catalog artifact validation. ScopeAPICatalog Scope = "API catalog" )
Click to show internal directories.
Click to hide internal directories.