validator

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: GPL-3.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command added in v0.8.5

type Command struct {
	Options Options

	OutputFile string
	// contains filtered or unexported fields
}

Command

func (*Command) Parse added in v0.8.5

func (cmd *Command) Parse(args []string) error

func (*Command) Run added in v0.8.5

func (cmd *Command) Run() error

type Options added in v0.8.0

type Options struct {
	BestPractices            bool
	CheckFileLimits          bool
	IncludeServiceLevels     bool
	IncludeEntities          bool
	IncludeEntitiesLimit     int
	IncludeRouteGeometries   bool
	ValidateRealtimeMessages []string
	copier.Options
}

Options defines options for the Validator.

type Result added in v0.8.0

type Result struct {
	copier.Result                                       // add to copier result:
	Success              bool                           `json:"success"`
	FailureReason        string                         `json:"failure_reason"`
	SHA1                 string                         `json:"sha1"`
	EarliestCalendarDate tl.Date                        `json:"earliest_calendar_date"`
	LatestCalendarDate   tl.Date                        `json:"latest_calendar_date"`
	Agencies             []tl.Agency                    `json:"agencies"`
	Routes               []tl.Route                     `json:"routes"`
	Stops                []tl.Stop                      `json:"stops"`
	FeedInfos            []tl.FeedInfo                  `json:"feed_infos"`
	Files                []dmfr.FeedVersionFileInfo     `json:"files"`
	ServiceLevels        []dmfr.FeedVersionServiceLevel `json:"service_levels"`
}

Result contains a validation report result,

type Validator

type Validator struct {
	Reader  tl.Reader
	Options Options
	// contains filtered or unexported fields
}

Validator checks a GTFS source for errors and warnings.

func NewValidator

func NewValidator(reader tl.Reader, options Options) (*Validator, error)

NewValidator returns a new Validator.

func (*Validator) AddExtension added in v0.8.5

func (v *Validator) AddExtension(ext interface{}) error

func (*Validator) Validate

func (v *Validator) Validate() (*Result, error)

Validate performs a basic validation, as well as optional extended reports.

Jump to

Keyboard shortcuts

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