Documentation
¶
Index ¶
- type ConditionallyRequiredFieldError
- type Context
- type DuplicateIDError
- type EmptyTripError
- type FieldParseError
- type FileDuplicateFieldError
- type FileNotPresentError
- type FileParseError
- type FileRequiredError
- type FileRequiredFieldError
- type FileUnreadableError
- type InconsistentTimezoneError
- type InvalidFarezoneError
- type InvalidFieldError
- type InvalidParentStationError
- type InvalidReferenceError
- type RequiredFieldError
- type SequenceError
- type SourceUnreadableError
- type UnusedEntityError
- type ValidationWarning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionallyRequiredFieldError ¶
type ConditionallyRequiredFieldError struct {
// contains filtered or unexported fields
}
ConditionallyRequiredFieldError reports an empty, conditionally required field.
func NewConditionallyRequiredFieldError ¶
func NewConditionallyRequiredFieldError(field string) *ConditionallyRequiredFieldError
NewConditionallyRequiredFieldError returns a new ConditionallyRequiredFieldError
func (*ConditionallyRequiredFieldError) Error ¶
func (e *ConditionallyRequiredFieldError) Error() string
type Context ¶
type Context struct { Filename string Line int EntityID string Field string Value string Message string }
Context adds structured context.
type DuplicateIDError ¶
type DuplicateIDError struct {
// contains filtered or unexported fields
}
DuplicateIDError reports when a unique ID is used more than once in a file.
func NewDuplicateIDError ¶
func NewDuplicateIDError(eid string) *DuplicateIDError
NewDuplicateIDError returns a new DuplicateIDErrror
func (*DuplicateIDError) Error ¶
func (e *DuplicateIDError) Error() string
type EmptyTripError ¶
type EmptyTripError struct {
// contains filtered or unexported fields
}
EmptyTripError reports when a trip has one or zero stop times.
func NewEmptyTripError ¶
func NewEmptyTripError(length int) *EmptyTripError
NewEmptyTripError returns a new EmptyTripError
func (*EmptyTripError) Error ¶
func (e *EmptyTripError) Error() string
type FieldParseError ¶
type FieldParseError struct {
// contains filtered or unexported fields
}
FieldParseError reports a value that cannot be parsed
func NewFieldParseError ¶
func NewFieldParseError(field string, value string) *FieldParseError
NewFieldParseError returns a new FieldParseError
func (*FieldParseError) Error ¶
func (e *FieldParseError) Error() string
type FileDuplicateFieldError ¶
type FileDuplicateFieldError struct {
// contains filtered or unexported fields
}
FileDuplicateFieldError reports when a file contains multiple columns with the same name
func NewFileDuplicateFieldError ¶
func NewFileDuplicateFieldError(filename string, field string) *FileDuplicateFieldError
NewFileDuplicateFieldError returns a new DuplicateFieldError
func (*FileDuplicateFieldError) Error ¶
func (e *FileDuplicateFieldError) Error() string
type FileNotPresentError ¶
type FileNotPresentError struct {
// contains filtered or unexported fields
}
FileNotPresentError is returned when a file is not present
func NewFileNotPresentError ¶
func NewFileNotPresentError(filename string) *FileNotPresentError
NewFileNotPresentError returns a new FileNotPresentError
func (*FileNotPresentError) Error ¶
func (e *FileNotPresentError) Error() string
type FileParseError ¶
type FileParseError struct {
// contains filtered or unexported fields
}
FileParseError reports an error parsing a row
func NewFileParseError ¶
func NewFileParseError(line int, err error) *FileParseError
NewFileParseError returns a new FileParseError
func (*FileParseError) Error ¶
func (e *FileParseError) Error() string
type FileRequiredError ¶
type FileRequiredError struct {
// contains filtered or unexported fields
}
FileRequiredError reports a required file is not present
func NewFileRequiredError ¶
func NewFileRequiredError(filename string) *FileRequiredError
NewFileRequiredError returns a new FileRequiredError
func (*FileRequiredError) Error ¶
func (e *FileRequiredError) Error() string
type FileRequiredFieldError ¶
type FileRequiredFieldError struct {
// contains filtered or unexported fields
}
FileRequiredFieldError reports when a file does not have a required column
func NewFileRequiredFieldError ¶
func NewFileRequiredFieldError(filename string, field string) *FileRequiredFieldError
NewFileRequiredFieldError returns a new FileRequiredFieldError
func (*FileRequiredFieldError) Error ¶
func (e *FileRequiredFieldError) Error() string
type FileUnreadableError ¶
type FileUnreadableError struct {
// contains filtered or unexported fields
}
FileUnreadableError reports an error parsing a row
func NewFileUnreadableError ¶
func NewFileUnreadableError(filename string, err error) *FileUnreadableError
NewFileUnreadableError returns a new FileUnreadableError
func (*FileUnreadableError) Error ¶
func (e *FileUnreadableError) Error() string
type InconsistentTimezoneError ¶
type InconsistentTimezoneError struct {
// contains filtered or unexported fields
}
InconsistentTimezoneError reports when agency.txt has more than 1 timezone present.
func NewInconsistentTimezoneError ¶
func NewInconsistentTimezoneError(value string) *InconsistentTimezoneError
NewInconsistentTimezoneError returns a new InconsistentTimezoneError.
func (*InconsistentTimezoneError) Error ¶
func (e *InconsistentTimezoneError) Error() string
type InvalidFarezoneError ¶
type InvalidFarezoneError struct {
// contains filtered or unexported fields
}
InvalidFarezoneError reports when a farezone does not exist.
func NewInvalidFarezoneError ¶
func NewInvalidFarezoneError(field string, value string) *InvalidFarezoneError
NewInvalidFarezoneError returns a new InvalidFarezoneError
func (*InvalidFarezoneError) Error ¶
func (e *InvalidFarezoneError) Error() string
type InvalidFieldError ¶
type InvalidFieldError struct {
// contains filtered or unexported fields
}
InvalidFieldError reports an invalid value for a field
func NewInvalidFieldError ¶
func NewInvalidFieldError(field string, value string, err error) *InvalidFieldError
NewInvalidFieldError returns a new InvalidFieldError
func (*InvalidFieldError) Error ¶
func (e *InvalidFieldError) Error() string
type InvalidParentStationError ¶
type InvalidParentStationError struct {
// contains filtered or unexported fields
}
InvalidParentStationError reports when a parent station is not location_type = 1.
func NewInvalidParentStationError ¶
func NewInvalidParentStationError(value string) *InvalidParentStationError
NewInvalidParentStationError returns a new InvalidParentStationError
func (*InvalidParentStationError) Error ¶
func (e *InvalidParentStationError) Error() string
type InvalidReferenceError ¶
type InvalidReferenceError struct {
// contains filtered or unexported fields
}
InvalidReferenceError reports when an entity makes an invalid reference
func NewInvalidReferenceError ¶
func NewInvalidReferenceError(field string, eid string) *InvalidReferenceError
NewInvalidReferenceError returns a new InvalidReferenceError
func (*InvalidReferenceError) Error ¶
func (e *InvalidReferenceError) Error() string
type RequiredFieldError ¶
type RequiredFieldError struct {
// contains filtered or unexported fields
}
RequiredFieldError reports a required field does not have a value
func NewRequiredFieldError ¶
func NewRequiredFieldError(field string) *RequiredFieldError
NewRequiredFieldError returns a new RequiredFieldError
func (*RequiredFieldError) Error ¶
func (e *RequiredFieldError) Error() string
type SequenceError ¶
type SequenceError struct {
// contains filtered or unexported fields
}
SequenceError reports an invalid shapes.txt or stop_times.txt sequence
func NewSequenceError ¶
func NewSequenceError(field string, value string) *SequenceError
NewSequenceError returns a new SequenceError
func (*SequenceError) Error ¶
func (e *SequenceError) Error() string
type SourceUnreadableError ¶
type SourceUnreadableError struct {
// contains filtered or unexported fields
}
SourceUnreadableError reports when the archive itself cannot be read
func NewSourceUnreadableError ¶
func NewSourceUnreadableError(message string, err error) *SourceUnreadableError
NewSourceUnreadableError returns a new SourceUnreadableError
func (*SourceUnreadableError) Error ¶
func (e *SourceUnreadableError) Error() string
type UnusedEntityError ¶
type UnusedEntityError struct {
// contains filtered or unexported fields
}
UnusedEntityError reports when an entity is present but not referenced.
func NewUnusedEntityError ¶
func NewUnusedEntityError(eid string) *UnusedEntityError
NewUnusedEntityError returns a new UnusedEntityError
func (*UnusedEntityError) Error ¶
func (e *UnusedEntityError) Error() string
type ValidationWarning ¶
type ValidationWarning struct {
// contains filtered or unexported fields
}
ValidationWarning reports warning messages or informational messages.
func NewValidationWarning ¶
func NewValidationWarning(field string, message string) *ValidationWarning
NewValidationWarning returns a new ValidationWarning
func (*ValidationWarning) Error ¶
func (e *ValidationWarning) Error() string