validate

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCsvRowLengths

func CheckCsvRowLengths(r io.Reader) error

CheckCsvRowLengths ensures that csv input has the same number of columns in every row and otherwise returns an error

func Commit

func Commit(cm *dataset.Commit) error

Commit checks that a dataset Commit is valid for use returning the first error encountered, nil if valid

func Dataset

func Dataset(ds *dataset.Dataset) error

Dataset checks that a dataset is valid for use returning the first error encountered, nil if valid

func EntryReader

func EntryReader(r dsio.EntryReader) ([]jsonschema.KeyError, error)

EntryReader consumes a reader & returns any validation errors present TODO - refactor this to wrap a reader & return a struct that gives an error or nil on each entry read.

func Schema

func Schema(sch map[string]interface{}) error

Schema checks that a dataset schema is valid for use returning the first error encountered, nil if valid

func Structure

func Structure(s *dataset.Structure) error

Structure checks that a dataset structure is valid for use returning the first error encountered, nil if valid

func ValidName

func ValidName(name string) error

ValidName checks for a valid variable name names must: * start with a letter * consist of only alpha-numeric characters and/or underscores * have a total length of no more than 144 characters

Types

This section is empty.

Jump to

Keyboard shortcuts

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