nextbus

package
v0.0.0-...-ac5bdac Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoGenerated

type AutoGenerated struct {
	Copyright   string      `json:"copyright"`
	Predictions Predictions `json:"predictions"`
}

type Direction

type Direction struct {
	PredictionRaw json.RawMessage `json:"prediction"`
	Title         string          `json:"title"`
}

type Prediction

type Prediction struct {
	AffectedByLayover string `json:"affectedByLayover"`
	Seconds           string `json:"seconds"`
	TripTag           string `json:"tripTag"`
	Minutes           string `json:"minutes"`
	IsDeparture       string `json:"isDeparture"`
	Block             string `json:"block"`
	DirTag            string `json:"dirTag"`
	Branch            string `json:"branch"`
	EpochTime         string `json:"epochTime"`
	Vehicle           string `json:"vehicle"`
}

type Predictions

type Predictions struct {
	RouteTag    string    `json:"routeTag"`
	StopTag     string    `json:"stopTag"`
	RouteTitle  string    `json:"routeTitle"`
	AgencyTitle string    `json:"agencyTitle"`
	StopTitle   string    `json:"stopTitle"`
	Direction   Direction `json:"direction"`
}

type Settings

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

Settings defines the configuration properties for this module

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

NewSettingsFromYAML creates a new settings instance from a YAML config block

type Widget

type Widget struct {
	view.TextWidget
	// contains filtered or unexported fields
}

Widget is the container for your module's data

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, pages *tview.Pages, settings *Settings) *Widget

NewWidget creates and returns an instance of Widget

func (*Widget) Refresh

func (widget *Widget) Refresh()

Refresh updates the onscreen contents of the widget

Jump to

Keyboard shortcuts

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