Documentation
¶
Overview ¶
Package validator implements a STAC resource validation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // Limit to the number of resources to fetch and validate concurrently. Concurrency int // Set to true to validate a single resource and avoid validating all linked resources. NoRecursion bool // A lookup of substitute schema locations. The key is the original schema location // and the value is the substitute location. SchemaMap map[string]string // Logger to use for logging. Logger *logr.Logger }
Options for the Validator.
type ValidationError ¶
type ValidationError struct { *jsonschema.ValidationError // Location is the file path or URL to the resource that failed validation. Location string // The resource being crawled. Resource crawler.Resource }
ValidationError holds details about a validation error.
func (*ValidationError) GoString ¶
func (err *ValidationError) GoString() string
GoString provides additional detail about the validation error.
Called when the # flag is used with the %v verb as in fmt.Printf("%#v", err).
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator allows validation of STAC resources.
func (*Validator) Validate ¶
Validate validates a STAC resource.
The resource can be a path to a local file or a URL. Validation will stop with the first invalid resource and the resulting ValidationError will be returned. Context cancellation will also stop validation and the context error will be returned.
Click to show internal directories.
Click to hide internal directories.