transit

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepartureItem

type DepartureItem struct {
	PlaceName string
	Name      string
	HeadSign  string
	ShortName string
	Platform  string
	Category  string
	Departure time.Time
}

type DeparturesBoardData

type DeparturesBoardData struct {
	Place struct {
		ID       string `json:"id"`
		Name     string `json:"name"`
		Type     string `json:"type"`
		Location struct {
			Lat float64 `json:"lat"`
			Lon float64 `json:"lng"`
		} `json:"location"`
	} `json:"place"`
	Departures []struct {
		Time      time.Time `json:"time"`
		Platform  string    `json:"platform"`
		Transport struct {
			Mode      string `json:"mode"`
			Name      string `json:"name"`
			Category  string `json:"category"`
			Color     string `json:"color"`
			TextColor string `json:"textColor"`
			HeadSign  string `json:"headsign"`
			ShortName string `json:"shortName"`
		} `json:"transport"`
		Agency struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		} `json:"agency"`
	} `json:"departures"`
}

type DeparturesData

type DeparturesData struct {
	Boards []DeparturesBoardData `json:"boards"`
}

type TransitView

type TransitView struct {
	// contains filtered or unexported fields
}

func New

func New() *TransitView

func (*TransitView) Primitive

func (l *TransitView) Primitive() tview.Primitive

func (*TransitView) Start

func (l *TransitView) Start()

func (*TransitView) Stop

func (l *TransitView) Stop()

func (*TransitView) Update

func (l *TransitView) Update() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳