validation

package
v0.0.0-...-09900dc Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAvailableTypes

func GetAvailableTypes() []string

func Register

func Register(name string, validator Validator)

Types

type Error

type Error struct {
	Message string
	Record  uint32
	Column  string
}

func (Error) String

func (e Error) String() string

type ErrorCollection

type ErrorCollection struct {
	Errors map[string][]Error
}

func NewErrorCollection

func NewErrorCollection() ErrorCollection

func (ErrorCollection) FileError

func (ec ErrorCollection) FileError(
	file string,
	message string,
	params ...interface{},
)

func (ErrorCollection) FileHasErrors

func (ec ErrorCollection) FileHasErrors(file string) bool

func (ErrorCollection) GetFiles

func (ec ErrorCollection) GetFiles() []string

func (ErrorCollection) HasErrors

func (ec ErrorCollection) HasErrors() bool

func (ErrorCollection) RecordError

func (ec ErrorCollection) RecordError(
	file string,
	record uint32,
	message string,
	params ...interface{},
)

func (ErrorCollection) ValueError

func (ec ErrorCollection) ValueError(
	file string,
	record uint32,
	column string,
	message string,
	params ...interface{},
)

type Validator

type Validator func(path string, files []string) ErrorCollection

func NewValidator

func NewValidator(datasetType string) Validator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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