validator

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFatal = errFatal("fatal error")

Functions

This section is empty.

Types

type Check added in v0.10.0

type Check struct {
	Title   string `json:"title"`
	Run     bool   `json:"run"`
	Passed  bool   `json:"passed"`
	Message string `json:"message,omitempty"`
}

type ColumnMetdataMap added in v0.10.0

type ColumnMetdataMap map[string]map[string]any

type ColumnValueRule added in v0.14.0

type ColumnValueRule[T any] struct {
	// contains filtered or unexported fields
}

func (*ColumnValueRule[T]) Init added in v0.14.0

func (r *ColumnValueRule[T]) Init(info *FileInfo)

func (*ColumnValueRule[T]) Title added in v0.14.0

func (r *ColumnValueRule[T]) Title() string

func (*ColumnValueRule[T]) Validate added in v0.14.0

func (r *ColumnValueRule[T]) Validate() error

func (*ColumnValueRule[T]) Value added in v0.14.0

func (r *ColumnValueRule[T]) Value(name string, data T) error

type FileInfo added in v0.10.0

type FileInfo struct {
	File     *file.Reader
	Metadata *geoparquet.Metadata
}

type GenericRule added in v0.10.0

type GenericRule[T RuleData] struct {
	// contains filtered or unexported fields
}

func (*GenericRule[T]) Init added in v0.10.0

func (r *GenericRule[T]) Init(value T)

func (*GenericRule[T]) Title added in v0.10.0

func (r *GenericRule[T]) Title() string

func (*GenericRule[T]) Validate added in v0.10.0

func (r *GenericRule[T]) Validate() error

type MetadataMap added in v0.10.0

type MetadataMap map[string]any

type Report added in v0.10.0

type Report struct {
	Checks       []*Check `json:"checks"`
	MetadataOnly bool     `json:"metadataOnly"`
}

type Rule added in v0.10.0

type Rule interface {
	Title() string
	Validate() error
}

func DataScanningRules added in v0.10.0

func DataScanningRules() []Rule

func GeometryBounds added in v0.10.0

func GeometryBounds() Rule

func GeometryDataType added in v0.10.0

func GeometryDataType() Rule

func GeometryEncoding added in v0.10.0

func GeometryEncoding() Rule

func GeometryOrientation added in v0.10.0

func GeometryOrientation() Rule

func GeometryRepetition added in v0.10.0

func GeometryRepetition() Rule

func GeometryTypes added in v0.10.0

func GeometryTypes() Rule

func GeometryUngrouped added in v0.10.0

func GeometryUngrouped() Rule

func MetadataOnlyRules added in v0.10.0

func MetadataOnlyRules() []Rule

func OptionalBbox added in v0.10.0

func OptionalBbox() Rule

func OptionalCRS added in v0.10.0

func OptionalCRS() Rule

func OptionalEdges added in v0.10.0

func OptionalEdges() Rule

func OptionalEpoch added in v0.10.0

func OptionalEpoch() Rule

func OptionalOrientation added in v0.10.0

func OptionalOrientation() Rule

func PrimaryColumnInLookup added in v0.10.0

func PrimaryColumnInLookup() Rule

func RequiredColumnEncoding added in v0.10.0

func RequiredColumnEncoding() Rule

func RequiredColumns added in v0.10.0

func RequiredColumns() Rule

func RequiredGeoKey added in v0.10.0

func RequiredGeoKey() Rule

func RequiredGeometryTypes added in v0.10.0

func RequiredGeometryTypes() Rule

func RequiredMetadataType added in v0.10.0

func RequiredMetadataType() Rule

func RequiredPrimaryColumn added in v0.10.0

func RequiredPrimaryColumn() Rule

func RequiredVersion added in v0.10.0

func RequiredVersion() Rule

type RuleData added in v0.10.0

type RuleData interface {
	*file.Reader | MetadataMap | ColumnMetdataMap | *FileInfo
}

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func New

func New(metadataOnly bool) *Validator

New creates a new Validator.

func (*Validator) Report added in v0.10.0

func (v *Validator) Report(ctx context.Context, file *file.Reader) (*Report, error)

Report generates a validation report for a GeoParquet file.

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context, input parquet.ReaderAtSeeker, name string) (*Report, error)

Validate opens and validates a GeoParquet file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL