station

package
v0.0.0-...-5c296e8 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPollerRange

func GetPollerRange(ctx context.Context, client *dynamodb.Client) (
	*[2]time.Time, error,
)

TODO Test, also how range should be based on time.

func InsertStations

func InsertStations(ctx context.Context, client *dynamodb.Client) error

Types

type GetStationResp

type GetStationResp struct {
	Address     address           `json:"address"`
	LineCodes   []metro.LineCode  `json:"line_codes"`
	StationCode string            `json:"station_code"`
	Name        string            `json:"name"`
	Schedule    []StationSchedule `json:"schedule"`
}

type ListStationResp

type ListStationResp struct {
	Stations []GetStationResp `json:"stations"`
}

type StationModel

type StationModel struct {
	Code            string            `dynamodbav:"code"`
	City            string            `dynamodbav:"city"`
	State           string            `dynamodbav:"state"`
	Street          string            `dynamodbav:"street"`
	Zip             string            `dynamodbav:"zip"`
	Latitude        float32           `dynamodbav:"latitude"`
	Longitude       float32           `dynamodbav:"longitude"`
	Name            string            `dynamodbav:"name"`
	LineCodes       []metro.LineCode  `dynamodbav:"lineCodes"`
	StationSchedule []StationSchedule `dynamodbav:"stationSchedule"`
	Destinations    []string          `dynamodbav:"destinations"`
}

func GetDestinationStations

func GetDestinationStations(ctx context.Context, client *dynamodb.Client) (
	[]StationModel, error,
)

func ListStations

func ListStations(ctx context.Context, client *dynamodb.Client) (
	[]StationModel, error,
)

type StationSchedule

type StationSchedule struct {
	Day         string `dynamodbav:"day"`
	OpeningTime string `dynamodbav:"openingTime"`
	LastTrain   string `dynamodbav:"lastTrain"`
}

Jump to

Keyboard shortcuts

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