Documentation
¶
Overview ¶
Package validator is the entry point other code should call. It loads the embedded JSON schema for the requested kind, runs the data through santhosh-tekuri/jsonschema, and then layers any Go-coded rules on top. The orchestration lives here so CLI, tests, and third-party importers all see the same validation surface.
Index ¶
Constants ¶
View Source
const ( KindPlugin = schema.KindPlugin KindMarketplace = schema.KindMarketplace )
Re-exported so callers only need to import internal/validator.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Kind selects plugin or marketplace schema.
Kind Kind
// Marketplace, if non-empty, layers that marketplace's rule overlay on
// top of the base rule set (see rules.ForMarketplace).
Marketplace string
// File is a display path used only for error messages.
File string
}
Options customises a single validation run.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator wraps a compiled JSON schema and the rule set that go with it. Reuse a single Validator across many files to avoid re-compiling.
Click to show internal directories.
Click to hide internal directories.