Documentation
¶
Index ¶
Constants ¶
const ( SortAsc = "asc" SortDesc = "desc" )
Standardized sort directions. The empty string (default/omitted) means no sort.
Variables ¶
This section is empty.
Functions ¶
func ValidateSortDirection ¶ added in v1.3.3
ValidateSortDirection returns nil if s is empty, SortAsc, or SortDesc; otherwise it returns an error listing the valid values. Empty is treated as valid because callers conventionally use it to mean "no sort".
Types ¶
type EntityCopier ¶ added in v1.0.0
type EntityReader ¶ added in v1.0.0
type EntityReader interface {
Open() error
Close() error
ValidateStructure() []error
String() string
ReadEntities(c interface{}) error
}
EntityReader defines methods for opening a reader, validating its structure, and reading entities through reflection
type GtfsReader ¶ added in v1.0.0
type GtfsReader interface {
gtfs.Reader
StopTimesByTripID(...string) chan []gtfs.StopTime
ShapesByShapeID(...string) chan []gtfs.Shape
}
GtfsReader defines methods for accessing core GTFS entities
type Reader ¶
type Reader interface {
EntityReader
GtfsReader
}
Reader is the main interface for reading GTFS data
type SortableWriter ¶ added in v1.3.3
type SortableWriter interface {
SetStandardizedSortOptions(StandardizedSortOptions)
}
SortableWriter is the minimal interface for accepting a sort config.
type StandardizedSortOptions ¶ added in v1.3.3
type Writer ¶
type Writer interface {
Open() error
Close() error
Create() error
Delete() error
NewReader() (Reader, error)
AddEntity(tt.Entity) (string, error)
AddEntities([]tt.Entity) ([]string, error)
String() string
}
Writer writes a GTFS feed.
type WriterWithExtraColumns ¶
type WriterWithStandardizedSort ¶ added in v1.3.3
type WriterWithStandardizedSort interface {
Writer
SortableWriter
}
WriterWithStandardizedSort is a full Writer that also accepts sort config.