Documentation ¶
Overview ¶
Package convert contains type converters.
Index ¶
- func AlertCause(cause string) api.Alert_Cause
- func AlertEffect(effect string) api.Alert_Effect
- func AlertText(s string) []*api.Alert_Text
- func ApiCongestionLevel(t string) api.Vehicle_CongestionLevel
- func ApiShape(shape *gtfs.Shape) *api.Shape
- func BikesAllowed(bikesAllowed gtfs.BikesAllowed) pgtype.Bool
- func Bool(b bool) pgtype.Bool
- func CongestionLevel(congestionLevel gtfs.CongestionLevel) string
- func ContinuousPolicy(p string) api.Route_ContinuousPolicy
- func Date(t time.Time) pgtype.Date
- func DirectionID(d gtfs.DirectionID) pgtype.Bool
- func Duration(d time.Duration) pgtype.Int4
- func ExactTimesToIsFrequencyBased(exactTime gtfs.ExactTimes) bool
- func FeedUpdateStatus(logger *slog.Logger, result pgtype.Text) *api.FeedUpdate_Status
- func Gps[T float32 | float64](longitude, latitude *T) types.Geography
- func GtfsRealtimeExtension(in *api.GtfsRealtimeOptions) (extensions.Extension, error)
- func JSONShapeToApiShape(bytes []byte) (*api.Shape, error)
- func NullApiCurrentStatus(t pgtype.Text) *api.Vehicle_CurrentStatus
- func NullApiOccupancyStatus(t pgtype.Text) *api.Vehicle_OccupancyStatus
- func NullBool(t *bool) pgtype.Bool
- func NullCongestionLevel(congestionLevel *gtfs.CongestionLevel) string
- func NullDuration(d *time.Duration) pgtype.Int4
- func NullFloat32(t *float32) pgtype.Float4
- func NullFloat64(t *float64) pgtype.Float8
- func NullIfEmptyString(t string) pgtype.Text
- func NullInt32(t *int32) pgtype.Int4
- func NullInt64(t *int64) pgtype.Int8
- func NullOccupancyStatus(occupancyStatus *gtfs.OccupancyStatus) pgtype.Text
- func NullString(t *string) pgtype.Text
- func NullTime(t *time.Time) pgtype.Timestamptz
- func NullUInt32ToSigned(t *uint32) pgtype.Int4
- func NullVehicleCurrentStatus(currentStatus *gtfs.CurrentStatus) pgtype.Text
- func RouteType(t string) api.Route_Type
- func SQLGps(n pgtype.Numeric) *float64
- func SQLNullBool(t pgtype.Bool) *bool
- func SQLNullFloat4(t pgtype.Float4) *float32
- func SQLNullFloat64(t sql.NullFloat64) *float64
- func SQLNullFloat8(t pgtype.Float8) *float64
- func SQLNullInt32(t pgtype.Int4) *int32
- func SQLNullInt64(t pgtype.Int8) *int64
- func SQLNullString(t pgtype.Text) *string
- func SQLNullTime(t pgtype.Timestamptz) *int64
- func SQLNullTimeMs(t pgtype.Timestamptz) *int64
- func StopType(t string) api.Stop_Type
- func Time(duration time.Duration) pgtype.Time
- func TransferType(t string) api.Transfer_Type
- func UnmarshalJSONAndDiscardUnknown(b []byte, m proto.Message) error
- func WheelchairAccessible(wheelchairBoarding gtfs.WheelchairBoarding) pgtype.Bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlertCause ¶
func AlertCause(cause string) api.Alert_Cause
func AlertEffect ¶
func AlertEffect(effect string) api.Alert_Effect
func AlertText ¶
func AlertText(s string) []*api.Alert_Text
func ApiCongestionLevel ¶
func ApiCongestionLevel(t string) api.Vehicle_CongestionLevel
func BikesAllowed ¶ added in v0.6.1
func BikesAllowed(bikesAllowed gtfs.BikesAllowed) pgtype.Bool
func CongestionLevel ¶
func CongestionLevel(congestionLevel gtfs.CongestionLevel) string
func ContinuousPolicy ¶
func ContinuousPolicy(p string) api.Route_ContinuousPolicy
func DirectionID ¶
func DirectionID(d gtfs.DirectionID) pgtype.Bool
func ExactTimesToIsFrequencyBased ¶ added in v0.6.1
func ExactTimesToIsFrequencyBased(exactTime gtfs.ExactTimes) bool
func FeedUpdateStatus ¶
func GtfsRealtimeExtension ¶
func GtfsRealtimeExtension(in *api.GtfsRealtimeOptions) (extensions.Extension, error)
func JSONShapeToApiShape ¶ added in v0.6.1
func NullApiCurrentStatus ¶
func NullApiCurrentStatus(t pgtype.Text) *api.Vehicle_CurrentStatus
func NullApiOccupancyStatus ¶
func NullApiOccupancyStatus(t pgtype.Text) *api.Vehicle_OccupancyStatus
func NullCongestionLevel ¶
func NullCongestionLevel(congestionLevel *gtfs.CongestionLevel) string
func NullFloat32 ¶
func NullFloat64 ¶
func NullIfEmptyString ¶
func NullOccupancyStatus ¶
func NullOccupancyStatus(occupancyStatus *gtfs.OccupancyStatus) pgtype.Text
func NullString ¶
func NullUInt32ToSigned ¶
func NullVehicleCurrentStatus ¶
func NullVehicleCurrentStatus(currentStatus *gtfs.CurrentStatus) pgtype.Text
func RouteType ¶
func RouteType(t string) api.Route_Type
func SQLNullBool ¶
func SQLNullFloat4 ¶
func SQLNullFloat64 ¶
func SQLNullFloat64(t sql.NullFloat64) *float64
func SQLNullFloat8 ¶
func SQLNullInt32 ¶
func SQLNullInt64 ¶
func SQLNullString ¶
func SQLNullTime ¶
func SQLNullTime(t pgtype.Timestamptz) *int64
func SQLNullTimeMs ¶
func SQLNullTimeMs(t pgtype.Timestamptz) *int64
func TransferType ¶
func TransferType(t string) api.Transfer_Type
func UnmarshalJSONAndDiscardUnknown ¶ added in v0.6.1
func WheelchairAccessible ¶ added in v0.6.1
func WheelchairAccessible(wheelchairBoarding gtfs.WheelchairBoarding) pgtype.Bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.